PopUp in gleicher View anzeigen

vik0809

Mitglied
Hallo,

Wie ist es möglich ein PopUp in der gleichen View anzeigen zu lassen? Das PopUp wird bei mir zwar angezeigt aber in einer neuen View.

Beim Klick auf einen Button führe ich folgendes aus:
Java:
intent = new Intent(this, DialogsActivity.class);
startActivity(intent);

in der DialogsActivity.class sieht die onCreate Methode folgendermaßen aus:
Java:
@Override
	public void onCreate(Bundle savedInstanceState) {
               super.onCreate(savedInstanceState);
               View view = findViewById(R.id.add_button);
               openDialog(view);
}

...und die openDialog Methode:
Java:
public void openDialog(final View view) {
			
			builder = new Builder(this);
                        builder.setTitle(
					getResources().getString(R.string.popUp))
					.setIcon(
							getResources().getDrawable(
									android.R.drawable.ic_dialog_alert))
					.setMessage(
							getResources().getString(
									R.string.name))
					
					
					.setPositiveButton("OK", null)
					.setNegativeButton("Abbrechen", null);
			
			builder.show();
			
			
		}
	}

Vielen Dank im voraus für die Hilfe
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
C Android Bei Text "Popup" anzeigen Android & Cross-Platform Mobile Apps 2
R Android Zugriff auf view von MainActivity Android & Cross-Platform Mobile Apps 7
W Zur Laufzeit erstelltes MenuItem an eine View binden Android & Cross-Platform Mobile Apps 1
W Bild aus dem Internet in View bzw. ImageView laden (Fragment) Android & Cross-Platform Mobile Apps 2
J View Breite/Höhe bestimmen Android & Cross-Platform Mobile Apps 4
B Android In einem View der ersten Activity zweite anzeigen Android & Cross-Platform Mobile Apps 2
S Dynamische EditText View eingaben in Datenbank speichern Android & Cross-Platform Mobile Apps 0
M Android Suche Activity/View Namen Android & Cross-Platform Mobile Apps 1
R Android Warum (View view)? Android & Cross-Platform Mobile Apps 4
J Android neue View mit OnTouchListener Android & Cross-Platform Mobile Apps 0
B Eigene View xml-Layout einbinden Android & Cross-Platform Mobile Apps 1
R Problem mit View in ScrollView Android & Cross-Platform Mobile Apps 6
R Android Android.view Serializable ? Android & Cross-Platform Mobile Apps 3
M Android View zu View hinzufügen Android & Cross-Platform Mobile Apps 4
M Activity wechseln aus List View mit Android & Cross-Platform Mobile Apps 2
M Suche Name von View Komponente Android & Cross-Platform Mobile Apps 10
G canvas in view anzeigen Android & Cross-Platform Mobile Apps 10
G Fehlermeldung: "No XML content. Please add a root view or layout to your documet." Android & Cross-Platform Mobile Apps 7
E Android View zur Laufzeit hinzufügen Android & Cross-Platform Mobile Apps 4
N neuen view öffnen Android & Cross-Platform Mobile Apps 13
J id's von view komponenten werden nicht gefunden Android & Cross-Platform Mobile Apps 2
C Panel/View für Android Android & Cross-Platform Mobile Apps 3
tfa Android Layout-Probleme: View programmatisch erweitern (addContentView) Android & Cross-Platform Mobile Apps 7
G Dynamische View Inhalt -> Lagesensor Android & Cross-Platform Mobile Apps 3

Ähnliche Java Themen

Neue Themen


Oben