Skip to content
Snippets Groups Projects
Commit ba1390f9 authored by satok's avatar satok Committed by Android (Google) Code Review
Browse files

Merge "Use InputMethodSettingsFragment"

parents d719fe1f 1a3bb54b
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ LOCAL_CERTIFICATE := shared
LOCAL_JNI_SHARED_LIBRARIES := libjni_latinime
LOCAL_STATIC_JAVA_LIBRARIES := android-common
LOCAL_STATIC_JAVA_LIBRARIES += inputmethod-common
# Do not compress dictionary files to mmap dict data runtime
LOCAL_AAPT_FLAGS := -0 .dict
......
......@@ -304,6 +304,9 @@
<!-- Title for input language selection screen -->
<string name="language_selection_title">Input languages</string>
<!-- Preference for input language selection -->
<string name="select_language">Select input languages</string>
<!-- Add to dictionary hint -->
<string name="hint_add_to_dictionary">\u2190 Touch again to save</string>
......
......@@ -21,6 +21,7 @@ import com.android.inputmethod.compat.InputMethodManagerCompatWrapper;
import com.android.inputmethod.compat.InputMethodServiceCompatWrapper;
import com.android.inputmethod.deprecated.VoiceProxy;
import com.android.inputmethod.compat.VibratorCompatWrapper;
import com.android.inputmethodcommon.InputMethodSettingsFragment;
import android.app.Activity;
import android.app.AlertDialog;
......@@ -49,7 +50,7 @@ import android.widget.TextView;
import java.util.Arrays;
import java.util.Locale;
public class Settings extends PreferenceActivity
public class Settings extends InputMethodSettingsFragment
implements SharedPreferences.OnSharedPreferenceChangeListener,
DialogInterface.OnDismissListener, OnPreferenceClickListener {
private static final String TAG = "Settings";
......@@ -331,6 +332,8 @@ public class Settings extends PreferenceActivity
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setInputMethodSettingsCategoryTitle(R.string.language_selection_title);
setSubtypeEnablerTitle(R.string.select_language);
final Resources res = getResources();
final Context context = getActivityInternal();
......
......@@ -16,5 +16,15 @@
package com.android.inputmethod.latin;
public class SettingsActivity extends Settings {
import android.content.Intent;
import android.preference.PreferenceActivity;
public class SettingsActivity extends PreferenceActivity {
@Override
public Intent getIntent() {
final Intent modIntent = new Intent(super.getIntent());
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, Settings.class.getName());
modIntent.putExtra(EXTRA_NO_HEADERS, true);
return modIntent;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment