How to create BottomSheet dialog in Sketchware using Androidx

The code is:

final
com.google.android.material.bottomsheet.BottomSheetDialog bs_base = new com.google.android.material.bottomsheet.BottomSheetDialog(MainActivity.this);

View layBase = getLayoutInflater().inflate(R.layout.cust, null);

bs_base.setContentView(layBase);

bs_base.show();

Button pay_bs = (Button)layBase.findViewById(R.id.button1);

pay_bs.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
bs_base.dismiss();

showMessage("Payment Done");
}
});

The tutorial video is:


Comments

Popular posts from this blog

How to Create Material Ripple Effect in Sketchware

How to Create Custom Notifications with Listeners

How to create Custom Dialog in Sketchware