How to show edittext and listview and positive and negative button in dialogbox? I tried to show them separatly but i want all of these in one dialogbox.
To show edit text i tried:
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setView(modeList);
builder.setPositiveButton("Save", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
String myTextString = savedText.getText().toString().trim();
}
});
You require custom dialog.
Read the android document regarding this and there is also a sample code.
You can also found Tutorials here