Revert "优化"

This reverts commit 49484a1f
pull/1319/head
gedoor 3 years ago
parent 49484a1f4a
commit c22ef0a842
  1. 3
      app/build.gradle
  2. 4
      app/src/main/java/io/legado/app/App.kt
  3. 7
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt
  4. 4
      app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt

@ -150,9 +150,6 @@ dependencies {
implementation('com.google.code.gson:gson:2.8.8') implementation('com.google.code.gson:gson:2.8.8')
implementation('androidx.webkit:webkit:1.4.0') implementation('androidx.webkit:webkit:1.4.0')
//
implementation('com.gitee.zackratos:UltimateBarX:0.7.1')
//media //media
implementation("androidx.media:media:1.4.1") implementation("androidx.media:media:1.4.1")
def exoplayer_version = '2.15.0' def exoplayer_version = '2.15.0'

@ -84,4 +84,8 @@ class App : MultiDexApplication() {
} }
} }
companion object {
var navigationBarHeight = 0
}
} }

@ -11,7 +11,6 @@ import android.widget.FrameLayout
import android.widget.SeekBar import android.widget.SeekBar
import androidx.core.view.isGone import androidx.core.view.isGone
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.zackratos.ultimatebarx.ultimatebarx.navigationBarHeight
import io.legado.app.R import io.legado.app.R
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.databinding.ViewReadMenuBinding import io.legado.app.databinding.ViewReadMenuBinding
@ -247,10 +246,8 @@ class ReadMenu @JvmOverloads constructor(
override fun onAnimationEnd(animation: Animation) { override fun onAnimationEnd(animation: Animation) {
binding.vwMenuBg.setOnClickListener { runMenuOut() } binding.vwMenuBg.setOnClickListener { runMenuOut() }
binding.vwNavigationBar.run { binding.vwNavigationBar.layoutParams = binding.vwNavigationBar.layoutParams.apply {
layoutParams = layoutParams.apply { height = activity!!.navigationBarHeight
height = navigationBarHeight
}
} }
if (!LocalConfig.readMenuHelpVersionIsLast) { if (!LocalConfig.readMenuHelpVersionIsLast) {
callBack.showReadMenuHelp() callBack.showReadMenuHelp()

@ -7,7 +7,7 @@ import android.view.LayoutInflater
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 com.zackratos.ultimatebarx.ultimatebarx.navigationBarHeight 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
@ -87,7 +87,7 @@ class PageView(context: Context) : FrameLayout(context) {
pageNvBar.layoutParams = pageNvBar.layoutParams.apply { pageNvBar.layoutParams = pageNvBar.layoutParams.apply {
height = height =
if (it.hideNavigationBar) 0 if (it.hideNavigationBar) 0
else navigationBarHeight else App.navigationBarHeight
} }
} }
contentTextView.upVisibleRect() contentTextView.upVisibleRect()

Loading…
Cancel
Save