Merge "Align the "Open activity" UI style with usual accessibility service "Use service"" into sc-v2-dev am: 5c90a9c225 am: 8216c769a9

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16321718

Change-Id: I7fdcacbe0cc5939d84e08c5e220ef85956cf2ba8
This commit is contained in:
Jason Hsu
2021-12-02 11:42:11 +00:00
committed by Automerger Merge Worker
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:minHeight="@dimen/settingslib_min_switch_bar_height"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="@dimen/settingslib_switchbar_margin"
android:paddingStart="@dimen/settingslib_switchbar_padding_left"
android:paddingEnd="@dimen/settingslib_switchbar_padding_right"
android:background="@drawable/settingslib_switch_bar_bg_on">
<TextView
android:id="@android:id/title"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginEnd="@dimen/settingslib_switch_title_margin"
android:layout_marginVertical="@dimen/settingslib_switch_title_margin"
android:layout_gravity="center_vertical"
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceListItem"
style="@style/MainSwitchText.Settingslib" />
</LinearLayout>

View File

@@ -150,6 +150,7 @@ public class LaunchAccessibilityActivityPreferenceFragment extends ToggleFeature
private void initLaunchPreference() {
final Preference launchPreference = new Preference(getPrefContext());
launchPreference.setLayoutResource(R.layout.accessibility_launch_activity_preference);
launchPreference.setKey(KEY_LAUNCH_PREFERENCE);
final AccessibilityShortcutInfo info = getAccessibilityShortcutInfo();