diff --git a/app/src/main/assets/bg/中国红.png b/app/src/main/assets/bg/中国红.png new file mode 100644 index 000000000..32eedc092 Binary files /dev/null and b/app/src/main/assets/bg/中国红.png differ diff --git a/app/src/main/assets/bg/午后沙滩.jpg b/app/src/main/assets/bg/午后沙滩.jpg new file mode 100644 index 000000000..afe088dd9 Binary files /dev/null and b/app/src/main/assets/bg/午后沙滩.jpg differ diff --git a/app/src/main/assets/bg/宁静夜色.jpg b/app/src/main/assets/bg/宁静夜色.jpg new file mode 100644 index 000000000..501a46748 Binary files /dev/null and b/app/src/main/assets/bg/宁静夜色.jpg differ diff --git a/app/src/main/assets/bg/小清新.jpg b/app/src/main/assets/bg/小清新.jpg new file mode 100644 index 000000000..d9f229e1c Binary files /dev/null and b/app/src/main/assets/bg/小清新.jpg differ diff --git a/app/src/main/assets/bg/山水墨影.jpg b/app/src/main/assets/bg/山水墨影.jpg new file mode 100644 index 000000000..588374c68 Binary files /dev/null and b/app/src/main/assets/bg/山水墨影.jpg differ diff --git a/app/src/main/assets/bg/山水画.jpg b/app/src/main/assets/bg/山水画.jpg new file mode 100644 index 000000000..4c85a5b5d Binary files /dev/null and b/app/src/main/assets/bg/山水画.jpg differ diff --git a/app/src/main/assets/bg/护眼漫绿.jpg b/app/src/main/assets/bg/护眼漫绿.jpg new file mode 100644 index 000000000..daf109e8d Binary files /dev/null and b/app/src/main/assets/bg/护眼漫绿.jpg differ diff --git a/app/src/main/assets/bg/新羊皮纸.jpg b/app/src/main/assets/bg/新羊皮纸.jpg new file mode 100644 index 000000000..eec310669 Binary files /dev/null and b/app/src/main/assets/bg/新羊皮纸.jpg differ diff --git a/app/src/main/assets/bg/明媚倾城.jpg b/app/src/main/assets/bg/明媚倾城.jpg new file mode 100644 index 000000000..a68967cf2 Binary files /dev/null and b/app/src/main/assets/bg/明媚倾城.jpg differ diff --git a/app/src/main/assets/bg/浅黄飘带.jpg b/app/src/main/assets/bg/浅黄飘带.jpg new file mode 100644 index 000000000..ed033c057 Binary files /dev/null and b/app/src/main/assets/bg/浅黄飘带.jpg differ diff --git a/app/src/main/assets/bg/深宫魅影.jpg b/app/src/main/assets/bg/深宫魅影.jpg new file mode 100644 index 000000000..27896f0a6 Binary files /dev/null and b/app/src/main/assets/bg/深宫魅影.jpg differ diff --git a/app/src/main/assets/bg/清新.jpg b/app/src/main/assets/bg/清新.jpg new file mode 100644 index 000000000..cd9593da7 Binary files /dev/null and b/app/src/main/assets/bg/清新.jpg differ diff --git a/app/src/main/assets/bg/清新时光.jpg b/app/src/main/assets/bg/清新时光.jpg new file mode 100644 index 000000000..4bdd5aba6 Binary files /dev/null and b/app/src/main/assets/bg/清新时光.jpg differ diff --git a/app/src/main/assets/bg/羊皮纸1.jpg b/app/src/main/assets/bg/羊皮纸1.jpg new file mode 100644 index 000000000..40f397735 Binary files /dev/null and b/app/src/main/assets/bg/羊皮纸1.jpg differ diff --git a/app/src/main/assets/bg/bg1.jpg b/app/src/main/assets/bg/羊皮纸2.jpg similarity index 100% rename from app/src/main/assets/bg/bg1.jpg rename to app/src/main/assets/bg/羊皮纸2.jpg diff --git a/app/src/main/assets/bg/羊皮纸3.jpg b/app/src/main/assets/bg/羊皮纸3.jpg new file mode 100644 index 000000000..31b99a870 Binary files /dev/null and b/app/src/main/assets/bg/羊皮纸3.jpg differ diff --git a/app/src/main/assets/bg/羊皮纸4.jpg b/app/src/main/assets/bg/羊皮纸4.jpg new file mode 100644 index 000000000..cee31be58 Binary files /dev/null and b/app/src/main/assets/bg/羊皮纸4.jpg differ diff --git a/app/src/main/assets/bg/边彩画布.jpg b/app/src/main/assets/bg/边彩画布.jpg new file mode 100644 index 000000000..6638b9f21 Binary files /dev/null and b/app/src/main/assets/bg/边彩画布.jpg differ diff --git a/app/src/main/assets/bg/雾花.jpg b/app/src/main/assets/bg/雾花.jpg new file mode 100644 index 000000000..1326d1aa5 Binary files /dev/null and b/app/src/main/assets/bg/雾花.jpg differ diff --git a/app/src/main/assets/readConfig.json b/app/src/main/assets/readConfig.json index 5793e4dc3..b0d04a524 100644 --- a/app/src/main/assets/readConfig.json +++ b/app/src/main/assets/readConfig.json @@ -1,6 +1,6 @@ [ { - "bgStr": "bg1.jpg", + "bgStr": "羊皮纸2.jpg", "bgType": 1, "darkStatusIcon": true, "textColor": "#5E432E", @@ -14,8 +14,8 @@ "paddingBottom": 0 }, { - "bgStr": "#C6BAA1", - "bgType": 0, + "bgStr": "羊皮纸2.jpg", + "bgType": 1, "darkStatusIcon": true, "textColor": "#5E432E", "textSize": 22, diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt index a12072c7e..3b8ade501 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt @@ -16,9 +16,8 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.jaredrummler.android.colorpicker.ColorPickerDialog import io.legado.app.R +import io.legado.app.base.adapter.CommonRecyclerAdapter import io.legado.app.base.adapter.ItemViewHolder -import io.legado.app.base.adapter.SimpleRecyclerAdapter -import io.legado.app.help.ImageLoader import io.legado.app.help.ReadBookConfig import io.legado.app.help.permission.Permissions import io.legado.app.help.permission.PermissionsCompat @@ -132,17 +131,22 @@ class BgTextConfigDialog : DialogFragment() { } class BgAdapter(context: Context) : - SimpleRecyclerAdapter(context, R.layout.item_bg_image) { - - override fun convert(holder: ItemViewHolder, item: String, payloads: MutableList) { - with(holder.itemView) { - ImageLoader.load(context, context.assets.open("bg/$item").readBytes()) - .centerCrop() - .setAsBitmap(iv_bg) - tv_name.text = item.substring(0, item.lastIndexOf(".")) - } + CommonRecyclerAdapter(context) { + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemViewHolder { + return super.onCreateViewHolder(parent, viewType) } + +// override fun convert(holder: ItemViewHolder, item: String, payloads: MutableList) { +// with(holder.itemView) { +// ImageLoader.load(context, context.assets.open("bg/$item").readBytes()) +// .centerCrop() +// .setAsBitmap(iv_bg) +// tv_name.text = item.substring(0, item.lastIndexOf(".")) +// } +// } + } } \ No newline at end of file