Use InputMethodSettingsFragment
Bug: 4979539 Change-Id: I4f2010f785eb29ccd42b488c402ef9957633e0c2main
parent
6ec10e53a4
commit
1a3bb54bb4
|
@ -12,6 +12,7 @@ LOCAL_CERTIFICATE := shared
|
||||||
LOCAL_JNI_SHARED_LIBRARIES := libjni_latinime
|
LOCAL_JNI_SHARED_LIBRARIES := libjni_latinime
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := android-common
|
LOCAL_STATIC_JAVA_LIBRARIES := android-common
|
||||||
|
LOCAL_STATIC_JAVA_LIBRARIES += inputmethod-common
|
||||||
|
|
||||||
# Do not compress dictionary files to mmap dict data runtime
|
# Do not compress dictionary files to mmap dict data runtime
|
||||||
LOCAL_AAPT_FLAGS := -0 .dict
|
LOCAL_AAPT_FLAGS := -0 .dict
|
||||||
|
|
|
@ -304,6 +304,9 @@
|
||||||
<!-- Title for input language selection screen -->
|
<!-- Title for input language selection screen -->
|
||||||
<string name="language_selection_title">Input languages</string>
|
<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 -->
|
<!-- Add to dictionary hint -->
|
||||||
<string name="hint_add_to_dictionary">\u2190 Touch again to save</string>
|
<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.compat.InputMethodServiceCompatWrapper;
|
||||||
import com.android.inputmethod.deprecated.VoiceProxy;
|
import com.android.inputmethod.deprecated.VoiceProxy;
|
||||||
import com.android.inputmethod.compat.VibratorCompatWrapper;
|
import com.android.inputmethod.compat.VibratorCompatWrapper;
|
||||||
|
import com.android.inputmethodcommon.InputMethodSettingsFragment;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
@ -49,7 +50,7 @@ import android.widget.TextView;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class Settings extends PreferenceActivity
|
public class Settings extends InputMethodSettingsFragment
|
||||||
implements SharedPreferences.OnSharedPreferenceChangeListener,
|
implements SharedPreferences.OnSharedPreferenceChangeListener,
|
||||||
DialogInterface.OnDismissListener, OnPreferenceClickListener {
|
DialogInterface.OnDismissListener, OnPreferenceClickListener {
|
||||||
private static final String TAG = "Settings";
|
private static final String TAG = "Settings";
|
||||||
|
@ -331,6 +332,8 @@ public class Settings extends PreferenceActivity
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
|
setInputMethodSettingsCategoryTitle(R.string.language_selection_title);
|
||||||
|
setSubtypeEnablerTitle(R.string.select_language);
|
||||||
final Resources res = getResources();
|
final Resources res = getResources();
|
||||||
final Context context = getActivityInternal();
|
final Context context = getActivityInternal();
|
||||||
|
|
||||||
|
|
|
@ -16,5 +16,15 @@
|
||||||
|
|
||||||
package com.android.inputmethod.latin;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue