Fix the behavior of preference in IME Settings
Change-Id: I41f7c36fb73730248dcc98abbf4276ef6d772f36
This commit is contained in:
@@ -104,16 +104,18 @@ public class InputMethodPreference extends CheckBoxPreference
|
|||||||
mSummaryText = (TextView)view.findViewById(android.R.id.summary);
|
mSummaryText = (TextView)view.findViewById(android.R.id.summary);
|
||||||
final boolean hasSubtypes = mImi.getSubtypeCount() > 1;
|
final boolean hasSubtypes = mImi.getSubtypeCount() > 1;
|
||||||
final String imiId = mImi.getId();
|
final String imiId = mImi.getId();
|
||||||
mInputMethodPref.setOnLongClickListener(new OnLongClickListener() {
|
if (hasSubtypes) {
|
||||||
@Override
|
mInputMethodPref.setOnLongClickListener(new OnLongClickListener() {
|
||||||
public boolean onLongClick(View arg0) {
|
@Override
|
||||||
final Bundle bundle = new Bundle();
|
public boolean onLongClick(View arg0) {
|
||||||
bundle.putString(Settings.EXTRA_INPUT_METHOD_ID, imiId);
|
final Bundle bundle = new Bundle();
|
||||||
startFragment(mFragment, InputMethodAndSubtypeEnabler.class.getName(),
|
bundle.putString(Settings.EXTRA_INPUT_METHOD_ID, imiId);
|
||||||
0, bundle);
|
startFragment(mFragment, InputMethodAndSubtypeEnabler.class.getName(),
|
||||||
return true;
|
0, bundle);
|
||||||
}
|
return true;
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (mSettingsIntent != null) {
|
if (mSettingsIntent != null) {
|
||||||
mInputMethodSettingsButton.setOnClickListener(
|
mInputMethodSettingsButton.setOnClickListener(
|
||||||
|
Reference in New Issue
Block a user