Loading packages/SystemUI/accessibility/accessibilitymenu/res/layout/preferences_action_bar.xml 0 → 100644 +29 −0 Original line number Diff line number Diff line <?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. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/action_bar_title" style="@style/TextAppearance.AppCompat.Title" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_vertical" android:maxLines="5"/> </LinearLayout> packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java +9 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.accessibility.accessibilitymenu.activity; import android.app.ActionBar; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; Loading @@ -24,6 +25,7 @@ import android.net.Uri; import android.os.Bundle; import android.provider.Browser; import android.provider.Settings; import android.widget.TextView; import android.view.View; import androidx.annotation.Nullable; Loading @@ -46,6 +48,13 @@ public class A11yMenuSettingsActivity extends FragmentActivity { .beginTransaction() .replace(android.R.id.content, new A11yMenuPreferenceFragment()) .commit(); ActionBar actionBar = getActionBar(); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.preferences_action_bar); ((TextView) findViewById(R.id.action_bar_title)).setText( getResources().getString(R.string.accessibility_menu_settings_name) ); } /** Loading Loading
packages/SystemUI/accessibility/accessibilitymenu/res/layout/preferences_action_bar.xml 0 → 100644 +29 −0 Original line number Diff line number Diff line <?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. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/action_bar_title" style="@style/TextAppearance.AppCompat.Title" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_vertical" android:maxLines="5"/> </LinearLayout>
packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java +9 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.accessibility.accessibilitymenu.activity; import android.app.ActionBar; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; Loading @@ -24,6 +25,7 @@ import android.net.Uri; import android.os.Bundle; import android.provider.Browser; import android.provider.Settings; import android.widget.TextView; import android.view.View; import androidx.annotation.Nullable; Loading @@ -46,6 +48,13 @@ public class A11yMenuSettingsActivity extends FragmentActivity { .beginTransaction() .replace(android.R.id.content, new A11yMenuPreferenceFragment()) .commit(); ActionBar actionBar = getActionBar(); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.preferences_action_bar); ((TextView) findViewById(R.id.action_bar_title)).setText( getResources().getString(R.string.accessibility_menu_settings_name) ); } /** Loading