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

Commit 7c504673 authored by Marcus Hagerott's avatar Marcus Hagerott
Browse files

Tweak end padding for checkbox in SIM import

test
manually verified appearance of SIM import screen

Change-Id: I07a18bee138b1704dcb8b113c0cab86fc400beff
parent e6493181
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@
            android:background="?android:colorBackground"
            android:minHeight="48dp"
            android:orientation="horizontal"
            android:paddingEnd="32dp"
            android:paddingEnd="16dp"
            android:paddingStart="16dp">

            <ImageView
@@ -83,8 +83,8 @@
                android:id="@+id/account_expander_icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="9dp"
                android:layout_gravity="center_vertical"
                android:layout_marginEnd="10dp"
                android:scaleType="center"
                android:src="@drawable/ic_arrow_drop_down_black_24dp"
                android:tint="?android:textColorSecondary"
+5 −0
Original line number Diff line number Diff line
@@ -458,4 +458,9 @@
    <dimen name="call_subject_dialog_secondary_text_size">14sp</dimen>
    <!-- Row padding for call subject history items. -->
    <dimen name="call_subject_history_item_padding">15dp</dimen>

    <!-- Padding between SIM checkbox and end of row -->
    <dimen name="sim_import_checkbox_end_padding">16dp</dimen>


</resources>
+7 −0
Original line number Diff line number Diff line
@@ -325,9 +325,12 @@ public class SimImportFragment extends DialogFragment
        private AccountWithDataSet mSelectedAccount;
        private Map<AccountWithDataSet, Set<SimContact>> mExistingMap;
        private Map<AccountWithDataSet, TreeSet<Long>> mPerAccountCheckedIds = new ArrayMap<>();
        private final int mCheckboxPaddingEnd;

        public SimContactAdapter(Context context) {
            super(context);
            mCheckboxPaddingEnd = context.getResources()
                    .getDimensionPixelOffset(R.dimen.sim_import_checkbox_end_padding);
        }

        @Override
@@ -344,6 +347,10 @@ public class SimImportFragment extends DialogFragment
            // clickable
            contactView.getCheckBox().setFocusable(false);
            contactView.getCheckBox().setClickable(false);
            // The default list pads the checkbox by a larger amount than we want.
            contactView.setPaddingRelative(contactView.getPaddingStart(),
                    contactView.getPaddingTop(), mCheckboxPaddingEnd,
                    contactView.getPaddingBottom());
            setViewEnabled(contactView, !existsInCurrentAccount(position));
        }