mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-05 02:05:16 +08:00
575 lines
26 KiB
XML
575 lines
26 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||
xmlns:tools="http://schemas.android.com/tools"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:orientation="vertical"
|
||
tools:context=".ui.MainActivity"
|
||
tools:ignore="HardcodedText,UseCompoundDrawables,ContentDescription">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:background="@color/white"
|
||
android:elevation="0dp"
|
||
android:paddingLeft="15dp"
|
||
android:paddingTop="13dp"
|
||
android:paddingRight="15dp"
|
||
android:paddingBottom="5dp">
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:singleLine="true"
|
||
android:text="TSBattery"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="30sp"
|
||
android:textStyle="bold" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout
|
||
android:id="@+id/main_lin_status"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginLeft="15dp"
|
||
android:layout_marginTop="10dp"
|
||
android:layout_marginRight="15dp"
|
||
android:layout_marginBottom="5dp"
|
||
android:background="@drawable/dark_round"
|
||
android:elevation="0dp"
|
||
android:gravity="center">
|
||
|
||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||
android:id="@+id/main_img_status"
|
||
android:layout_width="25dp"
|
||
android:layout_height="25dp"
|
||
android:layout_marginStart="25dp"
|
||
android:layout_marginEnd="5dp"
|
||
android:src="@mipmap/warn"
|
||
android:tint="@color/white" />
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:orientation="vertical"
|
||
android:paddingLeft="20dp"
|
||
android:paddingTop="10dp"
|
||
android:paddingRight="20dp"
|
||
android:paddingBottom="10dp">
|
||
|
||
<TextView
|
||
android:id="@+id/main_text_status"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="5dp"
|
||
android:text="模块未激活"
|
||
android:textColor="@color/white"
|
||
android:textSize="18sp" />
|
||
|
||
<TextView
|
||
android:id="@+id/main_text_version"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.8"
|
||
android:text="当前版本:%1"
|
||
android:textColor="@color/white"
|
||
android:textSize="13sp" />
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="7dp"
|
||
android:gravity="center|start"
|
||
android:orientation="horizontal">
|
||
|
||
<ImageView
|
||
android:layout_width="15dp"
|
||
android:layout_height="15dp"
|
||
android:layout_marginEnd="5dp"
|
||
android:src="@mipmap/qq_icon" />
|
||
|
||
<TextView
|
||
android:id="@+id/main_text_qq_noinstall"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginEnd="3dp"
|
||
android:alpha="0.8"
|
||
android:background="@drawable/red_round"
|
||
android:paddingLeft="2dp"
|
||
android:paddingTop="1dp"
|
||
android:paddingRight="2dp"
|
||
android:paddingBottom="1dp"
|
||
android:text="未安装"
|
||
android:textColor="@color/white"
|
||
android:textSize="9sp"
|
||
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_qq"
|
||
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:layout_marginBottom="7dp"
|
||
android:gravity="center|start"
|
||
android:orientation="horizontal">
|
||
|
||
<ImageView
|
||
android:layout_width="15dp"
|
||
android:layout_height="15dp"
|
||
android:layout_marginEnd="5dp"
|
||
android:src="@mipmap/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/red_round"
|
||
android:paddingLeft="2dp"
|
||
android:paddingTop="1dp"
|
||
android:paddingRight="2dp"
|
||
android:paddingBottom="1dp"
|
||
android:text="未安装"
|
||
android:textColor="@color/white"
|
||
android:textSize="9sp"
|
||
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/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/red_round"
|
||
android:paddingLeft="2dp"
|
||
android:paddingTop="1dp"
|
||
android:paddingRight="2dp"
|
||
android:paddingBottom="1dp"
|
||
android:text="未安装"
|
||
android:textColor="@color/white"
|
||
android:textSize="9sp"
|
||
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>
|
||
|
||
<androidx.core.widget.NestedScrollView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:layout_marginBottom="10dp"
|
||
android:fadingEdgeLength="10dp"
|
||
android:fillViewport="true"
|
||
android:requiresFadingEdge="vertical">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:orientation="vertical">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginLeft="15dp"
|
||
android:layout_marginTop="10dp"
|
||
android:layout_marginRight="15dp"
|
||
android:background="@drawable/permotion_round"
|
||
android:elevation="0dp"
|
||
android:gravity="center"
|
||
android:orientation="horizontal"
|
||
android:padding="15dp">
|
||
|
||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||
android:layout_width="15dp"
|
||
android:layout_height="15dp"
|
||
android:layout_marginEnd="15dp"
|
||
android:alpha="0.85"
|
||
android:src="@mipmap/about"
|
||
android:tint="#FF777777" />
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:alpha="0.6"
|
||
android:lineSpacingExtra="5dp"
|
||
android:text="上述列出的版本号为最佳兼容版本,你可以点击进行查看。\n这些标注过的版本在适配范围内的 APP 都将有效,但可能不能达到最佳使用效果。\n如果当前版本失效请看下方的联系方式。"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="10sp"
|
||
tools:ignore="SmallSp" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginLeft="15dp"
|
||
android:layout_marginTop="10dp"
|
||
android:layout_marginRight="15dp"
|
||
android:background="@drawable/permotion_round"
|
||
android:elevation="0dp"
|
||
android:gravity="center"
|
||
android:orientation="vertical"
|
||
android:paddingLeft="15dp"
|
||
android:paddingRight="15dp">
|
||
|
||
<com.fankes.tsbattery.view.MaterialSwitch
|
||
android:id="@+id/protect_mode_switch"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:text="启用保守模式"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="15sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.6"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="此选项默认关闭,默认情况下模块将会干掉 QQ 和 TIM 自身的电源锁控制类,开启后模块将只对系统电源锁生效,如果你的 QQ 或 TIM 视频通话等设置发生了故障,可以尝试开启这个功能,开启后请重启 QQ 或 TIM,暂不支持微信。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginLeft="15dp"
|
||
android:layout_marginTop="15dp"
|
||
android:layout_marginRight="15dp"
|
||
android:background="@drawable/permotion_round"
|
||
android:elevation="0dp"
|
||
android:gravity="center"
|
||
android:orientation="vertical"
|
||
android:paddingLeft="15dp"
|
||
android:paddingRight="15dp">
|
||
|
||
<com.fankes.tsbattery.view.MaterialSwitch
|
||
android:id="@+id/notify_module_info_switch"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:text="提示模块运行信息"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="15sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.6"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="模块工作正常情况下无需开启,如果你想测试模块是否正常激活,可以打开此提示,开启后将会在启动 QQ、TIM 或微信的时候提示运行信息。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginLeft="15dp"
|
||
android:layout_marginTop="15dp"
|
||
android:layout_marginRight="15dp"
|
||
android:background="@drawable/permotion_round"
|
||
android:elevation="0dp"
|
||
android:gravity="center"
|
||
android:orientation="vertical"
|
||
android:paddingLeft="15dp"
|
||
android:paddingRight="15dp">
|
||
|
||
<com.fankes.tsbattery.view.MaterialSwitch
|
||
android:id="@+id/hide_icon_in_launcher_switch"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:text="在桌面隐藏模块图标"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="15sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.6"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="隐藏模块图标后,模块不会再在桌面显示,你可以在 EdXposed、太极、LsPosed 中找到模块设置并打开,对原生系统无效。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginLeft="15dp"
|
||
android:layout_marginTop="15dp"
|
||
android:layout_marginRight="15dp"
|
||
android:background="@drawable/permotion_round"
|
||
android:elevation="0dp"
|
||
android:gravity="center"
|
||
android:orientation="vertical"
|
||
android:padding="15dp">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:gravity="center|start">
|
||
|
||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||
android:layout_width="15dp"
|
||
android:layout_height="15dp"
|
||
android:layout_marginEnd="5dp"
|
||
android:alpha="0.85"
|
||
android:src="@mipmap/about"
|
||
android:tint="#FF323B42" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:alpha="0.85"
|
||
android:singleLine="true"
|
||
android:text="使用帮助与说明"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="12sp" />
|
||
</LinearLayout>
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.8"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="Q.这个模块是做什么的?\nA.此模块的诞生来源于国内厂商毒瘤 APP 强行霸占后台耗电,QQ 在 8.6.0 版本以后也只是接入了 HMS 推送,但是可笑的是开发组却并没有删除之前疯狂耗电的接收消息方法,于是这个模块就诞生了。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.8"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="Q.原理是什么?\nA.模块有两套工作方式,一种是针对 QQ、TIM Hook 掉系统自身的电源锁“WakeLock”使其不能影响系统休眠,这样子在锁屏的时候 QQ、TIM 就可以进入睡眠状态。第二种就是针对 QQ、TIM 删除其自身的无用耗电疯狂循环检测后台强行保活服务。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.8"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="Q.如何使用?\nA.目前模块支持 EdXposed、LsPosed 以及太极(无极)框架,在太极和 LsPosed 的作用域中,只需勾选 QQ 和 TIM 即可,模块可以做到即插即用,激活后无需重启手机,重启 QQ 或 TIM 就可以了。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.8"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="Q.激活后一定可以非常省电吗?\nA.并不,模块只能减少 QQ、TIM 的耗电,但是请务必记住这一点,省电只是一个理论上的东西,实际水平由你使用的系统和硬件决定,如果你在前台疯狂使用 QQ、TIM,那么照样会耗电,模块只能保证后台运行和锁屏时毒瘤不会消耗过多的无用的电量,仅此而已。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.8"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="Q.关于目前微信的适配情况?\nA.微信适配尚在实验阶段,敬请期待。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:alpha="0.8"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="Q.如何对单独的 APP 生效模块?\nA.请在 LsPosed 中勾选对应定义域即可,我们不建议使用 EdXposed。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:alpha="0.8"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="Q.如何反馈问题?\nA.酷安关注 @星夜不荟"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout
|
||
android:id="@+id/link_with_project_address"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginLeft="15dp"
|
||
android:layout_marginTop="15dp"
|
||
android:layout_marginRight="15dp"
|
||
android:background="@drawable/permotion_round"
|
||
android:elevation="0dp"
|
||
android:gravity="center"
|
||
android:orientation="vertical"
|
||
android:padding="15dp">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:gravity="center|start">
|
||
|
||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||
android:layout_width="15dp"
|
||
android:layout_height="15dp"
|
||
android:layout_marginEnd="5dp"
|
||
android:alpha="0.85"
|
||
android:src="@mipmap/about"
|
||
android:tint="#FF323B42" />
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:alpha="0.85"
|
||
android:singleLine="true"
|
||
android:text="项目地址"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="12sp" />
|
||
</LinearLayout>
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:alpha="0.8"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="本软件是免费开源项目,遵循 GPL 协议,你可以点击这里前往 Github 查看源码以及获取模块更新。\n严禁以任何形式贩卖、商用本软件,否则开发者有权追究其法律责任。"
|
||
android:textColor="#777777"
|
||
android:textSize="12sp" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginLeft="15dp"
|
||
android:layout_marginTop="15dp"
|
||
android:layout_marginRight="15dp"
|
||
android:layout_marginBottom="10dp"
|
||
android:background="@drawable/permotion_round"
|
||
android:elevation="0dp"
|
||
android:gravity="center"
|
||
android:orientation="vertical"
|
||
android:paddingLeft="15dp"
|
||
android:paddingRight="15dp">
|
||
|
||
<TextView
|
||
android:id="@+id/link_with_follow_me"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="10dp"
|
||
android:layout_marginBottom="10dp"
|
||
android:gravity="center"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="恰饭时间\n点击前往酷安关注我,获取我的更多应用"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="16sp" />
|
||
|
||
<androidx.cardview.widget.CardView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
app:cardCornerRadius="15dp"
|
||
app:cardElevation="0dp">
|
||
|
||
<ImageView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:src="@mipmap/qr_pay" />
|
||
</androidx.cardview.widget.CardView>
|
||
|
||
<TextView
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginBottom="10dp"
|
||
android:gravity="center"
|
||
android:lineSpacingExtra="6dp"
|
||
android:text="开发者 酷安 @星夜不荟\n未经允许不得转载、修改复制我的劳动成果"
|
||
android:textColor="#FF323B42"
|
||
android:textSize="16sp" />
|
||
</LinearLayout>
|
||
</LinearLayout>
|
||
</androidx.core.widget.NestedScrollView>
|
||
</LinearLayout> |