新增:自动任务·快捷指令 (开发中)
parent
06ce0112a9
commit
a6d1a13d44
@ -0,0 +1,8 @@
|
||||
package com.idormy.sms.forwarder.entity.action
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class CleanerSetting(
|
||||
var description: String = "", //描述
|
||||
var days: Int = 0, //自动删除N天前的转发记录
|
||||
) : Serializable
|
@ -1,10 +1,18 @@
|
||||
package com.idormy.sms.forwarder.entity.action
|
||||
|
||||
import com.idormy.sms.forwarder.utils.HttpServerUtils
|
||||
import java.io.Serializable
|
||||
|
||||
data class HttpServerSetting(
|
||||
var description: String = "", //描述
|
||||
var action: String = "start", //动作: start=启动, stop=停止
|
||||
var startUid: String = "", //手机号码
|
||||
var stopUid: String = "", //短信内容
|
||||
var enableApiClone: Boolean = HttpServerUtils.enableApiClone, //是否启用一键克隆
|
||||
var enableApiSmsSend: Boolean = HttpServerUtils.enableApiSmsSend, //是否启用远程发短信
|
||||
var enableApiSmsQuery: Boolean = HttpServerUtils.enableApiSmsQuery, //是否启用远程查短信
|
||||
var enableApiCallQuery: Boolean = HttpServerUtils.enableApiCallQuery, //是否启用远程查通话记录
|
||||
var enableApiContactQuery: Boolean = HttpServerUtils.enableApiContactQuery, //是否启用远程查联系人
|
||||
var enableApiContactAdd: Boolean = HttpServerUtils.enableApiContactAdd, //是否启用远程加联系人
|
||||
var enableApiWol: Boolean = HttpServerUtils.enableApiWol, //是否启用远程WOL
|
||||
var enableApiLocation: Boolean = HttpServerUtils.enableApiLocation, //是否启用远程找手机
|
||||
var enableApiBatteryQuery: Boolean = HttpServerUtils.enableApiBatteryQuery, //是否启用远程查电量
|
||||
) : Serializable
|
||||
|
@ -0,0 +1,144 @@
|
||||
package com.idormy.sms.forwarder.fragment.action
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.google.gson.Gson
|
||||
import com.idormy.sms.forwarder.R
|
||||
import com.idormy.sms.forwarder.core.BaseFragment
|
||||
import com.idormy.sms.forwarder.databinding.FragmentTasksActionCleanerBinding
|
||||
import com.idormy.sms.forwarder.entity.action.CleanerSetting
|
||||
import com.idormy.sms.forwarder.utils.KEY_BACK_DATA_ACTION
|
||||
import com.idormy.sms.forwarder.utils.KEY_BACK_DESCRIPTION_ACTION
|
||||
import com.idormy.sms.forwarder.utils.KEY_EVENT_DATA_ACTION
|
||||
import com.idormy.sms.forwarder.utils.KEY_TEST_ACTION
|
||||
import com.idormy.sms.forwarder.utils.TASK_ACTION_CLEANER
|
||||
import com.idormy.sms.forwarder.utils.XToastUtils
|
||||
import com.jeremyliao.liveeventbus.LiveEventBus
|
||||
import com.xuexiang.xaop.annotation.SingleClick
|
||||
import com.xuexiang.xpage.annotation.Page
|
||||
import com.xuexiang.xrouter.annotation.AutoWired
|
||||
import com.xuexiang.xrouter.launcher.XRouter
|
||||
import com.xuexiang.xui.utils.CountDownButtonHelper
|
||||
import com.xuexiang.xui.widget.actionbar.TitleBar
|
||||
|
||||
@Page(name = "Cleaner")
|
||||
@Suppress("PrivatePropertyName")
|
||||
class CleanerFragment : BaseFragment<FragmentTasksActionCleanerBinding?>(), View.OnClickListener {
|
||||
|
||||
private val TAG: String = CleanerFragment::class.java.simpleName
|
||||
private var titleBar: TitleBar? = null
|
||||
private var mCountDownHelper: CountDownButtonHelper? = null
|
||||
|
||||
@JvmField
|
||||
@AutoWired(name = KEY_EVENT_DATA_ACTION)
|
||||
var eventData: String? = null
|
||||
|
||||
override fun initArgs() {
|
||||
XRouter.getInstance().inject(this)
|
||||
}
|
||||
|
||||
override fun viewBindingInflate(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup,
|
||||
): FragmentTasksActionCleanerBinding {
|
||||
return FragmentTasksActionCleanerBinding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun initTitle(): TitleBar? {
|
||||
titleBar = super.initTitle()!!.setImmersive(false).setTitle(R.string.task_cleaner)
|
||||
return titleBar
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化控件
|
||||
*/
|
||||
override fun initViews() {
|
||||
//测试按钮增加倒计时,避免重复点击
|
||||
mCountDownHelper = CountDownButtonHelper(binding!!.btnTest, 3)
|
||||
mCountDownHelper!!.setOnCountDownListener(object : CountDownButtonHelper.OnCountDownListener {
|
||||
override fun onCountDown(time: Int) {
|
||||
binding!!.btnTest.text = String.format(getString(R.string.seconds_n), time)
|
||||
}
|
||||
|
||||
override fun onFinished() {
|
||||
binding!!.btnTest.text = getString(R.string.test)
|
||||
}
|
||||
})
|
||||
|
||||
var settingVo = CleanerSetting(getString(R.string.task_cleaner_tips), 0)
|
||||
Log.d(TAG, "initViews eventData:$eventData")
|
||||
if (eventData != null) {
|
||||
settingVo = Gson().fromJson(eventData, CleanerSetting::class.java)
|
||||
Log.d(TAG, "initViews settingVo:$settingVo")
|
||||
}
|
||||
binding!!.xsbDays.setDefaultValue(settingVo.days)
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun initListeners() {
|
||||
binding!!.btnTest.setOnClickListener(this)
|
||||
binding!!.btnDel.setOnClickListener(this)
|
||||
binding!!.btnSave.setOnClickListener(this)
|
||||
LiveEventBus.get(KEY_TEST_ACTION, String::class.java).observe(this) {
|
||||
mCountDownHelper?.finish()
|
||||
|
||||
if (it == "success") {
|
||||
XToastUtils.success("测试通过", 30000)
|
||||
} else {
|
||||
XToastUtils.error(it, 30000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SingleClick
|
||||
override fun onClick(v: View) {
|
||||
try {
|
||||
when (v.id) {
|
||||
R.id.btn_test -> {
|
||||
mCountDownHelper?.start()
|
||||
Thread {
|
||||
try {
|
||||
val settingVo = checkSetting()
|
||||
Log.d(TAG, settingVo.toString())
|
||||
LiveEventBus.get(KEY_TEST_ACTION, String::class.java).post("success")
|
||||
} catch (e: Exception) {
|
||||
LiveEventBus.get(KEY_TEST_ACTION, String::class.java).post(e.message.toString())
|
||||
e.printStackTrace()
|
||||
}
|
||||
}.start()
|
||||
return
|
||||
}
|
||||
|
||||
R.id.btn_del -> {
|
||||
popToBack()
|
||||
return
|
||||
}
|
||||
|
||||
R.id.btn_save -> {
|
||||
val settingVo = checkSetting()
|
||||
val intent = Intent()
|
||||
intent.putExtra(KEY_BACK_DESCRIPTION_ACTION, settingVo.description)
|
||||
intent.putExtra(KEY_BACK_DATA_ACTION, Gson().toJson(settingVo))
|
||||
setFragmentResult(TASK_ACTION_CLEANER, intent)
|
||||
popToBack()
|
||||
return
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
XToastUtils.error(e.message.toString(), 30000)
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
//检查设置
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun checkSetting(): CleanerSetting {
|
||||
val days = binding!!.xsbDays.selectedNumber
|
||||
val description = "自动删除${days}天前的转发记录"
|
||||
return CleanerSetting(description, days)
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25.0dip"
|
||||
android:height="25.0dip"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="25.0"
|
||||
android:viewportHeight="25.0">
|
||||
<path
|
||||
android:fillColor="@color/color_green_primary_default"
|
||||
android:pathData="M6.66,0.66L18.66,0.66A6,6 0,0 1,24.66 6.66L24.66,18.66A6,6 0,0 1,18.66 24.66L6.66,24.66A6,6 0,0 1,0.66 18.66L0.66,6.66A6,6 0,0 1,6.66 0.66z" />
|
||||
<group
|
||||
android:scaleX="0.02"
|
||||
android:scaleY="0.02"
|
||||
android:translateX="2.5"
|
||||
android:translateY="2.5">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M710.6,398.3l-84.8,-84.8 183.9,-183.9c23.4,-23.4 61.4,-23.4 84.8,0l0,0c23.4,23.4 23.4,61.4 0,84.8L710.6,398.3z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M711.5,571.8L451.5,311.8c62.4,-62.4 163.6,-62.4 226.1,0l33.9,33.9c62.4,62.4 62.4,163.6 0,226.1zM411.1,359.2L664.3,612.4c1.9,1.9 2.3,4.7 0.9,7 -13.7,21.9 -82.7,137.8 -101.2,291a1.8,1.8 0,0 1,-2.6 1.4l-86,-51.8c-0.8,-0.5 -1.1,-1.5 -0.7,-2.3 8.1,-16.9 85.5,-179 77.6,-171.1 -8.3,8.3 -61.9,65.2 -102,123.3l-23.1,31.8s-90.5,-60.9 -118.4,-98.8c-0.4,-0.6 -0.5,-1.1 0,-1.6 18.4,-22.3 114.1,-146.7 114.1,-146.7l-162.7,97.6c-0.8,0.4 -1.6,0.3 -2.2,-0.3 -7.9,-8.8 -62.2,-68.8 -77.9,-97 -0.3,-0.6 -0.3,-1.1 0.3,-1.6 15.5,-12.5 103.1,-86.7 103.1,-86.7l-123.3,43.7c-0.9,0.3 -1.8,-0.1 -2.2,-0.9l-45.6,-85.6c-0.6,-1 -0.2,-2.3 1,-2.5 21.7,-4.3 202.9,-42 290.8,-102.7 2.2,-1.5 5.1,-1.2 7,0.8z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M356,248m-52,0a52,52 0,1 0,104 0,52 52,0 1,0 -104,0Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M680,808m-64,0a64,64 0,1 0,128 0,64 64,0 1,0 -128,0Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M800,736m-36,0a36,36 0,1 0,72 0,36 36,0 1,0 -72,0Z" />
|
||||
</group>
|
||||
</vector>
|
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25.0dip"
|
||||
android:height="25.0dip"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="25.0"
|
||||
android:viewportHeight="25.0">
|
||||
<path
|
||||
android:fillColor="@color/auto_task_icon_grey_bg"
|
||||
android:pathData="M6.66,0.66L18.66,0.66A6,6 0,0 1,24.66 6.66L24.66,18.66A6,6 0,0 1,18.66 24.66L6.66,24.66A6,6 0,0 1,0.66 18.66L0.66,6.66A6,6 0,0 1,6.66 0.66z" />
|
||||
<group
|
||||
android:scaleX="0.02"
|
||||
android:scaleY="0.02"
|
||||
android:translateX="2.5"
|
||||
android:translateY="2.5">
|
||||
<path
|
||||
android:fillColor="@color/auto_task_icon_grey"
|
||||
android:pathData="M710.6,398.3l-84.8,-84.8 183.9,-183.9c23.4,-23.4 61.4,-23.4 84.8,0l0,0c23.4,23.4 23.4,61.4 0,84.8L710.6,398.3z" />
|
||||
<path
|
||||
android:fillColor="@color/auto_task_icon_grey"
|
||||
android:pathData="M711.5,571.8L451.5,311.8c62.4,-62.4 163.6,-62.4 226.1,0l33.9,33.9c62.4,62.4 62.4,163.6 0,226.1zM411.1,359.2L664.3,612.4c1.9,1.9 2.3,4.7 0.9,7 -13.7,21.9 -82.7,137.8 -101.2,291a1.8,1.8 0,0 1,-2.6 1.4l-86,-51.8c-0.8,-0.5 -1.1,-1.5 -0.7,-2.3 8.1,-16.9 85.5,-179 77.6,-171.1 -8.3,8.3 -61.9,65.2 -102,123.3l-23.1,31.8s-90.5,-60.9 -118.4,-98.8c-0.4,-0.6 -0.5,-1.1 0,-1.6 18.4,-22.3 114.1,-146.7 114.1,-146.7l-162.7,97.6c-0.8,0.4 -1.6,0.3 -2.2,-0.3 -7.9,-8.8 -62.2,-68.8 -77.9,-97 -0.3,-0.6 -0.3,-1.1 0.3,-1.6 15.5,-12.5 103.1,-86.7 103.1,-86.7l-123.3,43.7c-0.9,0.3 -1.8,-0.1 -2.2,-0.9l-45.6,-85.6c-0.6,-1 -0.2,-2.3 1,-2.5 21.7,-4.3 202.9,-42 290.8,-102.7 2.2,-1.5 5.1,-1.2 7,0.8z" />
|
||||
<path
|
||||
android:fillColor="@color/auto_task_icon_grey"
|
||||
android:pathData="M356,248m-52,0a52,52 0,1 0,104 0,52 52,0 1,0 -104,0Z" />
|
||||
<path
|
||||
android:fillColor="@color/auto_task_icon_grey"
|
||||
android:pathData="M680,808m-64,0a64,64 0,1 0,128 0,64 64,0 1,0 -128,0Z" />
|
||||
<path
|
||||
android:fillColor="@color/auto_task_icon_grey"
|
||||
android:pathData="M800,736m-36,0a36,36 0,1 0,72 0,36 36,0 1,0 -72,0Z" />
|
||||
</group>
|
||||
</vector>
|
@ -0,0 +1,128 @@
|
||||
<?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:background="?attr/xui_config_color_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_margin="10dp"
|
||||
android:contentDescription="@string/task_cleaner"
|
||||
app:srcCompat="@drawable/auto_task_icon_cleaner"
|
||||
tools:ignore="ImageContrastCheck" />
|
||||
|
||||
<LinearLayout
|
||||
style="@style/taskBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/task_cleaner"
|
||||
android:textSize="@dimen/text_size_big"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/task_cleaner_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?attr/xui_config_color_separator_light" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_start_server"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.xuexiang.xui.widget.picker.XSeekBar
|
||||
android:id="@+id/xsb_days"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:xsb_insideRangeLineColor="#0bd97f"
|
||||
app:xsb_insideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_isShowBubble="true"
|
||||
app:xsb_isShowRuler="true"
|
||||
app:xsb_max="60"
|
||||
app:xsb_min="0"
|
||||
app:xsb_numberTextColor="#ffffff"
|
||||
app:xsb_numberTextSize="@dimen/text_size_small"
|
||||
app:xsb_outsideRangeLineColor="#f0f0f0"
|
||||
app:xsb_outsideRangeLineStrokeWidth="10dp"
|
||||
app:xsb_rulerColor="@color/xui_config_color_gray_4"
|
||||
app:xsb_rulerInterval="ten" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="@string/day"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_del"
|
||||
style="@style/SuperButton.Gray.Icon.Spacing"
|
||||
android:drawableStart="@drawable/ic_delete"
|
||||
android:text="@string/discard"
|
||||
tools:ignore="RtlSymmetry,TextContrastCheck,TouchTargetSizeCheck" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_save"
|
||||
style="@style/SuperButton.Blue.Icon.Spacing"
|
||||
android:drawableStart="@drawable/ic_save"
|
||||
android:text="@string/submit"
|
||||
tools:ignore="RtlSymmetry,TextContrastCheck,TouchTargetSizeCheck" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_test"
|
||||
style="@style/SuperButton.Green.Icon.Spacing"
|
||||
android:drawableStart="@drawable/ic_test"
|
||||
android:text="@string/test"
|
||||
tools:ignore="RtlSymmetry,TextContrastCheck,TouchTargetSizeCheck" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,458 @@
|
||||
<?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:background="?attr/xui_config_color_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_margin="10dp"
|
||||
android:contentDescription="@string/task_http_server"
|
||||
app:srcCompat="@drawable/auto_task_icon_http_server"
|
||||
tools:ignore="ImageContrastCheck" />
|
||||
|
||||
<LinearLayout
|
||||
style="@style/taskBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/task_http_server"
|
||||
android:textSize="@dimen/text_size_big"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/task_http_server_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="?attr/xui_config_color_separator_light" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_http_server_state"
|
||||
style="@style/rg_style"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/config_padding_5dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_start_server"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/start_server"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_stop_server"
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/stop_server"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/enable_function"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/enable_function_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_clone"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_clone_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_clone"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_sms_query"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_sms_query_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_query_sms"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_sms_send"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_sms_send_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_send_sms"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_call_query"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_call_query_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_query_call"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_contact_query"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_contact_query_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_query_contacts"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="TooManyViews">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_contact_add"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_contact_add_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_add_contacts"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_wol"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap,TooManyViews" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_wol_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_wol"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_location"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap,TooManyViews" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_location_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_location"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/settingBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="TooManyViews">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_battery_query"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_battery_query_tips"
|
||||
android:textSize="@dimen/text_size_mini"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.button.switchbutton.SwitchButton
|
||||
android:id="@+id/sb_api_query_battery"
|
||||
style="@style/SwitchButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_del"
|
||||
style="@style/SuperButton.Gray.Icon.Spacing"
|
||||
android:drawableStart="@drawable/ic_delete"
|
||||
android:text="@string/discard"
|
||||
tools:ignore="RtlSymmetry,TextContrastCheck,TouchTargetSizeCheck" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_save"
|
||||
style="@style/SuperButton.Blue.Icon.Spacing"
|
||||
android:drawableStart="@drawable/ic_save"
|
||||
android:text="@string/submit"
|
||||
tools:ignore="RtlSymmetry,TextContrastCheck,TouchTargetSizeCheck" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_test"
|
||||
style="@style/SuperButton.Green.Icon.Spacing"
|
||||
android:drawableStart="@drawable/ic_test"
|
||||
android:text="@string/test"
|
||||
tools:ignore="RtlSymmetry,TextContrastCheck,TouchTargetSizeCheck" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue