Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20bcaf75 authored by Jorge Ruesga's avatar Jorge Ruesga
Browse files

CMFileManager: Compress type selection dialog has an invalid background

The background dialog for selecting the compression type has an invalid color.
The valid color is the background color of the dialog.

Change-Id: Ib5ecf1c59e5c99ccd6ed8707646b718ca88dbcd9
parent addb5e77
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -72,6 +72,8 @@ public class CheckableListAdapter extends ArrayAdapter<CheckableListAdapter.Chec
        TextView mTvTitle;
    }

    private final boolean mIsDialog;

    //The resource of the item check
    private static final int RESOURCE_ITEM_CHECK = R.id.option_list_item_check;
    //The resource of the item name
@@ -85,7 +87,21 @@ public class CheckableListAdapter extends ArrayAdapter<CheckableListAdapter.Chec
     */
    public CheckableListAdapter(
            Context context, List<CheckableListAdapter.CheckableItem> items) {
        this(context, items, false);
    }

    /**
     * Constructor of <code>CheckableListAdapter</code>.
     *
     * @param context The current context
     * @param items An array of items to add to the current list
     * @param isDialog Indicates if the owner is a dialog (not a popup). In this case,
     * use the background of the dialog.
     */
    public CheckableListAdapter(
            Context context, List<CheckableListAdapter.CheckableItem> items, boolean isDialog) {
        super(context, RESOURCE_ITEM_NAME, items);
        this.mIsDialog = isDialog;
    }

    /**
@@ -127,6 +143,8 @@ public class CheckableListAdapter extends ArrayAdapter<CheckableListAdapter.Chec
            Theme theme = ThemeManager.getCurrentTheme(getContext());
            theme.setBackgroundDrawable(
                    getContext(), v,
                    (this.mIsDialog) ?
                            "selectors_deselected_drawable" : //$NON-NLS-1$
                            "menu_checkable_selector_drawable"); //$NON-NLS-1$
            theme.setTextColor(
                    getContext(), viewHolder.mTvTitle, "text_color"); //$NON-NLS-1$
+1 −1
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ public final class DialogHelper {
            boolean checked = (i == defOption);
            items.add(new CheckableListAdapter.CheckableItem(options[i], true, checked));
        }
        final CheckableListAdapter adapter = new CheckableListAdapter(context, items);
        final CheckableListAdapter adapter = new CheckableListAdapter(context, items, true);

        // Create the list view and set as view
        final ListView listView = new ListView(context);