Widget - Dialog Custome

final AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).create();

LayoutInflater inflater = getLayoutInflater();

View convertView = (View) inflater.inflate(R.layout.custom_dialog, null);
dialog.setView(convertView);

TextView txt1 = (TextView)
convertView.findViewById(R.id.textview1);//on custome_dialog
txt1.setText("your text here!");

Button btn1 = (Button) convertView.findViewById(R.id.button1);//on custome_dialog

btn1.setOnClickListener(new View.OnClickListener(){
    public void onClick(View v){
dialog.dismiss();
        showMessage("Aan");
     
    }
});

dialog.show();

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