Tweak ime settings
Bug: 5282046 Change-Id: I8ef3913fc46c00288ac13fbc2a2d447efd531382
This commit is contained in:
@@ -56,10 +56,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@android:id/title"
|
android:layout_below="@android:id/title"
|
||||||
android:layout_alignLeft="@android:id/title"
|
android:layout_alignLeft="@android:id/title"
|
||||||
|
android:paddingBottom="3dip"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:maxLines="4" />
|
android:maxLines="4" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -97,7 +97,19 @@ public class InputMethodPreference extends CheckBoxPreference
|
|||||||
});
|
});
|
||||||
mInputMethodSettingsButton = (ImageView)view.findViewById(R.id.inputmethod_settings);
|
mInputMethodSettingsButton = (ImageView)view.findViewById(R.id.inputmethod_settings);
|
||||||
mTitleText = (TextView)view.findViewById(android.R.id.title);
|
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 = (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) {
|
if (mSettingsIntent != null) {
|
||||||
mInputMethodSettingsButton.setOnClickListener(
|
mInputMethodSettingsButton.setOnClickListener(
|
||||||
new OnClickListener() {
|
new OnClickListener() {
|
||||||
@@ -113,8 +125,6 @@ public class InputMethodPreference extends CheckBoxPreference
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
final boolean hasSubtypes = mImi.getSubtypeCount() > 1;
|
|
||||||
final String imiId = mImi.getId();
|
|
||||||
if (hasSubtypes) {
|
if (hasSubtypes) {
|
||||||
final OnLongClickListener listener = new OnLongClickListener() {
|
final OnLongClickListener listener = new OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -142,8 +152,8 @@ public class InputMethodPreference extends CheckBoxPreference
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void enableSettingsButton() {
|
private void enableSettingsButton() {
|
||||||
if (mInputMethodSettingsButton != null) {
|
|
||||||
final boolean checked = isChecked();
|
final boolean checked = isChecked();
|
||||||
|
if (mInputMethodSettingsButton != null) {
|
||||||
mInputMethodSettingsButton.setEnabled(checked);
|
mInputMethodSettingsButton.setEnabled(checked);
|
||||||
mInputMethodSettingsButton.setClickable(checked);
|
mInputMethodSettingsButton.setClickable(checked);
|
||||||
mInputMethodSettingsButton.setFocusable(checked);
|
mInputMethodSettingsButton.setFocusable(checked);
|
||||||
@@ -155,7 +165,8 @@ public class InputMethodPreference extends CheckBoxPreference
|
|||||||
mTitleText.setEnabled(true);
|
mTitleText.setEnabled(true);
|
||||||
}
|
}
|
||||||
if (mSummaryText != null) {
|
if (mSummaryText != null) {
|
||||||
mSummaryText.setEnabled(true);
|
mSummaryText.setEnabled(checked);
|
||||||
|
mSummaryText.setClickable(checked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user