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

Commit 05f010b8 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Improve polish for the MediaProjectionPermissionActivity.

- Change title styling / padding per UX spec.
- Also, fully support dark theme..

Test: visual, both in dark and light themes.
Bug: 131210470
Bug: 129787693
Change-Id: I150533c063feaa1be2879f34b5b6ac604f265e23
parent 87d2f6c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@
        <activity
            android:name=".media.MediaProjectionPermissionActivity"
            android:exported="true"
            android:theme="@style/Theme.MediaProjectionAlertDialog"
            android:theme="@style/Theme.SystemUI.MediaProjectionAlertDialog"
            android:finishOnCloseSystemDialogs="true"
            android:launchMode="singleTop"
            android:excludeFromRecents="true"
+26 −0
Original line number Diff line number Diff line
<!--
Copyright (C) 2019 The Android Open Source Project

   Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:insetLeft="2.5dp"
    android:insetRight="2.5dp">
    <vector android:width="24dp"
            android:height="24dp"
            android:viewportWidth="24.0"
            android:viewportHeight="24.0">
        <path android:fillColor="#FFFFFFFF" android:pathData="M1,18v3h3C4,19.34 2.66,18 1,18zM1,14v2c2.76,0 5,2.24 5,5h2C8,17.13 4.87,14 1,14zM1,10v2c4.97,0 9,4.03 9,9h2C12,14.92 7.07,10 1,10zM21,3H3C1.9,3 1,3.9 1,5v3h2V5h18v14h-7v2h7c1.1,0 2,-0.9 2,-2V5C23,3.9 22.1,3 21,3z"/>
        <path android:fillColor="#FF0000" android:pathData="M19,7H5v1.63c3.96,1.28 7.09,4.41 8.37,8.37H19V7z"/>
    </vector>
</inset>
+11 −10
Original line number Diff line number Diff line
@@ -15,25 +15,26 @@
    limitations under the License.
-->

<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:theme="@style/Theme.MediaProjectionAlertDialog"
        android:theme="@style/Theme.SystemUI.MediaProjectionAlertDialog"
        android:paddingStart="?android:attr/dialogPreferredPadding"
        android:paddingEnd="?android:attr/dialogPreferredPadding"
        android:paddingTop="?android:attr/dialogPreferredPadding">
        android:orientation="vertical">
    <ImageView
        android:id="@+id/dialog_icon"
        android:src="@drawable/ic_media_projection_permission"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_marginBottom="20dp"
        android:layout_centerInParent="true"/>
        android:layout_height="24dp"
        android:layout_width="24dp"
        android:layout_marginTop="18dp"
        android:layout_marginBottom="12dp"
        android:layout_gravity="center_horizontal" />
    <TextView
        android:id="@+id/dialog_title"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/dialog_icon"
        android:textColor="?android:attr/colorPrimary"
        android:textSize="20sp"
        android:textColor="?android:attr/textColorPrimary"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Title" />
</RelativeLayout>
</LinearLayout>
+1 −1
Original line number Diff line number Diff line
@@ -349,7 +349,7 @@
    <style name="AutoSizingList">
        <item name="enableAutoSizing">true</item>
    </style>
    <style name="Theme.MediaProjectionAlertDialog" parent="android:Theme.DeviceDefault">
    <style name="Theme.SystemUI.MediaProjectionAlertDialog">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>