feat: 优化代码

pull/159/head
kunfei 5 years ago
parent d0b0a9c749
commit 9bbad137bb
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt
  2. 11
      app/src/main/res/layout/popup_action_menu.xml

@ -50,7 +50,6 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
contentView.apply {
iv_menu_more.setImageResource(R.drawable.ic_more_vert)
recycler_view_top.gone()
recycler_view_bottom.gone()
adapter.setItems(menu.visibleItems)
recycler_view.visible()
}
@ -77,7 +76,6 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
} else {
iv_menu_more.setImageResource(R.drawable.ic_more_vert)
recycler_view_top.gone()
recycler_view_bottom.gone()
adapter.setItems(menu.visibleItems)
recycler_view.visible()
}

@ -43,16 +43,5 @@
app:layout_constraintBottom_toTopOf="@+id/iv_menu_more"
app:layout_constraintRight_toRightOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_menu_more"
app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

Loading…
Cancel
Save