This commit is contained in:
kunfei 2023-03-01 19:54:53 +08:00
parent 1971f0bf71
commit 00485320e4
8 changed files with 22 additions and 7 deletions

View File

@ -17,10 +17,11 @@ object ReadTipConfig {
const val bookName = 7 const val bookName = 7
const val timeBattery = 8 const val timeBattery = 8
const val timeBatteryPercentage = 9 const val timeBatteryPercentage = 9
const val totalProgress1 = 10
val tipValues = arrayOf( val tipValues = arrayOf(
none, bookName, chapterTitle, time, battery, batteryPercentage, page, none, bookName, chapterTitle, time, battery, batteryPercentage, page,
totalProgress, pageAndTotal, timeBattery, timeBatteryPercentage totalProgress, totalProgress1, pageAndTotal, timeBattery, timeBatteryPercentage
) )
val tipNames get() = appCtx.resources.getStringArray(R.array.read_tip).toList() val tipNames get() = appCtx.resources.getStringArray(R.array.read_tip).toList()

View File

@ -40,6 +40,7 @@ class PageView(context: Context) : FrameLayout(context) {
private var tvBookName: BatteryView? = null private var tvBookName: BatteryView? = null
private var tvTimeBattery: BatteryView? = null private var tvTimeBattery: BatteryView? = null
private var tvTimeBatteryP: BatteryView? = null private var tvTimeBatteryP: BatteryView? = null
private var tvTotalProgress1: BatteryView? = null
val headerHeight: Int val headerHeight: Int
get() { get() {
@ -168,6 +169,12 @@ class PageView(context: Context) : FrameLayout(context) {
typeface = ChapterProvider.typeface typeface = ChapterProvider.typeface
textSize = 12f textSize = 12f
} }
tvTotalProgress1 = getTipView(ReadTipConfig.totalProgress1)?.apply {
tag = ReadTipConfig.totalProgress1
isBattery = false
typeface = ChapterProvider.typeface
textSize = 12f
}
tvPageAndTotal = getTipView(ReadTipConfig.pageAndTotal)?.apply { tvPageAndTotal = getTipView(ReadTipConfig.pageAndTotal)?.apply {
tag = ReadTipConfig.pageAndTotal tag = ReadTipConfig.pageAndTotal
isBattery = false isBattery = false
@ -295,6 +302,7 @@ class PageView(context: Context) : FrameLayout(context) {
tvTitle?.text = textPage.title tvTitle?.text = textPage.title
tvPage?.text = "${index.plus(1)}/$pageSize" tvPage?.text = "${index.plus(1)}/$pageSize"
tvTotalProgress?.text = readProgress tvTotalProgress?.text = readProgress
tvTotalProgress1?.text = "${textPage.chapterIndex.plus(1)}/${textPage.chapterSize}"
tvPageAndTotal?.text = "${index.plus(1)}/$pageSize $readProgress" tvPageAndTotal?.text = "${index.plus(1)}/$pageSize $readProgress"
} }

View File

@ -92,7 +92,8 @@
<item>Batería</item> <item>Batería</item>
<item>Batería%</item> <item>Batería%</item>
<item>Páginas</item> <item>Páginas</item>
<item>Avance</item> <item>Avance(%)</item>
<item>Avance(xx/yyy)</item>
<item>Páginas y avance</item> <item>Páginas y avance</item>
<item>Tiempo y Batería</item> <item>Tiempo y Batería</item>
<item>Tiempo y Batería%</item> <item>Tiempo y Batería%</item>

View File

@ -92,7 +92,8 @@
<item>Bateria</item> <item>Bateria</item>
<item>Bateria%</item> <item>Bateria%</item>
<item>Páginas</item> <item>Páginas</item>
<item>Progresso</item> <item>Progresso(%)</item>
<item>Progresso(xx/yyy)</item>
<item>Páginas e progresso</item> <item>Páginas e progresso</item>
<item>Tempo e Bateria</item> <item>Tempo e Bateria</item>
<item>Tempo e Bateria%</item> <item>Tempo e Bateria%</item>

View File

@ -55,7 +55,8 @@
<item>電量</item> <item>電量</item>
<item>電量%</item> <item>電量%</item>
<item>頁數</item> <item>頁數</item>
<item>進度</item> <item>進度(%)</item>
<item>進度(xx/yyy)</item>
<item>頁數同埋進度</item> <item>頁數同埋進度</item>
<item>時間同埋電量</item> <item>時間同埋電量</item>
<item>時間同埋電量%</item> <item>時間同埋電量%</item>

View File

@ -90,7 +90,8 @@
<item>電量</item> <item>電量</item>
<item>電量%</item> <item>電量%</item>
<item>頁數</item> <item>頁數</item>
<item>進度</item> <item>進度(%)</item>
<item>進度(xx/yyy)</item>
<item>頁數及進度</item> <item>頁數及進度</item>
<item>時間及電量</item> <item>時間及電量</item>
<item>時間及電量%</item> <item>時間及電量%</item>

View File

@ -77,7 +77,8 @@
<item>电量</item> <item>电量</item>
<item>电量%</item> <item>电量%</item>
<item>页数</item> <item>页数</item>
<item>进度</item> <item>进度(%)</item>
<item>进度(xx/yyy)</item>
<item>页数及进度</item> <item>页数及进度</item>
<item>时间及电量</item> <item>时间及电量</item>
<item>时间及电量%</item> <item>时间及电量%</item>

View File

@ -112,7 +112,8 @@
<item>Battery</item> <item>Battery</item>
<item>Battery%</item> <item>Battery%</item>
<item>Pages</item> <item>Pages</item>
<item>Progress</item> <item>Progress(%)</item>
<item>Progress(xx/yyy)</item>
<item>Pages and progress</item> <item>Pages and progress</item>
<item>Time and Battery</item> <item>Time and Battery</item>
<item>Time and Battery%</item> <item>Time and Battery%</item>