Last active
July 20, 2017 04:44
-
-
Save sidward35/d6934cb5d1f76ad5a243b28552c1b56b to your computer and use it in GitHub Desktop.
Android AlertDialog with EditText
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final EditText input = new EditText(MainActivity.this); | |
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( | |
LinearLayout.LayoutParams.MATCH_PARENT, | |
LinearLayout.LayoutParams.MATCH_PARENT); | |
input.setLayoutParams(lp); | |
new AlertDialog.Builder(MainActivity.this) | |
.setTitle("New Playlist") | |
.setPositiveButton("Create", new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int which) { | |
} | |
}) | |
.setIcon(R.drawable.new_playlist) | |
.setView(input) | |
.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment