Merge "Fix Language & Input Settings layouts padding"
This commit is contained in:
committed by
Android (Google) Code Review
commit
4809acffc5
@@ -18,8 +18,11 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/inputmethod_pref"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -29,12 +32,14 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -42,6 +47,7 @@
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_marginBottom="6dip"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -50,6 +56,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -63,14 +70,18 @@
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:focusable="false"
|
||||
android:maxLines="4" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="2dip"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dip"
|
||||
android:layout_marginBottom="5dip"
|
||||
android:background="@android:drawable/divider_horizontal_dark" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/inputmethod_settings"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -83,4 +94,5 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -37,8 +37,22 @@ public class CheckBoxAndSettingsPreference extends CheckBoxPreference {
|
||||
private ImageView mSettingsButton;
|
||||
private Intent mSettingsIntent;
|
||||
|
||||
public CheckBoxAndSettingsPreference(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public CheckBoxAndSettingsPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public CheckBoxAndSettingsPreference(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
this(context, attrs, defStyleAttr, 0);
|
||||
}
|
||||
|
||||
public CheckBoxAndSettingsPreference(Context context, AttributeSet attrs, int defStyleAttr,
|
||||
int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
|
||||
setLayoutResource(R.layout.preference_inputmethod);
|
||||
setWidgetLayoutResource(R.layout.preference_inputmethod_widget);
|
||||
}
|
||||
|
@@ -21,10 +21,24 @@ import android.util.AttributeSet;
|
||||
import android.view.textservice.TextServicesManager;
|
||||
|
||||
public class SpellCheckersPreference extends CheckBoxAndSettingsPreference {
|
||||
private final TextServicesManager mTsm;
|
||||
private TextServicesManager mTsm;
|
||||
|
||||
public SpellCheckersPreference(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public SpellCheckersPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public SpellCheckersPreference(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
this(context, attrs, defStyleAttr, 0);
|
||||
}
|
||||
|
||||
public SpellCheckersPreference(Context context, AttributeSet attrs, int defStyleAttr,
|
||||
int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
|
||||
mTsm = (TextServicesManager) context.getSystemService(
|
||||
Context.TEXT_SERVICES_MANAGER_SERVICE);
|
||||
setChecked(mTsm.isSpellCheckerEnabled());
|
||||
|
Reference in New Issue
Block a user