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