[更改] 背景显示名称 #460
This commit is contained in:
@@ -29,11 +29,6 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||
class ReadStyleDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_book_style),
|
||||
FontConfigDialog.CallBack {
|
||||
|
||||
sealed class ReadStyleItem {
|
||||
data class ConfigItem(val config: ReadBookConfig.Config) : ReadStyleItem()
|
||||
data object ShareLayoutItem : ReadStyleItem()
|
||||
}
|
||||
|
||||
private val binding by viewBinding(DialogReadBookStyleBinding::bind)
|
||||
private val callBack get() = activity as? ReadBookActivity
|
||||
private lateinit var styleAdapter: StyleAdapter
|
||||
@@ -236,14 +231,14 @@ class ReadStyleDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_book_
|
||||
|
||||
override fun registerListener(holder: ItemViewHolder, binding: ItemReadStyleBinding) {
|
||||
binding.apply {
|
||||
// ivStyle 现在是 MaterialCardView
|
||||
cdStyle.setOnClickListener {
|
||||
changeBgTextConfig(holder.layoutPosition)
|
||||
}
|
||||
|
||||
cdStyle.setOnLongClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
showBgTextConfig(holder.layoutPosition)
|
||||
true // 表示事件已消费
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,9 +27,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:autoSizeMaxTextSize="12sp"
|
||||
android:autoSizeMaxTextSize="10sp"
|
||||
android:autoSizeMinTextSize="6sp"
|
||||
android:autoSizeStepGranularity="1sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
@@ -37,4 +36,5 @@
|
||||
android:singleLine="true"
|
||||
android:text="@string/text" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user