Merge "Multiline AccessibilityMenu settings page title" into udc-dev
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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>
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user