Widget - Dialog Edittext

LinearLayout mylayout = new LinearLayout(MainActivity.this);


LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

mylayout.setLayoutParams(params); mylayout.setOrientation(LinearLayout.VERTICAL);

final EditText myedittext = new EditText(MainActivity.this);
myedittext.setLayoutParams(new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT, android.widget.LinearLayout.LayoutParams.WRAP_CONTENT));

mylayout.addView(myedittext);
dialog.setView(mylayout);
myedittext.setHint("Enter your name");

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

TextInputLayout in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

How to enable download in webview in Sketchware apps?

Intent - Open File By Type

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

ActionBar back button

Animation Transtition Animation