Make file build pass after copy it to another path.
1. androidx.core.content.res.TypedArrayUtils is not available in another path, remove it from dependency. 2. Sync the xml with androidx preference_material.xml Bug: 138618679 Test: build pass Change-Id: I11df0ccab1289e83bc96cf9778ba58623714db54
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"/>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textAlignment="viewEnd"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="1"
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.res.TypedArrayUtils;
|
||||
import androidx.preference.CheckBoxPreference;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
@@ -58,32 +57,29 @@ public class RadioButtonPreference extends CheckBoxPreference {
|
||||
/**
|
||||
* Perform inflation from XML and apply a class-specific base style.
|
||||
*
|
||||
* @param context The {@link Context} this is associated with, through which it can
|
||||
* access the current theme, resources, {@link SharedPreferences}, etc.
|
||||
* @param attrs The attributes of the XML tag that is inflating the preference
|
||||
* @param defStyleAttr An attribute in the current theme that contains a reference to a style
|
||||
* resource that supplies default values for the view. Can be 0 to not
|
||||
* look for defaults.
|
||||
* @param context The {@link Context} this is associated with, through which it can
|
||||
* access the current theme, resources, {@link SharedPreferences}, etc.
|
||||
* @param attrs The attributes of the XML tag that is inflating the preference
|
||||
* @param defStyle An attribute in the current theme that contains a reference to a style
|
||||
* resource that supplies default values for the view. Can be 0 to not
|
||||
* look for defaults.
|
||||
*/
|
||||
public RadioButtonPreference(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setWidgetLayoutResource(R.layout.preference_widget_radiobutton);
|
||||
setLayoutResource(R.layout.preference_radio);
|
||||
setIconSpaceReserved(false);
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Perform inflation from XML and apply a class-specific base style.
|
||||
*
|
||||
* @param context The {@link Context} this is associated with, through which it can
|
||||
* access the current theme, resources, {@link SharedPreferences}, etc.
|
||||
* @param attrs The attributes of the XML tag that is inflating the preference
|
||||
* @param context The {@link Context} this is associated with, through which it can
|
||||
* access the current theme, resources, {@link SharedPreferences}, etc.
|
||||
* @param attrs The attributes of the XML tag that is inflating the preference
|
||||
*/
|
||||
public RadioButtonPreference(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, TypedArrayUtils.getAttr(context,
|
||||
androidx.preference.R.attr.preferenceStyle,
|
||||
android.R.attr.preferenceStyle));
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,4 +154,10 @@ public class RadioButtonPreference extends CheckBoxPreference {
|
||||
}
|
||||
mAppendixVisibility = visibility;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
setWidgetLayoutResource(R.layout.preference_widget_radiobutton);
|
||||
setLayoutResource(R.layout.preference_radio);
|
||||
setIconSpaceReserved(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user