Transparent Dialog Sketchware || Dialog Theme Transparent || Sketchware Tutorial

In this video I’ve showed how to create a dialog with transparent background.
Code:
\here “dialog2” is your dialog component amd “cust” is your custom view name

final AlertDialog dialog2 = new AlertDialog.Builder(MainActivity.this,AlertDialog.THEME_DEVICE_DEFAULT_DARK).create();
View inflate = getLayoutInflater().inflate(R.layout.cust, null);
dialog2.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog2.getWindow().setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(Color.TRANSPARENT));
dialog2.setView(inflate);
dialog2.setCancelable(true);
dialog2.show();

Tjanks for watching.

Post Author: hatefull