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

TextInputLayout in Sketchware

Create Stopwatch App in Android using Sketchware

How to enable download in webview in Sketchware apps?

Create Stopwatch App in Android using Sketchware

Codes for modifying Action Bar in Sketchware

Code for implementing Notifications in Sketchware

A Flash Light App in Sketchware

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

How to integrate Admob Ads in Sketchware project using AIDE?

Firebase Login/Register with email verification