[Material Next] Update accessibility tool footer style
1. Implement API extends Material Next FooterBarPreference and support Accessibility API for icons 2. Apply solutions to accessibility tools and framework tools in accessibility settings page. 3. Apply DashboardFragment for Caption preference for xml parser Bug: 185973304 Test: make RunSettingsRoboTests -j52 Change-Id: I6b80bc80190d6666e3fbcd462442a9f2c0e60bba
This commit is contained in:
@@ -26,18 +26,19 @@ import android.view.accessibility.CaptioningManager;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
/** Settings fragment containing more options of captioning properties. */
|
||||
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
|
||||
public class CaptionMoreOptionsFragment extends SettingsPreferenceFragment
|
||||
public class CaptionMoreOptionsFragment extends DashboardFragment
|
||||
implements Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String TAG = "CaptionMoreOptionsFragment";
|
||||
private static final String PREF_LOCALE = "captioning_locale";
|
||||
|
||||
private CaptioningManager mCaptioningManager;
|
||||
|
||||
private LocalePreference mLocale;
|
||||
|
||||
@Override
|
||||
@@ -46,17 +47,26 @@ public class CaptionMoreOptionsFragment extends SettingsPreferenceFragment
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
super.onCreatePreferences(savedInstanceState, rootKey);
|
||||
|
||||
mCaptioningManager = (CaptioningManager) getSystemService(Context.CAPTIONING_SERVICE);
|
||||
|
||||
addPreferencesFromResource(R.xml.captioning_more_options);
|
||||
initializeAllPreferences();
|
||||
updateAllPreferences();
|
||||
installUpdateListeners();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.captioning_more_options;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLogTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
private void initializeAllPreferences() {
|
||||
mLocale = (LocalePreference) findPreference(PREF_LOCALE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user