mirror of
https://github.com/gedoor/legado.git
synced 2025-01-07 03:06:58 +08:00
优化
This commit is contained in:
parent
b7db2a0494
commit
e389185022
@ -52,7 +52,7 @@ object AppConst {
|
||||
)
|
||||
|
||||
@SuppressLint("PrivateResource")
|
||||
val sysElevation = if (AppConfig.isEInkMode) 0 else appCtx.resources
|
||||
val sysElevation = appCtx.resources
|
||||
.getDimension(com.google.android.material.R.dimen.design_appbar_elevation)
|
||||
.toInt()
|
||||
|
||||
|
@ -156,7 +156,7 @@ class ChangeChapterSourceDialog() : BaseDialogFragment(R.layout.dialog_chapter_c
|
||||
binding.ivHideToc.setOnClickListener {
|
||||
binding.clToc.gone()
|
||||
}
|
||||
binding.flHideToc.elevation = if (AppConfig.isEInkMode) 0f else requireContext().elevation
|
||||
binding.flHideToc.elevation = requireContext().elevation
|
||||
}
|
||||
|
||||
private fun initRecyclerView() {
|
||||
|
@ -8,8 +8,6 @@ import android.graphics.PorterDuff
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View.OnClickListener
|
||||
import android.view.View.OnLongClickListener
|
||||
import android.view.WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE
|
||||
import android.view.animation.Animation
|
||||
import android.widget.FrameLayout
|
||||
@ -100,7 +98,7 @@ class ReadMenu @JvmOverloads constructor(
|
||||
private val showBrightnessView
|
||||
get() = context.getPrefBoolean(
|
||||
PreferKey.showBrightnessView,
|
||||
!AppConfig.isEInkMode
|
||||
true
|
||||
)
|
||||
private val sourceMenu by lazy {
|
||||
PopupMenu(context, binding.tvSourceAction).apply {
|
||||
@ -202,7 +200,7 @@ class ReadMenu @JvmOverloads constructor(
|
||||
brightnessBackground.cornerRadius = 5F.dpToPx()
|
||||
brightnessBackground.setColor(ColorUtils.adjustAlpha(bgColor, 0.5f))
|
||||
llBrightness.background = brightnessBackground
|
||||
if(AppConfig.isEInkMode) {
|
||||
if (AppConfig.isEInkMode) {
|
||||
titleBar.setBackgroundResource(R.drawable.bg_eink_border_bottom)
|
||||
llBottomBg.setBackgroundResource(R.drawable.bg_eink_border_top)
|
||||
} else {
|
||||
|
@ -98,11 +98,6 @@ class ReadStyleDialog : BaseDialogFragment(R.layout.dialog_read_book_style),
|
||||
}
|
||||
}
|
||||
}
|
||||
if(AppConfig.isEInkMode) {
|
||||
binding.vwBgFg1.visibility = View.INVISIBLE
|
||||
binding.llBgTs.visibility = View.GONE
|
||||
binding.rvStyle.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun initData() {
|
||||
|
@ -53,7 +53,6 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import kotlin.collections.set
|
||||
import kotlin.coroutines.resume
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
|
||||
@ -112,7 +111,7 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
|
||||
return@addCallback
|
||||
}
|
||||
}
|
||||
if (!AppConfig.isEInkMode && System.currentTimeMillis() - exitTime > 2000) {
|
||||
if (System.currentTimeMillis() - exitTime > 2000) {
|
||||
toastOnUi(R.string.double_click_exit)
|
||||
exitTime = System.currentTimeMillis()
|
||||
} else {
|
||||
|
@ -267,7 +267,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/ll_bg_ts"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,7 +1,6 @@
|
||||
#Tue Aug 27 18:19:17 CST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
#distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://mirrors.aliyun.com/macports/distfiles/gradle/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
Loading…
Reference in New Issue
Block a user