mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-07 03:06:06 +08:00
Merge code
This commit is contained in:
@@ -183,20 +183,19 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
*/
|
*/
|
||||||
private fun PackageParam.hookModuleRunningInfo(isQQTIM: Boolean) =
|
private fun PackageParam.hookModuleRunningInfo(isQQTIM: Boolean) =
|
||||||
when {
|
when {
|
||||||
!prefs.getBoolean(ENABLE_RUN_INFO) -> {}
|
isQQTIM -> SplashActivityClass.hook {
|
||||||
isQQTIM ->
|
/**
|
||||||
SplashActivityClass.hook {
|
* Hook 启动界面的第一个 [Activity]
|
||||||
/**
|
* QQ 和 TIM 都是一样的类
|
||||||
* Hook 启动界面的第一个 [Activity]
|
* 在里面加入提示运行信息的对话框测试模块是否激活
|
||||||
* QQ 和 TIM 都是一样的类
|
*/
|
||||||
* 在里面加入提示运行信息的对话框测试模块是否激活
|
injectMember {
|
||||||
*/
|
method {
|
||||||
injectMember {
|
name = "doOnCreate"
|
||||||
method {
|
param(BundleClass)
|
||||||
name = "doOnCreate"
|
}
|
||||||
param(BundleClass)
|
afterHook {
|
||||||
}
|
if (prefs.getBoolean(ENABLE_RUN_INFO))
|
||||||
afterHook {
|
|
||||||
instance<Activity>().apply {
|
instance<Activity>().apply {
|
||||||
showDialog {
|
showDialog {
|
||||||
title = "TSBattery 已激活"
|
title = "TSBattery 已激活"
|
||||||
@@ -215,21 +214,21 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
noCancelable()
|
noCancelable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else ->
|
}
|
||||||
LauncherUIClass.hook {
|
else -> LauncherUIClass.hook {
|
||||||
/**
|
/**
|
||||||
* Hook 启动界面的第一个 [Activity]
|
* Hook 启动界面的第一个 [Activity]
|
||||||
* 在里面加入提示运行信息的对话框测试模块是否激活
|
* 在里面加入提示运行信息的对话框测试模块是否激活
|
||||||
*/
|
*/
|
||||||
injectMember {
|
injectMember {
|
||||||
method {
|
method {
|
||||||
name = "onCreate"
|
name = "onCreate"
|
||||||
param(BundleClass)
|
param(BundleClass)
|
||||||
}
|
}
|
||||||
afterHook {
|
afterHook {
|
||||||
|
if (prefs.getBoolean(ENABLE_RUN_INFO))
|
||||||
instance<Activity>().apply {
|
instance<Activity>().apply {
|
||||||
showDialog(isUseBlackTheme = true) {
|
showDialog(isUseBlackTheme = true) {
|
||||||
title = "TSBattery 已激活"
|
title = "TSBattery 已激活"
|
||||||
@@ -247,9 +246,9 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
noCancelable()
|
noCancelable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -281,23 +280,25 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
injectMember {
|
injectMember {
|
||||||
method { name = "onCreate" }
|
method { name = "onCreate" }
|
||||||
afterHook {
|
afterHook {
|
||||||
instance<Service>().apply {
|
if (prefs.getBoolean(ENABLE_QQTIM_CORESERVICE_BAN))
|
||||||
stopForeground(true)
|
instance<Service>().apply {
|
||||||
stopService(Intent(applicationContext, javaClass))
|
stopForeground(true)
|
||||||
loggerD(msg = "Shutdown CoreService OK!")
|
stopService(Intent(applicationContext, javaClass))
|
||||||
}
|
loggerD(msg = "Shutdown CoreService OK!")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.by { prefs.getBoolean(ENABLE_QQTIM_CORESERVICE_BAN) }
|
}
|
||||||
CoreService_KernelServiceClass.hook {
|
CoreService_KernelServiceClass.hook {
|
||||||
injectMember {
|
injectMember {
|
||||||
method { name = "onCreate" }
|
method { name = "onCreate" }
|
||||||
afterHook {
|
afterHook {
|
||||||
instance<Service>().apply {
|
if (prefs.getBoolean(ENABLE_QQTIM_CORESERVICE_CHILD_BAN))
|
||||||
stopForeground(true)
|
instance<Service>().apply {
|
||||||
stopService(Intent(applicationContext, javaClass))
|
stopForeground(true)
|
||||||
loggerD(msg = "Shutdown CoreService\$KernelService OK!")
|
stopService(Intent(applicationContext, javaClass))
|
||||||
}
|
loggerD(msg = "Shutdown CoreService\$KernelService OK!")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
injectMember {
|
injectMember {
|
||||||
@@ -307,7 +308,7 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
}
|
}
|
||||||
replaceTo(any = 2)
|
replaceTo(any = 2)
|
||||||
}
|
}
|
||||||
}.by { prefs.getBoolean(ENABLE_QQTIM_CORESERVICE_CHILD_BAN) }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onInit() = configs {
|
override fun onInit() = configs {
|
||||||
@@ -323,7 +324,7 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
hookCoreService(isQQ = true)
|
hookCoreService(isQQ = true)
|
||||||
hookModuleRunningInfo(isQQTIM = true)
|
hookModuleRunningInfo(isQQTIM = true)
|
||||||
if (prefs.getBoolean(ENABLE_QQTIM_WHITE_MODE)) return@loadApp
|
if (prefs.getBoolean(ENABLE_QQTIM_WHITE_MODE)) return@loadApp
|
||||||
/** 通过在 SplashActivity 里取到应用的版本号 */
|
/** 通过在 [SplashActivityClass] 里取到应用的版本号 */
|
||||||
SplashActivityClass.hook {
|
SplashActivityClass.hook {
|
||||||
injectMember {
|
injectMember {
|
||||||
method {
|
method {
|
||||||
|
@@ -25,7 +25,7 @@ package com.fankes.tsbattery.ui.activity
|
|||||||
|
|
||||||
import android.content.ComponentName
|
import android.content.ComponentName
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import androidx.core.view.isGone
|
import android.view.HapticFeedbackConstants
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import com.fankes.tsbattery.BuildConfig
|
import com.fankes.tsbattery.BuildConfig
|
||||||
import com.fankes.tsbattery.R
|
import com.fankes.tsbattery.R
|
||||||
@@ -42,14 +42,12 @@ import com.fankes.tsbattery.hook.HookConst.QQ_PACKAGE_NAME
|
|||||||
import com.fankes.tsbattery.hook.HookConst.TIM_PACKAGE_NAME
|
import com.fankes.tsbattery.hook.HookConst.TIM_PACKAGE_NAME
|
||||||
import com.fankes.tsbattery.hook.HookConst.WECHAT_PACKAGE_NAME
|
import com.fankes.tsbattery.hook.HookConst.WECHAT_PACKAGE_NAME
|
||||||
import com.fankes.tsbattery.ui.activity.base.BaseActivity
|
import com.fankes.tsbattery.ui.activity.base.BaseActivity
|
||||||
import com.fankes.tsbattery.utils.factory.isInstall
|
import com.fankes.tsbattery.utils.factory.*
|
||||||
import com.fankes.tsbattery.utils.factory.openBrowser
|
|
||||||
import com.fankes.tsbattery.utils.factory.openSelfSetting
|
|
||||||
import com.fankes.tsbattery.utils.factory.showDialog
|
|
||||||
import com.fankes.tsbattery.utils.tool.GithubReleaseTool
|
import com.fankes.tsbattery.utils.tool.GithubReleaseTool
|
||||||
import com.highcapable.yukihookapi.hook.factory.isModuleActive
|
import com.highcapable.yukihookapi.hook.factory.isModuleActive
|
||||||
import com.highcapable.yukihookapi.hook.factory.isTaiChiModuleActive
|
import com.highcapable.yukihookapi.hook.factory.isTaiChiModuleActive
|
||||||
import com.highcapable.yukihookapi.hook.factory.modulePrefs
|
import com.highcapable.yukihookapi.hook.factory.modulePrefs
|
||||||
|
import com.highcapable.yukihookapi.hook.xposed.YukiHookModuleStatus
|
||||||
|
|
||||||
class MainActivity : BaseActivity<ActivityMainBinding>() {
|
class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||||
|
|
||||||
@@ -79,6 +77,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
binding.mainLinStatus.setBackgroundResource(R.drawable.bg_green_round)
|
binding.mainLinStatus.setBackgroundResource(R.drawable.bg_green_round)
|
||||||
binding.mainImgStatus.setImageResource(R.mipmap.ic_success)
|
binding.mainImgStatus.setImageResource(R.mipmap.ic_success)
|
||||||
binding.mainTextStatus.text = "模块已激活"
|
binding.mainTextStatus.text = "模块已激活"
|
||||||
|
binding.mainTextApiWay.isVisible = true
|
||||||
|
refreshActivateExecutor()
|
||||||
/** 写入激活的模块版本 */
|
/** 写入激活的模块版本 */
|
||||||
modulePrefs.putString(ENABLE_MODULE_VERSION, moduleVersion)
|
modulePrefs.putString(ENABLE_MODULE_VERSION, moduleVersion)
|
||||||
} else
|
} else
|
||||||
@@ -89,9 +89,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
"请自行查看本页面使用帮助与说明第三条。\n" +
|
"请自行查看本页面使用帮助与说明第三条。\n" +
|
||||||
"太极和第三方 Xposed 激活后" +
|
"太极和第三方 Xposed 激活后" +
|
||||||
"可能不会提示激活,若想验证是否激活请打开“提示模块运行信息”自行检查," +
|
"可能不会提示激活,若想验证是否激活请打开“提示模块运行信息”自行检查," +
|
||||||
"或观察 QQ、TIM 的常驻通知是否有“TSBattery 守护中”字样”," +
|
"或观察 QQ、TIM 的常驻通知是否有“TSBattery 守护中”字样”。\n\n" +
|
||||||
"如果生效就代表模块运行正常,这里的激活状态只是一个显示意义上的存在。\n" +
|
"如果生效就代表模块运行正常,若你在未 Root 情况下激活模块,这里的激活状态只是一个显示意义上的存在。\n" +
|
||||||
"太极(无极)在 MIUI 设备上会提示打开授权,请进行允许,然后再次打开本应用查看激活状态。"
|
"太极(无极)在 MIUI 设备上会提示打开授权,请进行允许,然后再次打开本模块查看激活状态。"
|
||||||
confirmButton(text = "我知道了")
|
confirmButton(text = "我知道了")
|
||||||
noCancelable()
|
noCancelable()
|
||||||
}
|
}
|
||||||
@@ -111,40 +111,37 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
noCancelable()
|
noCancelable()
|
||||||
}
|
}
|
||||||
/** 设置安装状态 */
|
/** 设置安装状态 */
|
||||||
binding.mainTextQqNoinstall.isGone = QQ_PACKAGE_NAME.isInstall
|
binding.mainTextQqVer.text = if (QQ_PACKAGE_NAME.isInstall) version(QQ_PACKAGE_NAME) else "未安装"
|
||||||
binding.mainTextTimNoinstall.isGone = TIM_PACKAGE_NAME.isInstall
|
binding.mainTextTimVer.text = if (TIM_PACKAGE_NAME.isInstall) version(TIM_PACKAGE_NAME) else "未安装"
|
||||||
binding.mainTextWechatNoinstall.isGone = WECHAT_PACKAGE_NAME.isInstall
|
binding.mainTextWechatVer.text = if (WECHAT_PACKAGE_NAME.isInstall) version(WECHAT_PACKAGE_NAME) else "未安装"
|
||||||
/** 设置文本 */
|
/** 设置文本 */
|
||||||
binding.mainTextVersion.text = "模块版本:$moduleVersion $pendingFlag"
|
binding.mainTextVersion.text = "模块版本:$moduleVersion $pendingFlag"
|
||||||
binding.mainTextSupportQq.apply {
|
binding.mainQqItem.setOnClickListener {
|
||||||
text = qqSupportVersion
|
showDialog {
|
||||||
setOnClickListener {
|
title = "兼容的 QQ 版本"
|
||||||
showDialog {
|
msg = qqSupportVersion
|
||||||
title = "兼容的 QQ 版本"
|
confirmButton(text = "我知道了")
|
||||||
msg = qqSupportVersion
|
|
||||||
confirmButton(text = "我知道了")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
/** 振动提醒 */
|
||||||
|
it.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP)
|
||||||
}
|
}
|
||||||
binding.mainTextSupportTim.apply {
|
binding.mainTimItem.setOnClickListener {
|
||||||
text = timSupportVersion
|
showDialog {
|
||||||
setOnClickListener {
|
title = "兼容的 TIM 版本"
|
||||||
showDialog {
|
msg = timSupportVersion
|
||||||
title = "兼容的 TIM 版本"
|
confirmButton(text = "我知道了")
|
||||||
msg = timSupportVersion
|
|
||||||
confirmButton(text = "我知道了")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
/** 振动提醒 */
|
||||||
|
it.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP)
|
||||||
}
|
}
|
||||||
binding.mainTextSupportWechat.apply {
|
binding.mainWechatItem.setOnClickListener {
|
||||||
text = wechatSupportVersion
|
showDialog {
|
||||||
setOnClickListener {
|
title = "兼容的微信版本"
|
||||||
showDialog {
|
msg = wechatSupportVersion
|
||||||
title = "兼容的微信版本"
|
confirmButton(text = "我知道了")
|
||||||
msg = wechatSupportVersion
|
|
||||||
confirmButton(text = "我知道了")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
/** 振动提醒 */
|
||||||
|
it.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP)
|
||||||
}
|
}
|
||||||
/** 获取 Sp 存储的信息 */
|
/** 获取 Sp 存储的信息 */
|
||||||
binding.qqtimProtectModeSwitch.isChecked = modulePrefs.getBoolean(ENABLE_QQTIM_WHITE_MODE)
|
binding.qqtimProtectModeSwitch.isChecked = modulePrefs.getBoolean(ENABLE_QQTIM_WHITE_MODE)
|
||||||
@@ -157,6 +154,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
binding.qqtimProtectModeSwitch.setOnCheckedChangeListener { btn, b ->
|
binding.qqtimProtectModeSwitch.setOnCheckedChangeListener { btn, b ->
|
||||||
if (!btn.isPressed) return@setOnCheckedChangeListener
|
if (!btn.isPressed) return@setOnCheckedChangeListener
|
||||||
modulePrefs.putBoolean(ENABLE_QQTIM_WHITE_MODE, b)
|
modulePrefs.putBoolean(ENABLE_QQTIM_WHITE_MODE, b)
|
||||||
|
snake(msg = "修改需要重启 QQ 以生效")
|
||||||
}
|
}
|
||||||
binding.qqTimCoreServiceSwitch.setOnCheckedChangeListener { btn, b ->
|
binding.qqTimCoreServiceSwitch.setOnCheckedChangeListener { btn, b ->
|
||||||
if (!btn.isPressed) return@setOnCheckedChangeListener
|
if (!btn.isPressed) return@setOnCheckedChangeListener
|
||||||
@@ -169,6 +167,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
binding.wechatDisableHookSwitch.setOnCheckedChangeListener { btn, b ->
|
binding.wechatDisableHookSwitch.setOnCheckedChangeListener { btn, b ->
|
||||||
if (!btn.isPressed) return@setOnCheckedChangeListener
|
if (!btn.isPressed) return@setOnCheckedChangeListener
|
||||||
modulePrefs.putBoolean(DISABLE_WECHAT_HOOK, b)
|
modulePrefs.putBoolean(DISABLE_WECHAT_HOOK, b)
|
||||||
|
snake(msg = "修改需要重启微信以生效")
|
||||||
}
|
}
|
||||||
binding.hideIconInLauncherSwitch.setOnCheckedChangeListener { btn, b ->
|
binding.hideIconInLauncherSwitch.setOnCheckedChangeListener { btn, b ->
|
||||||
if (!btn.isPressed) return@setOnCheckedChangeListener
|
if (!btn.isPressed) return@setOnCheckedChangeListener
|
||||||
@@ -200,4 +199,15 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
openBrowser(url = "https://www.coolapk.com/u/876977", packageName = "com.coolapk.market")
|
openBrowser(url = "https://www.coolapk.com/u/876977", packageName = "com.coolapk.market")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 刷新模块激活使用的方式 */
|
||||||
|
private fun refreshActivateExecutor() {
|
||||||
|
when {
|
||||||
|
YukiHookModuleStatus.executorVersion > 0 ->
|
||||||
|
binding.mainTextApiWay.text =
|
||||||
|
"Activated by ${YukiHookModuleStatus.executorName} API ${YukiHookModuleStatus.executorVersion}"
|
||||||
|
isTaiChiModuleActive -> binding.mainTextApiWay.text = "Activated by TaiChi"
|
||||||
|
else -> binding.mainTextApiWay.text = "Activated by anonymous"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@@ -84,6 +84,17 @@ val Context.versionName get() = packageInfo.versionName ?: ""
|
|||||||
*/
|
*/
|
||||||
val Context.versionCode get() = packageInfo.versionCode
|
val Context.versionCode get() = packageInfo.versionCode
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得到版本信息与版本号
|
||||||
|
* @param packageName 包名
|
||||||
|
* @return [String]
|
||||||
|
*/
|
||||||
|
fun Context.version(packageName: String) = safeOfNothing {
|
||||||
|
packageManager?.getPackageInfo(packageName, 0)?.let {
|
||||||
|
"${it.versionName}(${it.versionCode})"
|
||||||
|
} ?: ""
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 网络连接是否正常
|
* 网络连接是否正常
|
||||||
* @return [Boolean] 网络是否连接
|
* @return [Boolean] 网络是否连接
|
||||||
|
@@ -111,154 +111,111 @@
|
|||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<HorizontalScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="7dp"
|
android:fadingEdgeLength="10dp"
|
||||||
android:gravity="center|start"
|
android:fillViewport="true"
|
||||||
android:orientation="horizontal">
|
android:requiresFadingEdge="horizontal"
|
||||||
|
android:scrollbars="none">
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:layout_width="15dp"
|
|
||||||
android:layout_height="15dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:src="@mipmap/ic_qq_icon" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/main_text_qq_noinstall"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="3dp"
|
android:gravity="center|start"
|
||||||
android:alpha="0.8"
|
android:orientation="horizontal">
|
||||||
android:background="@drawable/bg_red_round"
|
|
||||||
android:paddingLeft="3dp"
|
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:paddingRight="3dp"
|
|
||||||
android:paddingBottom="2dp"
|
|
||||||
android:text="未安装"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="8sp"
|
|
||||||
tools:ignore="SmallSp" />
|
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/main_qq_item"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.8"
|
android:layout_marginEnd="10dp"
|
||||||
android:text="兼容"
|
android:gravity="center|start"
|
||||||
android:textColor="@color/white"
|
android:orientation="horizontal">
|
||||||
android:textSize="11sp" />
|
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/main_text_support_qq"
|
android:layout_width="14dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="14dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginEnd="5dp"
|
||||||
android:alpha="0.8"
|
android:src="@mipmap/ic_qq_icon" />
|
||||||
android:ellipsize="end"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="%1"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="11sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/main_text_qq_ver"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:alpha="0.8"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="%1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/main_tim_item"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:gravity="center|start"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:src="@mipmap/ic_tim_icon" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/main_text_tim_ver"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:alpha="0.8"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="%1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/main_wechat_item"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center|start"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:src="@mipmap/ic_wechat_icon" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/main_text_wechat_ver"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:alpha="0.8"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="%1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/main_text_api_way"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="7dp"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center|start"
|
android:alpha="0.6"
|
||||||
android:orientation="horizontal">
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
<ImageView
|
android:text="%1"
|
||||||
android:layout_width="15dp"
|
android:textColor="@color/white"
|
||||||
android:layout_height="15dp"
|
android:textSize="11sp"
|
||||||
android:layout_marginEnd="5dp"
|
android:visibility="gone" />
|
||||||
android:src="@mipmap/ic_tim_icon" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/main_text_tim_noinstall"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="3dp"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:background="@drawable/bg_red_round"
|
|
||||||
android:paddingLeft="3dp"
|
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:paddingRight="3dp"
|
|
||||||
android:paddingBottom="2dp"
|
|
||||||
android:text="未安装"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="8sp"
|
|
||||||
tools:ignore="SmallSp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:text="兼容"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="11sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/main_text_support_tim"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="%1"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="11sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center|start"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="15dp"
|
|
||||||
android:layout_height="15dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:src="@mipmap/ic_wechat_icon" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/main_text_wechat_noinstall"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="3dp"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:background="@drawable/bg_red_round"
|
|
||||||
android:paddingLeft="3dp"
|
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:paddingRight="3dp"
|
|
||||||
android:paddingBottom="2dp"
|
|
||||||
android:text="未安装"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="8sp"
|
|
||||||
tools:ignore="SmallSp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:text="兼容"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="11sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/main_text_support_wechat"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="%1"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="11sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -300,7 +257,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.6"
|
android:alpha="0.6"
|
||||||
android:lineSpacingExtra="5dp"
|
android:lineSpacingExtra="5dp"
|
||||||
android:text="上述列出的版本号为最佳兼容版本,你可以点击进行查看。\n没有标注的版本在适配范围内的 APP 适用性都将有效,但可能不能达到最佳使用效果。\n如果当前版本失效请看下方的联系方式。"
|
android:text="你可以点击上述每个图标查看最佳兼容的 APP 版本。\n没有标注的版本在适配范围内的 APP 适用性都将有效,但可能不能达到最佳使用效果,建议保持使用适配内的版本。"
|
||||||
android:textColor="@color/colorTextGray"
|
android:textColor="@color/colorTextGray"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
tools:ignore="SmallSp" />
|
tools:ignore="SmallSp" />
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 5.2 KiB |
Reference in New Issue
Block a user