|
|
@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable |
|
|
|
import android.widget.FrameLayout |
|
|
|
import android.widget.FrameLayout |
|
|
|
import androidx.core.view.isGone |
|
|
|
import androidx.core.view.isGone |
|
|
|
import androidx.core.view.isInvisible |
|
|
|
import androidx.core.view.isInvisible |
|
|
|
|
|
|
|
import io.legado.app.App |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.base.BaseActivity |
|
|
|
import io.legado.app.base.BaseActivity |
|
|
|
import io.legado.app.constant.AppConst.timeFormat |
|
|
|
import io.legado.app.constant.AppConst.timeFormat |
|
|
@ -51,13 +52,7 @@ class ContentView(context: Context) : FrameLayout(context) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { |
|
|
|
fun upStyle() = ReadBookConfig.apply { |
|
|
|
super.onSizeChanged(w, h, oldw, oldh) |
|
|
|
|
|
|
|
upStyle() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun upStyle() { |
|
|
|
|
|
|
|
ReadBookConfig.apply { |
|
|
|
|
|
|
|
bv_header_left.typeface = ChapterProvider.typeface |
|
|
|
bv_header_left.typeface = ChapterProvider.typeface |
|
|
|
tv_header_left.typeface = ChapterProvider.typeface |
|
|
|
tv_header_left.typeface = ChapterProvider.typeface |
|
|
|
tv_header_middle.typeface = ChapterProvider.typeface |
|
|
|
tv_header_middle.typeface = ChapterProvider.typeface |
|
|
@ -90,10 +85,9 @@ class ContentView(context: Context) : FrameLayout(context) { |
|
|
|
vw_top_divider.visible(showHeaderLine) |
|
|
|
vw_top_divider.visible(showHeaderLine) |
|
|
|
vw_bottom_divider.visible(showFooterLine) |
|
|
|
vw_bottom_divider.visible(showFooterLine) |
|
|
|
page_nv_bar.layoutParams = page_nv_bar.layoutParams.apply { |
|
|
|
page_nv_bar.layoutParams = page_nv_bar.layoutParams.apply { |
|
|
|
height = if (hideNavigationBar) 0 else activity!!.navigationBarHeight |
|
|
|
height = if (hideNavigationBar) 0 else App.navigationBarHeight |
|
|
|
} |
|
|
|
} |
|
|
|
content_text_view.upVisibleRect() |
|
|
|
content_text_view.upVisibleRect() |
|
|
|
} |
|
|
|
|
|
|
|
upTime() |
|
|
|
upTime() |
|
|
|
upBattery(battery) |
|
|
|
upBattery(battery) |
|
|
|
} |
|
|
|
} |
|
|
|