pull/34/head
kunfei 5 years ago
parent 27860a0f98
commit 950395ca74
  1. 6
      app/src/main/java/io/legado/app/ui/widget/KeyboardToolPop.kt
  2. 6
      app/src/main/res/layout/item_text.xml

@ -43,8 +43,10 @@ class KeyboardToolPop(
SimpleRecyclerAdapter<String>(context, R.layout.item_text) { SimpleRecyclerAdapter<String>(context, R.layout.item_text) {
override fun convert(holder: ItemViewHolder, item: String, payloads: MutableList<Any>) { override fun convert(holder: ItemViewHolder, item: String, payloads: MutableList<Any>) {
holder.itemView.text_view.text = item with(holder.itemView) {
holder.itemView.onClick { onClickListener?.click(item) } text_view.text = item
onClick { onClickListener?.click(item) }
}
} }
} }

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/text_view" android:id="@+id/text_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="3dp" android:layout_margin="3dp"
android:background="@drawable/shape_card_view" android:background="@drawable/selector_fillet_btn_bg"
android:clickable="true" android:clickable="true"
android:ellipsize="end" android:ellipsize="end"
android:focusable="true" android:focusable="true"
@ -12,4 +13,5 @@
android:padding="5dp" android:padding="5dp"
android:singleLine="true" android:singleLine="true"
android:textColor="@color/tv_text_default" android:textColor="@color/tv_text_default"
android:textSize="14sp" /> android:textSize="14sp"
tools:ignore="UnusedAttribute" />

Loading…
Cancel
Save