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

Commit 467776a8 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Implement design on privacy dialog

* Implement margins and styles
* Change tappable region to whole row
* Implement a11y for whole row

Also, fix a bug with background window that would show black on some
devices instead of transparent.

Bug: 178093014
Fixes: 178616173
Test: manual
Test: atest PrivacyDialogTest
Change-Id: If03fcd75970a724f8209596b75640c5618b3b9c2
parent b9c60d9a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -21,16 +21,16 @@
          >
        <shape android:shape="oval">
            <size
                android:height="28dp"
                android:width="28dp"
                android:height="@dimen/ongoing_appops_dialog_circle_size"
                android:width="@dimen/ongoing_appops_dialog_circle_size"
            />
            <solid android:color="@color/privacy_circle_camera" />
        </shape>
    </item>
    <item android:id="@id/icon"
          android:gravity="center"
          android:width="20dp"
          android:height="20dp"
          android:width="@dimen/ongoing_appops_dialog_icon_size"
          android:height="@dimen/ongoing_appops_dialog_icon_size"
          android:drawable="@*android:drawable/perm_group_camera"
    />
</layer-list>
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -21,16 +21,16 @@
          >
        <shape android:shape="oval">
            <size
                android:height="28dp"
                android:width="28dp"
                android:height="@dimen/ongoing_appops_dialog_circle_size"
                android:width="@dimen/ongoing_appops_dialog_circle_size"
            />
            <solid android:color="@color/privacy_circle_microphone_location" />
        </shape>
    </item>
    <item android:id="@id/icon"
          android:gravity="center"
          android:width="20dp"
          android:height="20dp"
          android:width="@dimen/ongoing_appops_dialog_icon_size"
          android:height="@dimen/ongoing_appops_dialog_icon_size"
          android:drawable="@*android:drawable/perm_group_microphone"
    />
</layer-list>
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -21,16 +21,16 @@
          >
        <shape android:shape="oval">
            <size
                android:height="28dp"
                android:width="28dp"
                android:height="@dimen/ongoing_appops_dialog_circle_size"
                android:width="@dimen/ongoing_appops_dialog_circle_size"
            />
            <solid android:color="@color/privacy_circle_microphone_location" />
        </shape>
    </item>
    <item android:id="@id/icon"
          android:gravity="center"
          android:width="20dp"
          android:height="20dp"
          android:width="@dimen/ongoing_appops_dialog_icon_size"
          android:height="@dimen/ongoing_appops_dialog_icon_size"
          android:drawable="@*android:drawable/perm_group_microphone"
    />
</layer-list>
 No newline at end of file
+8 −2
Original line number Diff line number Diff line
@@ -22,7 +22,13 @@
    android:layout_height="wrap_content"
    android:layout_marginStart="@dimen/ongoing_appops_dialog_side_margins"
    android:layout_marginEnd="@dimen/ongoing_appops_dialog_side_margins"
    android:layout_marginTop="8dp"
    android:orientation="vertical"
    android:padding = "8dp"
    android:paddingLeft="@dimen/ongoing_appops_dialog_side_padding"
    android:paddingRight="@dimen/ongoing_appops_dialog_side_padding"
    android:paddingBottom="12dp"
    android:paddingTop="8dp"
    android:background="@drawable/privacy_dialog_bg"
/>
<!-- 12dp padding bottom so there's 20dp total under the icon -->
<!-- 8dp padding top, as there's 4dp margin in each row -->
 No newline at end of file
+20 −21
Original line number Diff line number Diff line
@@ -16,19 +16,22 @@
  -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/privacy_item"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="48dp"
    android:orientation="horizontal"
    android:layout_marginTop="8dp"
    android:layout_marginTop="4dp"
    android:importantForAccessibility="yes"
    android:focusable="true"
    >
    <!-- 4dp marginTop makes 20dp minimum between icons -->
    <ImageView
        android:id="@+id/icon"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_width="@dimen/ongoing_appops_dialog_circle_size"
        android:layout_height="@dimen/ongoing_appops_dialog_circle_size"
        android:layout_gravity="center_vertical"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:importantForAccessibility="no"
    />

    <TextView
@@ -38,25 +41,21 @@
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_gravity="center_vertical"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        android:textDirection="locale"
        android:textAlignment="viewStart"
        android:gravity="start | center_vertical"
        android:textAppearance="@style/TextAppearance.QS.TileLabel"
        android:textAppearance="@style/TextAppearance.PrivacyDialog"
        android:lineHeight="20sp"
    />

    <FrameLayout
        android:id="@+id/link"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_gravity="center_vertical"
        android:background="?android:attr/selectableItemBackground"
    >

    <ImageView
        android:layout_height="24dp"
        android:layout_width="24dp"
            android:layout_gravity="center"
        android:layout_gravity="center_vertical"
        android:src="@*android:drawable/ic_chevron_end"
        android:tint="?android:attr/textColorPrimary"
        />
    </FrameLayout>

</LinearLayout>
 No newline at end of file
Loading