feat(web): 支持WebActivity横竖屏切换不重建及多项功能调整
- WebActivity 改为 configChanges 处理横竖屏,不再重走生命周期,并启用 onConfigurationChanged 切换状态栏样式 - WatchBindDialog 已绑定状态下禁用确认按钮并降低透明度,隐藏解绑功能 - HomeFragment 注释掉解绑设备调用逻辑 - UrlConfig 更新测试环境地址及健康体检 H5 地址 - activity_archives_detail.xml 修复 include 布局缺少宽高属性问题 - 版本升级至 1.0.13(versionCode 1013)
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.activity.WebActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||
<activity
|
||||
android:name=".ui.activity.UserInfoSettingActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
@@ -78,8 +78,8 @@ class HomeFragment :
|
||||
// 0 绑定 1 解绑
|
||||
if (type == 0) {
|
||||
mViewModel.getBindDevice(watchName)
|
||||
} else {
|
||||
mViewModel.getUnbundleDevice(watchName)
|
||||
// } else {
|
||||
// mViewModel.getUnbundleDevice(watchName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ object UrlConfig {
|
||||
|
||||
private const val DEBUG_DEFAULT_IP_ADDRESS_REMOTE = "http://192.168.1.47" // 开发环境
|
||||
// private const val DEBUG_DEFAULT_IP_ADDRESS_REMOTE = "http://api-xj.tri.dt.io/" // 开发环境
|
||||
private const val TEST_DEFAULT_IP_ADDRESS_REMOTE = "https://xj-api.mcrm.vip:8888" // 测试环境
|
||||
// private const val TEST_DEFAULT_IP_ADDRESS_REMOTE = "https://xj-api.mcrm.vip:8888" // 测试环境
|
||||
private const val TEST_DEFAULT_IP_ADDRESS_REMOTE = "https://xjxc-api.mcrm.vip:8888" // 测试环境
|
||||
// private const val PRODUCT_DEFAULT_IP_ADDRESS_REMOTE = "https://api.xjygjk.com" // 正式环境
|
||||
private const val PRODUCT_DEFAULT_IP_ADDRESS_REMOTE = "https://api-jkglpt.iosp.ydpt.tech" // 正式环境
|
||||
|
||||
@@ -31,8 +32,11 @@ object UrlConfig {
|
||||
//健康银行
|
||||
private const val TEST_HOME_BANK_H5 = "https://gstest.superwx.cn/healthbank/index.html"
|
||||
private const val PRODUCT_HOME_BANK_H5 = "https://console-jkglpt.iosp.ydpt.tech/hb/healthweb/index.html"
|
||||
|
||||
//健康体检
|
||||
private const val PRODUCT_HOME_HEALTH_CHECK_H5 = "https://console-jkglpt.iosp.ydpt.tech/hb/healthcheckweb/index.html"
|
||||
private const val TEST_HOME_HEALTH_CHECK_H5 = "https://gstest.superwx.cn/healthcheckweb/index.html"
|
||||
|
||||
|
||||
//手机银行
|
||||
const val SECRET_KEY = "XJp3EHpcnwReXc1A"
|
||||
@@ -111,7 +115,7 @@ object UrlConfig {
|
||||
fun getHealthCheckH5Url(baseUrlType: BaseUrlType = BaseUrlType.PRODUCT): String {
|
||||
return when (baseUrlType) {
|
||||
BaseUrlType.DEBUG, BaseUrlType.TEST-> {
|
||||
PRODUCT_HOME_HEALTH_CHECK_H5
|
||||
TEST_HOME_HEALTH_CHECK_H5
|
||||
}
|
||||
BaseUrlType.PRODUCT -> {
|
||||
PRODUCT_HOME_HEALTH_CHECK_H5
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.xjjk.healthyclients.ui.activity
|
||||
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Bitmap
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
@@ -96,14 +97,14 @@ class WebActivity : BaseVMBActivity<WebViewModel, ActivityWebBinding>(R.layout.a
|
||||
/**
|
||||
* 监听横竖屏切换改变状态栏,页面本身设置为强制竖屏模式,触发切换只存在于H5中视频的全屏播放,全屏播放时需要为透明状态栏
|
||||
*/
|
||||
// override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
// super.onConfigurationChanged(newConfig)
|
||||
// if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {//横屏
|
||||
// setTransparentStatusBar(isTransparent = true, isStatusBarDarkFont = false)
|
||||
// } else {//竖屏
|
||||
// setTransparentStatusBar(isTransparent = false, isStatusBarDarkFont = false)
|
||||
// }
|
||||
// }
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {//横屏
|
||||
setTransparentStatusBar(isTransparent = true, isStatusBarDarkFont = false)
|
||||
} else {//竖屏
|
||||
setTransparentStatusBar(isTransparent = false, isStatusBarDarkFont = false)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBackEvent() {
|
||||
if (!mAgentWeb.back()) {
|
||||
|
||||
@@ -65,9 +65,11 @@ class WatchBindDialog(context: Context, var listener: (String,Int) -> Unit) : Al
|
||||
type = 0
|
||||
} else {
|
||||
binding.etWatchid.isEnabled = false
|
||||
binding.confirm.setText("解绑")
|
||||
type = 1
|
||||
|
||||
binding.confirm.isEnabled = false
|
||||
binding.confirm.alpha = 0.3F
|
||||
// binding.confirm.setText("解绑")
|
||||
// type = 1
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -212,6 +212,9 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:id="@+id/lay_question_for_help"
|
||||
layout="@layout/view_text_question"
|
||||
app:title="@{@string/archives_detail_question_for_help}"
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ ext {
|
||||
minSdkVersion = 26
|
||||
targetSdkVersion = 32
|
||||
compileSdkVersion = 33
|
||||
versionCode = 1012
|
||||
versionName = "1.0.12"
|
||||
versionCode = 1013
|
||||
versionName = "1.0.13"
|
||||
//Dependencies
|
||||
junitVersion = "4.12"
|
||||
lifecycleVersion = "2.6.0-alpha01"
|
||||
|
||||
Reference in New Issue
Block a user