Custom Bottom Sheet Bottom Slider Dialog Android Studio

public static void addBottomSheetDialog(Context context) {
BottomSheetDialog dialog = new BottomSheetDialog(context, R.style.Transparent);

dialog.setContentView(R.layout.activity_home_add_file_dialog);
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(true);
dialog.setDismissWithAnimation(true);

LinearLayout ll_captureDocument = dialog.findViewById(R.id.ll_captureDocument);
LinearLayout ll_fromFiles = dialog.findViewById(R.id.ll_fromFiles);

ll_captureDocument.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
context.startActivity(new Intent(context, DocumentCapturingActivity.class));
dialog.dismiss();
}
});

ll_fromFiles.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
context.startActivity(new Intent(context, FromFilesActivity.class));
dialog.dismiss();
}
});
dialog.show();
}

Comments

Popular posts from this blog

How to add layout inflator (Layout Inflators)

Creating RecyclerView and adjusting its margins