New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (1/n).
Create preference fragment layout. Bug: 211503117 Test: manual test Change-Id: I16c01476b75c2eb6d83759233d4cc29bddfcd4a7
This commit is contained in:
@@ -38,10 +38,11 @@
|
||||
|
||||
<!-- After completely finishing the Text and reading options feature, it will be visible. -->
|
||||
<Preference
|
||||
android:fragment="com.android.settings.accessibility.TextReadingPreferenceFragment"
|
||||
android:icon="@drawable/ic_adaptive_font_download"
|
||||
android:key="text_reading_options"
|
||||
android:persistent="false"
|
||||
android:title="@strings/accessibility_text_reading_options_title"
|
||||
android:title="@string/accessibility_text_reading_options_title"
|
||||
settings:isPreferenceVisible="false"/>
|
||||
|
||||
<Preference
|
||||
|
22
res/xml/accessibility_text_reading_options.xml
Normal file
22
res/xml/accessibility_text_reading_options.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:persistent="false"
|
||||
android:title="@string/accessibility_text_reading_options_title">
|
||||
</PreferenceScreen>
|
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.android.settings.accessibility;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
/**
|
||||
* Accessibility settings for adjusting the system features which are related to the reading. For
|
||||
* example, bold text, high contrast text, display size, font size and so on.
|
||||
*/
|
||||
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
|
||||
public class TextReadingPreferenceFragment extends DashboardFragment {
|
||||
private static final String TAG = "TextReadingPreferenceFragment";
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.accessibility_text_reading_options;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLogTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.ACCESSIBILITY_TEXT_READING_OPTIONS;
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.accessibility_text_reading_options);
|
||||
}
|
Reference in New Issue
Block a user