I found code to create some input fields, and they are fine, but in this code it just doesn't work:
View.OnClickListener handleOnClick(final TextView textview) {
return new View.OnClickListener() {
public void onClick(View v) {
if(editOn==1){
textview.setText("neuer Text");
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Hinzufügen");
alert.setMessage("Name des neuen Eintrags");
final EditText input = new EditText(this);
alert.setView(input);
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
String entryInput = input.getText().toString();
loadUp(entryInput,"0","1.1.2000");
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
});
}
}
};
}
, " AlertDialog.Builder( View.OnClickListener() {}) undefined"
, - ".. AlertDialog.Builder(this)), . , "this" -. menuitem, , , (thats what if (editOn == 1)) . , , , - , , !