Auf Komponenten eines Popups zugreifen

B

betzi1985

Neues Mitglied
0
Hallo ich bin Programmieranfänger, vor allem was das Thema Android-Apps angeht.


Ich will eine Entscheidungsfinder-App programmieren.

Die App besteht aus 6 Felder und 2 Button.

Ein Button heißt Ja/Nein , soll eine Schnellentscheidung herbeiführen, gibt Ja oder Nein als Ergebnis zurück.

Der 2. Button wählt zufällig einen Wert aus, einen der 6 Textfelder aus.

Ich würde mir gerne das Ergebnis in einem Popup anzeigen lasse. Jetzt kommt das Problem. Immer wenn ich auf ein Element des Popups drauf zugreifen möchte, bekomme ich eine Fehlermeldung. Sei es, dass ich den Listener des Buttons auf dem Popup in meinem Controller registrieren möchte, oder ich das Label auf dem Popup verändern möchte, ich bekomme immer einen fehler. Hier meine Quellcodedateien.

MainKlasse
Code:
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
 [LEFT]package[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] de.mevoso.android.entscheidunshelfer;[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] de.mevoso.android.entscheidunshelfer.Controller;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.app.Activity;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.os.Bundle;[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MainActivity [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]extends[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Activity {[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]protected[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] onCreate(Bundle [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]savedInstanceState[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]super[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].onCreate([/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]savedInstanceState[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT]setContentView(R.layout.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activity_main[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Controller([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [/SIZE]

Controller:
Code:
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
 [LEFT]package[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] de.mevoso.android.entscheidunshelfer;[/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] java.util.ArrayList;[/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.app.Activity;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.view.View;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.view.View.OnClickListener;[/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Controller [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]implements[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] OnClickListener {[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Model [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eModel[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MeineView [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ArrayList<String> [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]list[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Controller(Activity [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]){[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eModel[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Model();[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MeineView([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eModel[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].addObserver([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// [U]gibt[/U] [U]eine[/U] [U]Zufallszahl[/U] [U]zwischen[/U] 1 [U]und[/U] pMaximum [U]zurück[/LEFT]
[/U][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]int[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] gibZufallszahl([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]int[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]pMaximum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]return[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]int[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) ((Math.[I]random[/I]()*[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]pMaximum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])+1)-1);[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] fuelleView(){[/LEFT]
 [LEFT][U]ArrayList[/U] [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]liste[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getViews();[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]for[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](Object [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]o[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:[/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]liste[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]){[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](![/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]o[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].toString().equalsIgnoreCase([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])){[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]list[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].add([/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]o[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].toString());[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] String [U]getEntscheidung()[/U]{[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].fuelleView();[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]return[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]list[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].get([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].gibZufallszahl([/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]list[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].size()));[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] String [U]yesNo()[/U]{[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].gibZufallszahl(2)==1){[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]return[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Ja"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT]}[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]return[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Nein"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT]} [/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] onClick(View [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]buttonEvent[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]switch[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]buttonEvent[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getId())[/LEFT]
 [LEFT]{[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]case[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]btn_yes_no[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].makePopup([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f] [LEFT]// this.eModel.setAntwort(yesNo());[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]break[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]case[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]btn_entscheidung[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]eView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].makePopup([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f] [LEFT]// this.eModel.setAntwort(this.getEntscheidung());[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]break[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]case[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]btn_popup_ok[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:[/LEFT]
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f] [LEFT]// this.eView.setVisible();[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]break[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [/SIZE]

View
Code:
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
 [LEFT]package[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] de.mevoso.android.entscheidunshelfer;[/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] java.util.ArrayList;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] java.util.Observable;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] java.util.Observer;[/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.app.ActionBar.LayoutParams;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.app.Activity;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.view.LayoutInflater;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.view.View;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.widget.Button;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.widget.EditText;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.widget.PopupWindow;[/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] android.widget.TextView;[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MeineView [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]implements[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Observer{[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Button [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]yesNoButton[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Button [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]entscheidungButton[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Button [/SIZE][U][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popUpButton[/U][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ArrayList<String> [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editTextList[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]; [/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] EditText [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] EditText [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] EditText [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] EditText [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld4[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] EditText [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] EditText [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld6[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] TextView [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]entscheidung[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Activity [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] View [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popup[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]= [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] PopupWindow [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popupWindow[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MeineView (Controller [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]appController[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], Activity [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]){[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]yesNoButton[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = (Button)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]btn_yes_no[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]yesNoButton[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setOnClickListener([/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]appController[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]entscheidungButton[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(Button)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]btn_entscheidung[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]entscheidungButton[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setOnClickListener([/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]appController[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(EditText)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editText1[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(EditText)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editText2[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(EditText)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editText3[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld4[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(EditText)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editText4[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(EditText)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editText5[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld6[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(EditText)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editText6[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ArrayList<String> getViews(){[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editTextList[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].add([/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString());[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editTextList[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].add([/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString());[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editTextList[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].add([/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld3[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString());[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editTextList[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].add([/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld4[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString());[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editTextList[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].add([/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld5[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString());[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editTextList[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].add([/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld6[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString());[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]return[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]editTextList[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] makePopup(Controller [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]controller[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]){[/LEFT]
 [LEFT]LayoutInflater [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]layoutInflater[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/LEFT]
 [LEFT]= (LayoutInflater)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getBaseContext()[/LEFT]
 [LEFT].getSystemService([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][B][I][U][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]LAYOUT_INFLATER_SERVICE[/B][/I][/U][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]); [/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popup[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]layoutInflater[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].inflate(R.layout.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popup_main[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][B][U][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/U][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]); [/LEFT]
 [LEFT][/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popupWindow[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] PopupWindow([/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popup[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/LEFT]
 [LEFT][U]LayoutParams.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]WRAP_CONTENT[/B][/I][/U][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/LEFT]
 [LEFT][U]LayoutParams.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]WRAP_CONTENT[/B][/I][/U][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]); [/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popupWindow[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].showAsDropDown([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],50,-30);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popupWindow[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setFocusable([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]true[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popupWindow[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].update();[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]entscheidung[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(TextView)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popup_ergebnis[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//this.popUpButton.setOnClickListener(controller);[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]popUpButton[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=(Button)[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]activ[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].findViewById(R.id.[/SIZE][B][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]btn_popup_ok[/B][/I][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f] [LEFT]// this.entscheidung.setText("[U]hallo[/U]");[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]feld1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setText([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]entscheidung[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString());[/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] update(Observable [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]arg0[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], Object [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]arg1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {[/LEFT]
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f] [LEFT]// this.entscheidung.setText(((Model) arg1).getAntwort());[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [/SIZE]

Model:
Code:
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
 [LEFT]package[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] de.mevoso.android.entscheidunshelfer;[/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]import[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] java.util.Observable;[/LEFT]
 [LEFT][/LEFT]
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] [LEFT]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Model [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]extends[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Observable{[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] String [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]antwort[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] setAntwort(String [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]antwort[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]antwort[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#6a3e3e][SIZE=2][COLOR=#6a3e3e]antwort[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT]setChanged();[/LEFT]
 [LEFT]notifyObservers([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] String getAntwort(){[/LEFT]
 [LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]return[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]antwort[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/LEFT]
 [LEFT]}[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT]}[/LEFT]
 [/SIZE]

XML-Datei des Popups:

HTML:
 [LEFT]<?xml version="1.0" encoding="utf-8"?>[/LEFT]
 [LEFT]<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[/LEFT]
 [LEFT]android:layout_width="fill_parent"[/LEFT]
 [LEFT]android:layout_height="fill_parent"[/LEFT]
 [LEFT]android:orientation="vertical" [/LEFT]
 [LEFT]android:background="@android:color/background_light">[/LEFT]
 [LEFT]<LinearLayout [/LEFT]
 [LEFT]android:layout_width="wrap_content"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:orientation="vertical" [/LEFT]
 [LEFT]android:layout_margin="1dp"[/LEFT]
 [LEFT]android:background="@android:color/darker_gray">[/LEFT]
 [LEFT]>[/LEFT]
 [LEFT]<LinearLayout [/LEFT]
 [LEFT]android:layout_width="wrap_content"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:orientation="vertical" [/LEFT]
 [LEFT]android:layout_margin="20dp">[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<TextView[/LEFT]
 [LEFT]android:id="@+id/popup_ergebnis"[/LEFT]
 [LEFT]android:layout_width="fill_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:text="Hilfe" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<Button[/LEFT]
 [LEFT]android:id="@+id/btn_popup_ok"[/LEFT]
 [LEFT]android:layout_width="fill_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:text="Ok" />[/LEFT]
 [LEFT]</LinearLayout>[/LEFT]
 [LEFT]</LinearLayout>[/LEFT]
 </LinearLayout>

Und der HauptMaske:

HTML:
 [LEFT]<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[/LEFT]
 [LEFT]xmlns:tools="http://schemas.android.com/tools"[/LEFT]
 [LEFT]android:layout_width="match_parent"[/LEFT]
 [LEFT]android:layout_height="match_parent"[/LEFT]
 [LEFT]android:paddingBottom="@dimen/activity_vertical_margin"[/LEFT]
 [LEFT]android:paddingLeft="@dimen/activity_horizontal_margin"[/LEFT]
 [LEFT]android:paddingRight="@dimen/activity_horizontal_margin"[/LEFT]
 [LEFT]android:paddingTop="@dimen/activity_vertical_margin"[/LEFT]
 [LEFT]tools:context="de.mevoso.android.entscheidunshelfer.MainActivity" >[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<LinearLayout[/LEFT]
 [LEFT]android:layout_width="wrap_content"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:layout_alignParentBottom="true"[/LEFT]
 [LEFT]android:layout_alignParentLeft="true"[/LEFT]
 [LEFT]android:layout_alignParentRight="true"[/LEFT]
 [LEFT]android:layout_alignParentTop="true"[/LEFT]
 [LEFT]android:orientation="vertical" >[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<EditText[/LEFT]
 [LEFT]android:id="@+id/editText1"[/LEFT]
 [LEFT]android:layout_width="match_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:ems="10"[/LEFT]
 [LEFT]android:hint = "@string/feld_1" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT][/LEFT]
 [LEFT]<EditText[/LEFT]
 [LEFT]android:id="@+id/editText2"[/LEFT]
 [LEFT]android:layout_width="match_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:ems="10"[/LEFT]
 [LEFT]android:hint = "@string/feld_2"/>[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<EditText[/LEFT]
 [LEFT]android:id="@+id/editText3"[/LEFT]
 [LEFT]android:layout_width="match_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:ems="10"[/LEFT]
 [LEFT]android:hint = "@string/feld_3" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<EditText[/LEFT]
 [LEFT]android:id="@+id/editText4"[/LEFT]
 [LEFT]android:layout_width="match_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:ems="10"[/LEFT]
 [LEFT]android:hint = "@string/feld_4" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<EditText[/LEFT]
 [LEFT]android:id="@+id/editText5"[/LEFT]
 [LEFT]android:layout_width="match_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:ems="10"[/LEFT]
 [LEFT]android:hint = "@string/feld_5" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<EditText[/LEFT]
 [LEFT]android:id="@+id/editText6"[/LEFT]
 [LEFT]android:layout_width="match_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:ems="10"[/LEFT]
 [LEFT]android:hint = "@string/feld_6" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<Button[/LEFT]
 [LEFT]android:id="@+id/btn_entscheidung"[/LEFT]
 [LEFT]android:layout_width="168dp"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:gravity="left|center_vertical"[/LEFT]
 [LEFT]android:text="@string/btn_Entscheidung" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<Button[/LEFT]
 [LEFT]android:id="@+id/button1"[/LEFT]
 [LEFT]android:layout_width="wrap_content"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:visibility="invisible"[/LEFT]
 [LEFT]android:text="Button" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<Button[/LEFT]
 [LEFT]android:id="@+id/button2"[/LEFT]
 [LEFT]android:layout_width="wrap_content"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:visibility="invisible"[/LEFT]
 [LEFT]android:text="Button"[/LEFT]
 [LEFT]/>[/LEFT]
 [LEFT][/LEFT]
 [LEFT]<Button[/LEFT]
 [LEFT]android:id="@+id/btn_yes_no"[/LEFT]
 [LEFT]android:layout_width="match_parent"[/LEFT]
 [LEFT]android:layout_height="wrap_content"[/LEFT]
 [LEFT]android:gravity="center|center_vertical"[/LEFT]
 [LEFT]android:text="Ja/Nein" />[/LEFT]
 [LEFT][/LEFT]
 [LEFT]</LinearLayout>[/LEFT]
 [LEFT][/LEFT]
 </RelativeLayout>

Wie gesagt, sobald ich in der View auf ein Feld oder Button des Popups zugreifen möchte, bekomme ich eine Exception
 
Welches Exception? Logcat bitte einfügen.

Der ursprüngliche Beitrag von 18:13 Uhr wurde um 20:05 Uhr ergänzt:

Hi, du hast ein NullPointerException.

https://www.android-hilfe.de/forum/...ng.9/nullpointerexception-was-tun.522368.html

Der Fehler liegt in den 3 Zeilen:

Code:
this.entscheidung = (TextView) this.activ.findViewById(R.id.popup_ergebnis);

this.popUpButton = (Button) this.activ.findViewById(R.id.btn_popup_ok);
this.feld1.setText(this.entscheidung.getText().toString());
this.entscheidung = (TextView) this.activ.findViewById(R.id.popup_ergebnis) liefert null zurück.


PS: Das ist kein MVC, sondern eher Spagetti - Code. ;)

Model View Controller

Eine Activity ist keine MainMethode, sondern ein View, der auch als Controller agieren kann. So sollte man kein MVC implementieren. In keiner Sprache!

Das könnte auch dich interessieren: http://robobinding.github.io/RoboBinding/

Der ursprüngliche Beitrag von 20:05 Uhr wurde um 20:44 Uhr ergänzt:

PS:

Das dürfte deinen NullPointerException beheben:

Code:
this.entscheidung = (TextView) popup.findViewById(R.id.popup_ergebnis);
this.popUpButton = (Button) popup.findViewById(R.id.btn_popup_ok);
 

Ähnliche Themen

M
  • MikelKatzengreis
Antworten
5
Aufrufe
137
swa00
swa00
B
Antworten
4
Aufrufe
496
bb321
B
Zurück
Oben Unten