阅读界面导航栏不再透明

pull/1352/head
gedoor 3 years ago
parent 64af83f15d
commit 8032a3e1d8
  1. 5
      app/src/main/assets/updateLog.md
  2. 13
      app/src/main/java/io/legado/app/help/http/HttpHelper.kt
  3. 6
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt
  4. 20
      app/src/main/java/io/legado/app/utils/ActivityExtensions.kt

@ -12,6 +12,11 @@
* 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源!
* 关于最近版本有时候界面没有数据的问题是因为把LiveData组件换成了谷歌推荐的Flow组件导致的问题,正在查找解决办法
**2021/09/29**
1. 修复阅读界面导航栏挡住内容的bug
2. 修复webView=ture是自动跳转移动网站的bug
**2021/09/28**
1. 添加横屏双页模式

@ -93,16 +93,3 @@ fun getProxyClient(proxy: String? = null): OkHttpClient {
}
return okHttpClient
}
suspend fun getWebViewSrc(
url: String? = null,
html: String? = null,
encode: String? = null,
tag: String? = null,
headerMap: Map<String, String>? = null,
sourceRegex: String? = null,
javaScript: String? = null,
): StrResponse {
return BackstageWebView(url, html, encode, tag, headerMap, sourceRegex, javaScript)
.getStrResponse()
}

@ -346,14 +346,16 @@ class AnalyzeUrl(
html = body,
tag = source?.getKey(),
javaScript = webJs ?: jsStr,
sourceRegex = sourceRegex
sourceRegex = sourceRegex,
headerMap = headerMap
).getStrResponse()
}
else -> BackstageWebView(
url = url,
tag = source?.getKey(),
javaScript = webJs ?: jsStr,
sourceRegex = sourceRegex
sourceRegex = sourceRegex,
headerMap = headerMap
).getStrResponse()
}
}

@ -32,19 +32,13 @@ val Activity.windowSize: DisplayMetrics
*/
val Activity.isNavigationBarExist: Boolean
get() {
val viewGroup = window.decorView as? ViewGroup
if (viewGroup != null) {
for (i in 0 until viewGroup.childCount) {
viewGroup.getChildAt(i).context.packageName
if (viewGroup.getChildAt(i).id != View.NO_ID
&& "navigationBarBackground" == resources.getResourceEntryName(
viewGroup.getChildAt(
i
).id
)
) {
return true
}
val viewGroup = (window.decorView as? ViewGroup) ?: return false
for (i in 0 until viewGroup.childCount) {
val childId = viewGroup.getChildAt(i).id
if (childId != View.NO_ID
&& resources.getResourceEntryName(childId) == "navigationBarBackground"
) {
return true
}
}
return false

Loading…
Cancel
Save