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();
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
Post a Comment