调整"我的"UI

pull/167/head
yangyxd 5 years ago
parent 201fbe843e
commit 71ac26980c
  1. 2
      app/src/main/java/io/legado/app/ui/widget/prefs/ColorPreference.kt
  2. 66
      app/src/main/res/layout/view_preference_s.xml

@ -47,7 +47,7 @@ class ColorPreference(context: Context, attrs: AttributeSet) : Preference(contex
init {
isPersistent = true
layoutResource = io.legado.app.R.layout.view_preference_s
layoutResource = io.legado.app.R.layout.view_preference
val a = context.obtainStyledAttributes(attrs, R.styleable.ColorPreference)
showDialog = a.getBoolean(R.styleable.ColorPreference_cpv_showDialog, true)

@ -1,66 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/bg_prefs_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingTop="10dp"
android:paddingRight="16dp"
android:paddingBottom="4dp"
android:minHeight="42dp"
android:clickable="true"
android:orientation="horizontal" >
<ImageView android:id="@+id/preference_icon"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_marginRight="16dp"
android:scaleType="fitCenter"
android:visibility="visible"
android:paddingTop="1dp"
android:layout_width="24dp"
android:layout_height="24dp" />
<LinearLayout
android:orientation="vertical"
android:layout_weight="1.0"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/preference_title"
android:paddingBottom="8dp"
android:singleLine="true"
android:textSize="16sp"
android:text="@string/title"
android:textColor="@color/tv_text_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/preference_desc"
android:paddingBottom="8dp"
android:singleLine="true"
android:textSize="14sp"
android:textColor="@color/tv_text_summary"
android:text="@string/default1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<FrameLayout
android:id="@+id/preference_widget"
android:layout_gravity="center"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:gravity="right|center_vertical"
android:layout_width="32dp"
android:layout_height="32dp">
</FrameLayout>
</LinearLayout>
Loading…
Cancel
Save