Tweak ime settings
Bug: 5282046
Change-Id: I8ef3913fc46c00288ac13fbc2a2d447efd531382
diff --git a/res/layout/preference_inputmethod.xml b/res/layout/preference_inputmethod.xml
index 0e0c1ef..f1bd0a0 100644
--- a/res/layout/preference_inputmethod.xml
+++ b/res/layout/preference_inputmethod.xml
@@ -56,10 +56,12 @@
android:layout_height="wrap_content"
android:layout_below="@android:id/title"
android:layout_alignLeft="@android:id/title"
+ android:paddingBottom="3dip"
android:visibility="gone"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="13sp"
android:textColor="?android:attr/textColorSecondary"
+ android:background="?android:attr/selectableItemBackground"
android:maxLines="4" />
</RelativeLayout>
</LinearLayout>
diff --git a/src/com/android/settings/inputmethod/InputMethodPreference.java b/src/com/android/settings/inputmethod/InputMethodPreference.java
index f490fd2..5cc7ad0 100644
--- a/src/com/android/settings/inputmethod/InputMethodPreference.java
+++ b/src/com/android/settings/inputmethod/InputMethodPreference.java
@@ -97,7 +97,19 @@
});
mInputMethodSettingsButton = (ImageView)view.findViewById(R.id.inputmethod_settings);
mTitleText = (TextView)view.findViewById(android.R.id.title);
+
+ final boolean hasSubtypes = mImi.getSubtypeCount() > 1;
+ final String imiId = mImi.getId();
mSummaryText = (TextView)view.findViewById(android.R.id.summary);
+ mSummaryText.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View arg0) {
+ final Bundle bundle = new Bundle();
+ bundle.putString(Settings.EXTRA_INPUT_METHOD_ID, imiId);
+ startFragment(mFragment, InputMethodAndSubtypeEnabler.class.getName(),
+ 0, bundle);
+ }
+ });
if (mSettingsIntent != null) {
mInputMethodSettingsButton.setOnClickListener(
new OnClickListener() {
@@ -113,8 +125,6 @@
}
});
}
- final boolean hasSubtypes = mImi.getSubtypeCount() > 1;
- final String imiId = mImi.getId();
if (hasSubtypes) {
final OnLongClickListener listener = new OnLongClickListener() {
@Override
@@ -142,8 +152,8 @@
}
private void enableSettingsButton() {
+ final boolean checked = isChecked();
if (mInputMethodSettingsButton != null) {
- final boolean checked = isChecked();
mInputMethodSettingsButton.setEnabled(checked);
mInputMethodSettingsButton.setClickable(checked);
mInputMethodSettingsButton.setFocusable(checked);
@@ -155,7 +165,8 @@
mTitleText.setEnabled(true);
}
if (mSummaryText != null) {
- mSummaryText.setEnabled(true);
+ mSummaryText.setEnabled(checked);
+ mSummaryText.setClickable(checked);
}
}