Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 124f0199 authored by Mill Chen's avatar Mill Chen
Browse files

Set a title for personal dictionary

After the collapsing toolbar layout is applied to subsetting pages, the
title of the personal dictionary page won't be shown. This CL is to set
a title for the personal dictionary page.

Bug: 176897229
Test: manual test and visual verified
1) Navigate to Settings -> System -> Languages & input -> Personal
dictionary
2) Enable collapsing toolbar feature
3) Observe and check if the title is shown as normal

Change-Id: I0b6488bc2c8040b275ba0d5348d09aa4bad905d1
parent 90c976b8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.database.Cursor;
import android.os.Bundle;
import android.provider.UserDictionary;
import android.text.TextUtils;
import android.util.FeatureFlagUtils;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -44,6 +45,7 @@ import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;

import com.android.settings.R;
import com.android.settings.core.FeatureFlags;
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.core.instrumentation.Instrumentable;
@@ -104,6 +106,10 @@ public class UserDictionarySettings extends ListFragment implements Instrumentab
    @Override
    public View onCreateView(
            LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO(b/176883483): Remove the title after material component updated
        if (FeatureFlagUtils.isEnabled(getContext(), FeatureFlags.SILKY_HOME)) {
            getActivity().setTitle(R.string.user_dict_settings_title);
        }
        // Show the language as a subtitle of the action bar
        final ActionBar actionBar = getActivity().getActionBar();
        if (actionBar != null) {