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:
Matt Casey
2022-05-18 22:13:48 +00:00
committed by Automerger Merge Worker
6 changed files with 127 additions and 9 deletions

View File

@@ -642,7 +642,8 @@ public class ResolverActivity extends Activity implements
if (shouldUseMiniResolver()) {
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

View 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>

View 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>

View 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>

View 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>

View File

@@ -36,10 +36,11 @@
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:scaleType="fitCenter"
/>
<TextView
@@ -76,9 +77,8 @@
android:orientation="horizontal"
android:layoutDirection="locale"
android:measureWithLargestChild="true"
android:paddingBottom="@dimen/resolver_button_bar_spacing"
android:paddingStart="@dimen/resolver_edge_margin"
android:paddingEnd="@dimen/resolver_small_margin"
android:paddingHorizontal="16dp"
android:paddingBottom="2dp"
android:elevation="@dimen/resolver_elevation">
<Button
@@ -87,7 +87,9 @@
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
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:textAllCaps="false"
android:text="@string/activity_resolver_use_once"
@@ -96,12 +98,15 @@
<Button
android:id="@+id/button_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
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:textAllCaps="false"
android:layout_height="wrap_content"
android:textColor="@color/resolver_button_text"
android:text="@string/whichViewApplicationLabel"
/>
</RelativeLayout>