Search in sources :

Example 1 with ThemedAlertDialogBuilder

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();
}
Also used : CardView(android.support.v7.widget.CardView) RecyclerView(android.support.v7.widget.RecyclerView) ThemedAlertDialogBuilder(org.horaapps.liz.ThemedAlertDialogBuilder) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) CardView(android.support.v7.widget.CardView) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) View(android.view.View) NonNull(android.support.annotation.NonNull)

Aggregations

NonNull (android.support.annotation.NonNull)1 CardView (android.support.v7.widget.CardView)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 TextView (android.widget.TextView)1 ThemedAlertDialogBuilder (org.horaapps.liz.ThemedAlertDialogBuilder)1