Merge pull request #161 from yangyxd/master

调整发现页面UI
pull/164/head
kunfei 5 years ago committed by GitHub
commit 2322e2ec69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/io/legado/app/ui/main/explore/ExploreAdapter.kt
  2. 7
      app/src/main/res/drawable/bg_find_book_group.xml
  3. 9
      app/src/main/res/drawable/ic_arrow_down.xml
  4. 9
      app/src/main/res/drawable/ic_arrow_right.xml
  5. 2
      app/src/main/res/drawable/shape_fillet_btn.xml
  6. 2
      app/src/main/res/drawable/shape_fillet_btn_press.xml
  7. 5
      app/src/main/res/layout/item_fillet_text.xml
  8. 32
      app/src/main/res/layout/item_find_book.xml

@ -32,7 +32,7 @@ class ExploreAdapter(context: Context, private val scope: CoroutineScope, val ca
tv_name.text = item.bookSourceName
}
if (exIndex == holder.layoutPosition) {
iv_status.setImageResource(R.drawable.ic_remove)
iv_status.setImageResource(R.drawable.ic_arrow_down)
rotate_loading.loadingColor = context.accentColor
rotate_loading.show()
if (scrollTo >= 0) {
@ -68,7 +68,7 @@ class ExploreAdapter(context: Context, private val scope: CoroutineScope, val ca
}
}
} else {
iv_status.setImageResource(R.drawable.ic_add)
iv_status.setImageResource(R.drawable.ic_arrow_right)
rotate_loading.hide()
gl_child.gone()
}

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 角度 -->
<corners android:radius="6dp"/>
<!-- 填充色 -->
<solid android:color="@color/transparent10" />
</shape>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,685.25l-278.62,-278.62 45.25,-45.25L512,594.75l233.38,-233.38 45.25,45.25z"
android:fillColor="#181818"/>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M434.94,790.62l-45.25,-45.25L623.04,512l-233.38,-233.38 45.25,-45.25L713.57,512z"
android:fillColor="#181818"/>
</vector>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="3dp" />
<corners android:radius="16dp" />
<solid android:color="@color/btn_bg_press" />
</shape>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="3dp" />
<corners android:radius="16dp" />
<solid android:color="@color/btn_bg_press_2" />
</shape>

@ -8,7 +8,10 @@
android:background="@drawable/selector_fillet_btn_bg"
android:ellipsize="end"
android:gravity="center"
android:padding="5dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textSize="14sp"

@ -4,8 +4,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="15dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center"
android:orientation="vertical">
@ -17,8 +18,7 @@
android:paddingRight="10dp"
android:paddingTop="6dp"
android:paddingBottom="6dp"
android:layout_margin="4dp"
android:background="@color/btn_bg_press"
android:background="@drawable/bg_find_book_group"
android:orientation="horizontal"
android:gravity="center_vertical">
@ -28,11 +28,21 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
<io.legado.app.ui.widget.anima.RotateLoading
android:id="@+id/rotate_loading"
android:layout_width="20dp"
android:layout_height="20dp"
android:visibility="gone"
android:layout_gravity="center"
android:layout_marginRight="4dp"
app:hide_mode="gone"
app:loading_width="1dp" />
<ImageView
android:id="@+id/iv_status"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_add"
android:src="@drawable/ic_arrow_right"
app:tint="@color/tv_text_secondary"
tools:ignore="ContentDescription" />
@ -41,6 +51,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_gravity="center">
<com.google.android.flexbox.FlexboxLayout
@ -50,21 +62,13 @@
android:clipToPadding="false"
android:overScrollMode="never"
android:padding="3dp"
android:layout_marginTop="8dp"
android:visibility="gone"
app:dividerDrawable="@drawable/shape_space_divider"
app:flexDirection="row"
app:flexWrap="wrap"
app:showDivider="middle" />
<io.legado.app.ui.widget.anima.RotateLoading
android:id="@+id/rotate_loading"
android:layout_width="36dp"
android:layout_height="36dp"
android:visibility="gone"
android:layout_gravity="center"
app:hide_mode="gone"
app:loading_width="2dp" />
</FrameLayout>
</LinearLayout>
Loading…
Cancel
Save