Merge "Set a pane title on the some a11y windows' root views"
This commit is contained in:
@@ -24,6 +24,7 @@ import android.content.Context;
|
|||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.IntDef;
|
import androidx.annotation.IntDef;
|
||||||
@@ -104,6 +105,16 @@ public class TextReadingPreferenceFragment extends DashboardFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
final View rootView = getActivity().getWindow().peekDecorView();
|
||||||
|
if (rootView != null) {
|
||||||
|
rootView.setAccessibilityPaneTitle(getString(
|
||||||
|
R.string.accessibility_text_reading_options_title));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getPreferenceScreenResId() {
|
protected int getPreferenceScreenResId() {
|
||||||
return R.xml.accessibility_text_reading_options;
|
return R.xml.accessibility_text_reading_options;
|
||||||
|
@@ -44,6 +44,16 @@ public class ToggleColorInversionPreferenceFragment extends ToggleFeaturePrefere
|
|||||||
|
|
||||||
private static final String ENABLED = Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED;
|
private static final String ENABLED = Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
final View rootView = getActivity().getWindow().peekDecorView();
|
||||||
|
if (rootView != null) {
|
||||||
|
rootView.setAccessibilityPaneTitle(getString(
|
||||||
|
R.string.accessibility_display_inversion_preference_title));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetricsCategory() {
|
public int getMetricsCategory() {
|
||||||
return SettingsEnums.ACCESSIBILITY_COLOR_INVERSION_SETTINGS;
|
return SettingsEnums.ACCESSIBILITY_COLOR_INVERSION_SETTINGS;
|
||||||
|
@@ -73,6 +73,16 @@ public final class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePrefe
|
|||||||
return sControllers;
|
return sControllers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
final View rootView = getActivity().getWindow().peekDecorView();
|
||||||
|
if (rootView != null) {
|
||||||
|
rootView.setAccessibilityPaneTitle(getString(
|
||||||
|
R.string.accessibility_display_daltonizer_preference_title));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(Preference preference) {
|
public void onCheckedChanged(Preference preference) {
|
||||||
for (AbstractPreferenceController controller : sControllers) {
|
for (AbstractPreferenceController controller : sControllers) {
|
||||||
|
Reference in New Issue
Block a user