summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnushek Prasal <anushekprasal@gmail.com>2019-11-12 15:41:19 +0530
committeralk3pInjection <webmaster@raspii.tech>2021-09-27 21:17:05 +0800
commit6ccffecf2503c45c6a013bdae8cdcb8e61f59b9f (patch)
treebce696e9729f4c759a09276a4437bfd488cedc5e
parentbaa0cb5f1a5285c7f119ffc1dadfc5f845dff241 (diff)
[aospa][quartz] SystemUI: Improve alert slider dialog
- Convert px to dip - Modify the dialog to match toast - Fix positioning for OP7 Pro slider - Remove unused dimens and drawables Edit: set position values to 0 for neutrality. They should be adapted by overriding in each device tree. Change-Id: I0dfb705843f52cdea470993d05a7bdedc10750f4
-rw-r--r--packages/SystemUI/res/drawable/dialog_tri_state_navigation_bg.xml29
-rw-r--r--packages/SystemUI/res/drawable/dialog_tri_state_triangle_right.xml27
-rw-r--r--packages/SystemUI/res/drawable/dialog_tri_state_triangle_top.xml27
-rw-r--r--packages/SystemUI/res/layout/tri_state_dialog.xml16
-rw-r--r--packages/SystemUI/res/values/pa_dimens.xml53
5 files changed, 30 insertions, 122 deletions
diff --git a/packages/SystemUI/res/drawable/dialog_tri_state_navigation_bg.xml b/packages/SystemUI/res/drawable/dialog_tri_state_navigation_bg.xml
deleted file mode 100644
index 93011a323a5b..000000000000
--- a/packages/SystemUI/res/drawable/dialog_tri_state_navigation_bg.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 CypherOS
-
- 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.
--->
-<layer-list
- xmlns:android="http://schemas.android.com/apk/res/android">
- <item>
- <shape>
- <solid android:color="#e6208de3" />
- <corners
- android:topLeftRadius="10.0dip"
- android:topRightRadius="10.0dip"
- android:bottomLeftRadius="10.0dip"
- android:bottomRightRadius="10.0dip" />
- </shape>
- </item>
-</layer-list> \ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/dialog_tri_state_triangle_right.xml b/packages/SystemUI/res/drawable/dialog_tri_state_triangle_right.xml
deleted file mode 100644
index ab90683bea54..000000000000
--- a/packages/SystemUI/res/drawable/dialog_tri_state_triangle_right.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 CypherOS
-
- 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.
--->
-<layer-list
- xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/shape_id" android:height="42.0px">
- <rotate android:layout_width="fill_parent" android:layout_height="wrap_content" android:fromDegrees="45.0" android:pivotX="0.0%" android:pivotY="0.0%">
- <shape android:shape="rectangle">
- <solid android:color="#ff000000" />
- <size android:height="29.695984px" android:width="29.695984px" />
- </shape>
- </rotate>
- </item>
-</layer-list> \ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/dialog_tri_state_triangle_top.xml b/packages/SystemUI/res/drawable/dialog_tri_state_triangle_top.xml
deleted file mode 100644
index e8566465d61b..000000000000
--- a/packages/SystemUI/res/drawable/dialog_tri_state_triangle_top.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 CypherOS
-
- 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.
--->
-<layer-list
- xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/shape_id" android:width="42.0px">
- <rotate android:layout_width="fill_parent" android:layout_height="wrap_content" android:fromDegrees="45.0" android:pivotX="0.0%" android:pivotY="100.0%">
- <shape android:shape="rectangle">
- <solid android:color="#ff000000" />
- <size android:height="29.695984px" android:width="29.695984px" />
- </shape>
- </rotate>
- </item>
-</layer-list> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/tri_state_dialog.xml b/packages/SystemUI/res/layout/tri_state_dialog.xml
index 177ed9b80521..cf3890d59a88 100644
--- a/packages/SystemUI/res/layout/tri_state_dialog.xml
+++ b/packages/SystemUI/res/layout/tri_state_dialog.xml
@@ -31,32 +31,30 @@
android:id="@+id/tri_state_layout"
android:background="@drawable/dialog_tri_state_middle_bg"
android:layout_width="wrap_content"
- android:layout_height="126.0px"
- android:translationZ="5.0px">
+ android:layout_height="48.0dip"
+ android:translationZ="@dimen/tri_state_dialog_elevation">
<FrameLayout
- android:layout_width="126.0px"
+ android:layout_width="54.0dip"
android:layout_height="fill_parent">
<ImageView
android:layout_gravity="center"
android:id="@+id/tri_state_icon"
- android:layout_width="63.0px"
- android:layout_height="63.0px" />
+ android:layout_marginLeft="2.0dip"
+ android:layout_width="@dimen/tri_state_dialog_icon_size"
+ android:layout_height="@dimen/tri_state_dialog_icon_size" />
</FrameLayout>
<TextView
- android:textSize="34.125px"
- android:textColor="#ffffffff"
android:gravity="center_vertical"
android:id="@+id/tri_state_text"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
- android:text="slience"
style="@style/TriStateUiText" />
<FrameLayout
- android:layout_width="63.0px"
+ android:layout_width="18.0dip"
android:layout_height="fill_parent" />
</LinearLayout>
</LinearLayout> \ No newline at end of file
diff --git a/packages/SystemUI/res/values/pa_dimens.xml b/packages/SystemUI/res/values/pa_dimens.xml
index fdc1b75dc5e6..8455b40a0ab2 100644
--- a/packages/SystemUI/res/values/pa_dimens.xml
+++ b/packages/SystemUI/res/values/pa_dimens.xml
@@ -17,35 +17,28 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Tri-state UI -->
- <dimen name="tri_state_down_dialog_padding_edge">8.0dip</dimen>
- <dimen name="tri_state_down_dialog_padding_edge_deep">21.0px</dimen>
- <dimen name="tri_state_down_dialog_position">423.0px</dimen>
- <dimen name="tri_state_down_dialog_position_l">270.375px</dimen>
- <dimen name="tri_state_middle_dialog_position">296.0px</dimen>
- <dimen name="tri_state_middle_dialog_position_l">270.375px</dimen>
- <dimen name="tri_state_up_dialog_position">165.0px</dimen>
- <item type="dimen" name="tri_state_up_dialog_position_deep">@dimen/tri_state_down_dialog_padding_edge_deep</item>
- <item type="dimen" name="tri_state_up_dialog_position_deep_land">@dimen/tri_state_down_dialog_padding_edge_deep</item>
- <dimen name="tri_state_up_dialog_position_l">270.375px</dimen>
- <dimen name="tri_state_dialog_elevation">2.0dip</dimen>
- <dimen name="tri_state_dialog_icon_out_width">126.0px</dimen>
- <dimen name="tri_state_dialog_icon_size">63.0px</dimen>
- <dimen name="tri_state_dialog_inner_height">126.0px</dimen>
- <dimen name="tri_state_dialog_padding">14.0px</dimen>
- <dimen name="tri_state_dialog_text_size">34.125px</dimen>
- <dimen name="tri_state_dialog_triangle_long">189.0px</dimen>
- <dimen name="tri_state_dialog_triangle_short">63.0px</dimen>
- <dimen name="tri_state_down_bottom_left_radius">63.0px</dimen>
- <dimen name="tri_state_down_bottom_right_radius">63.0px</dimen>
- <dimen name="tri_state_down_top_left_radius">63.0px</dimen>
- <dimen name="tri_state_down_top_right_radius">0.0px</dimen>
- <dimen name="tri_state_mid_bottom_left_radius">63.0px</dimen>
- <dimen name="tri_state_mid_bottom_right_radius">63.0px</dimen>
- <dimen name="tri_state_mid_top_left_radius">63.0px</dimen>
- <dimen name="tri_state_mid_top_right_radius">63.0px</dimen>
- <dimen name="tri_state_up_bottom_left_radius">63.0px</dimen>
- <dimen name="tri_state_up_bottom_right_radius">0.0px</dimen>
- <dimen name="tri_state_up_top_left_radius">63.0px</dimen>
- <dimen name="tri_state_up_top_right_radius">63.0px</dimen>
+ <dimen name="tri_state_down_dialog_position">0px</dimen>
+ <dimen name="tri_state_down_dialog_position_l">0px</dimen>
+ <dimen name="tri_state_middle_dialog_position">0px</dimen>
+ <dimen name="tri_state_middle_dialog_position_l">0px</dimen>
+ <dimen name="tri_state_up_dialog_position">0px</dimen>
+ <dimen name="tri_state_up_dialog_position_l">0px</dimen>
+ <dimen name="tri_state_up_dialog_position_deep">0px</dimen>
+ <dimen name="tri_state_up_dialog_position_deep_land">0px</dimen>
+ <dimen name="tri_state_dialog_elevation">4.0dip</dimen>
+ <dimen name="tri_state_dialog_icon_size">24.0dip</dimen>
+ <dimen name="tri_state_dialog_padding">8.0dip</dimen>
+ <dimen name="tri_state_down_bottom_left_radius">24.0dip</dimen>
+ <dimen name="tri_state_down_bottom_right_radius">24.0dip</dimen>
+ <dimen name="tri_state_down_top_left_radius">24.0dip</dimen>
+ <dimen name="tri_state_down_top_right_radius">0.0dip</dimen>
+ <dimen name="tri_state_mid_bottom_left_radius">24.0dip</dimen>
+ <dimen name="tri_state_mid_bottom_right_radius">24.0dip</dimen>
+ <dimen name="tri_state_mid_top_left_radius">24.0dip</dimen>
+ <dimen name="tri_state_mid_top_right_radius">24.0dip</dimen>
+ <dimen name="tri_state_up_bottom_left_radius">24.0dip</dimen>
+ <dimen name="tri_state_up_bottom_right_radius">0.0dip</dimen>
+ <dimen name="tri_state_up_top_left_radius">24.0dip</dimen>
+ <dimen name="tri_state_up_top_right_radius">24.0dip</dimen>
</resources>