Merge "Remove dependency on ChooserActivity resources" into udc-qpr-dev
This commit is contained in:
34
res/drawable/action_button_bg.xml
Normal file
34
res/drawable/action_button_bg.xml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (C) 2023 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="?android:attr/colorControlHighlight">
|
||||||
|
<item>
|
||||||
|
<inset
|
||||||
|
android:insetLeft="0dp"
|
||||||
|
android:insetTop="8dp"
|
||||||
|
android:insetRight="0dp"
|
||||||
|
android:insetBottom="8dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<stroke android:width="1dp"
|
||||||
|
android:color="?androidprv:attr/colorAccentPrimaryVariant"/>
|
||||||
|
</shape>
|
||||||
|
</inset>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
|
|
32
res/layout/action_button.xml
Normal file
32
res/layout/action_button.xml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!--
|
||||||
|
~ Copyright (C) 2023 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:paddingEnd="12dp"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:maxWidth="192dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:background="@drawable/action_button_bg"
|
||||||
|
android:drawableTint="?android:attr/textColorPrimary"
|
||||||
|
android:drawableTintMode="src_in"
|
||||||
|
style="?android:attr/borderlessButtonStyle"
|
||||||
|
/>
|
||||||
|
|
@@ -410,6 +410,9 @@
|
|||||||
<!-- Margin for SD card setup completion Image -->
|
<!-- Margin for SD card setup completion Image -->
|
||||||
<dimen name="setup_completion_margin_top">88dp</dimen>
|
<dimen name="setup_completion_margin_top">88dp</dimen>
|
||||||
|
|
||||||
|
<!-- QR code action button -->
|
||||||
|
<dimen name="action_button_icon_size">18dp</dimen>
|
||||||
|
|
||||||
<!-- Biometrics Face enroll education dimensions-->
|
<!-- Biometrics Face enroll education dimensions-->
|
||||||
<dimen name="face_enroll_icon_large_width">300dp</dimen>
|
<dimen name="face_enroll_icon_large_width">300dp</dimen>
|
||||||
<dimen name="face_enroll_icon_large_height">300dp</dimen>
|
<dimen name="face_enroll_icon_large_height">300dp</dimen>
|
||||||
|
@@ -223,11 +223,9 @@ public class WifiDppQrCodeGeneratorFragment extends WifiDppQrCodeBaseFragment {
|
|||||||
|
|
||||||
private Button createActionButton(Drawable icon, CharSequence title, View.OnClickListener r) {
|
private Button createActionButton(Drawable icon, CharSequence title, View.OnClickListener r) {
|
||||||
final Button b = (Button) LayoutInflater.from(getContext()).inflate(
|
final Button b = (Button) LayoutInflater.from(getContext()).inflate(
|
||||||
com.android.internal.R.layout.chooser_action_button, null);
|
R.layout.action_button, null);
|
||||||
if (icon != null) {
|
if (icon != null) {
|
||||||
final int size = getResources()
|
final int size = getResources().getDimensionPixelSize(R.dimen.action_button_icon_size);
|
||||||
.getDimensionPixelSize(
|
|
||||||
com.android.internal.R.dimen.chooser_action_button_icon_size);
|
|
||||||
icon.setBounds(0, 0, size, size);
|
icon.setBounds(0, 0, size, size);
|
||||||
b.setCompoundDrawablesRelative(icon, null, null, null);
|
b.setCompoundDrawablesRelative(icon, null, null, null);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user