use of org.horaapps.liz.ThemedAlertDialogBuilder in project LeafPic by HoraApps.
the class DeleteAlbumsDialog method onCreateDialog.
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
ThemedAlertDialogBuilder builder = new ThemedAlertDialogBuilder(getActivity(), ThemeHelper.getInstanceLoaded(getContext()));
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_delete_album_progress, null, false);
RecyclerView rv = view.findViewById(R.id.rv_folders);
adapter = new FolderAdapter(getContext(), albums);
rv.setLayoutManager(new LinearLayoutManager(getContext()));
rv.setAdapter(adapter);
dialogTitle = view.findViewById(R.id.text_dialog_title);
fileName = view.findViewById(R.id.file_name);
progress = view.findViewById(R.id.progress_bar);
((CardView) view.findViewById(R.id.message_card)).setCardBackgroundColor(t.getCardBackgroundColor());
dialogTitle.setBackgroundColor(t.getPrimaryColor());
progress.setMax(80);
progress.setProgress(50);
builder.setView(view);
builder.setNegativeButton(getString(R.string.cancel).toUpperCase(), (dialogInterface, i) -> {
Toast.makeText(getContext(), "No Way", Toast.LENGTH_SHORT).show();
dialogInterface.dismiss();
});
return builder.create();
}
Aggregations