Merge "Style fixes for mini resolver" into tm-dev am: 2f6f3aa732 am: 1a9ac652f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18343548 Change-Id: Ie1f79ede14a4f6861180aa68108910da6e643f82 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -642,7 +642,8 @@ public class ResolverActivity extends Activity implements
|
|||||||
|
|
||||||
if (shouldUseMiniResolver()) {
|
if (shouldUseMiniResolver()) {
|
||||||
View buttonContainer = findViewById(R.id.button_bar_container);
|
View buttonContainer = findViewById(R.id.button_bar_container);
|
||||||
buttonContainer.setPadding(0, 0, 0, mSystemWindowInsets.bottom);
|
buttonContainer.setPadding(0, 0, 0, mSystemWindowInsets.bottom
|
||||||
|
+ getResources().getDimensionPixelOffset(R.dimen.resolver_button_bar_spacing));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Need extra padding so the list can fully scroll up
|
// Need extra padding so the list can fully scroll up
|
||||||
|
|||||||
20
core/res/res/color-night/resolver_button_text.xml
Normal file
20
core/res/res/color-night/resolver_button_text.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<!--
|
||||||
|
~ Copyright (C) 2022 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||||
|
<item android:color="?androidprv:attr/textColorPrimaryInverse" />
|
||||||
|
</selector>
|
||||||
20
core/res/res/color/resolver_button_text.xml
Normal file
20
core/res/res/color/resolver_button_text.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<!--
|
||||||
|
~ Copyright (C) 2022 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||||
|
<item android:color="?androidprv:attr/textColorPrimary" />
|
||||||
|
</selector>
|
||||||
40
core/res/res/drawable/resolver_button_bg.xml
Normal file
40
core/res/res/drawable/resolver_button_bg.xml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
~ Copyright (C) 2022 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.
|
||||||
|
-->
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||||
|
android:color="@color/resolver_accent_ripple">
|
||||||
|
|
||||||
|
<item android:id="@android:id/mask">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
<solid android:color="@color/resolver_accent_ripple" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<inset
|
||||||
|
android:insetLeft="0dp"
|
||||||
|
android:insetTop="6dp"
|
||||||
|
android:insetRight="0dp"
|
||||||
|
android:insetBottom="6dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
<solid android:color="@color/resolver_profile_tab_selected_bg" />
|
||||||
|
</shape>
|
||||||
|
</inset>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</ripple>
|
||||||
32
core/res/res/drawable/resolver_outlined_button_bg.xml
Normal file
32
core/res/res/drawable/resolver_outlined_button_bg.xml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (C) 2022 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.
|
||||||
|
-->
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:color="?android:attr/colorControlHighlight">
|
||||||
|
<item>
|
||||||
|
<inset
|
||||||
|
android:insetLeft="0dp"
|
||||||
|
android:insetTop="6dp"
|
||||||
|
android:insetRight="0dp"
|
||||||
|
android:insetBottom="6dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<stroke android:width="1dp"
|
||||||
|
android:color="?android:attr/colorAccentPrimaryVariant"/>
|
||||||
|
</shape>
|
||||||
|
</inset>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
@@ -36,10 +36,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/icon"
|
android:id="@+id/icon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="48dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="48dp"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -76,9 +77,8 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layoutDirection="locale"
|
android:layoutDirection="locale"
|
||||||
android:measureWithLargestChild="true"
|
android:measureWithLargestChild="true"
|
||||||
android:paddingBottom="@dimen/resolver_button_bar_spacing"
|
android:paddingHorizontal="16dp"
|
||||||
android:paddingStart="@dimen/resolver_edge_margin"
|
android:paddingBottom="2dp"
|
||||||
android:paddingEnd="@dimen/resolver_small_margin"
|
|
||||||
android:elevation="@dimen/resolver_elevation">
|
android:elevation="@dimen/resolver_elevation">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -87,7 +87,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
android:background="@drawable/resolver_outlined_button_bg"
|
||||||
|
style="?android:attr/borderlessButtonStyle"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:fontFamily="@android:string/config_headlineFontFamilyMedium"
|
android:fontFamily="@android:string/config_headlineFontFamilyMedium"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:text="@string/activity_resolver_use_once"
|
android:text="@string/activity_resolver_use_once"
|
||||||
@@ -96,12 +98,15 @@
|
|||||||
<Button
|
<Button
|
||||||
android:id="@+id/button_open"
|
android:id="@+id/button_open"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
style="@android:style/Widget.DeviceDefault.Button.Colored"
|
android:paddingHorizontal="16dp"
|
||||||
|
android:background="@drawable/resolver_button_bg"
|
||||||
|
style="?android:attr/borderlessButtonStyle"
|
||||||
android:fontFamily="@android:string/config_headlineFontFamilyMedium"
|
android:fontFamily="@android:string/config_headlineFontFamilyMedium"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:layout_height="wrap_content"
|
android:textColor="@color/resolver_button_text"
|
||||||
android:text="@string/whichViewApplicationLabel"
|
android:text="@string/whichViewApplicationLabel"
|
||||||
/>
|
/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user