mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-02 17:07:41 +08:00
parent
0c380caebd
commit
eab6c5b049
@ -51,7 +51,6 @@ data class Rule(
|
||||
//免打扰(禁用转发)时间段
|
||||
@ColumnInfo(name = "silent_period_start", defaultValue = "0") var silentPeriodStart: Int = 0,
|
||||
@ColumnInfo(name = "silent_period_end", defaultValue = "0") var silentPeriodEnd: Int = 0,
|
||||
@ColumnInfo(name = "uid", defaultValue = "0") var uid: Int = 0,
|
||||
) : Parcelable {
|
||||
|
||||
companion object {
|
||||
@ -135,6 +134,7 @@ data class Rule(
|
||||
FILED_PHONE_NUM -> R.id.rb_phone
|
||||
FILED_CALL_TYPE -> R.id.rb_call_type
|
||||
FILED_PACKAGE_NAME -> R.id.rb_package_name
|
||||
FILED_UID -> R.id.rb_uid
|
||||
FILED_INFORM_CONTENT -> R.id.rb_inform_content
|
||||
FILED_MULTI_MATCH -> R.id.rb_multi_match
|
||||
else -> R.id.rb_transpond_all
|
||||
@ -159,14 +159,11 @@ data class Rule(
|
||||
//检查这一行和上一行合并的结果是否命中
|
||||
var mixChecked = false
|
||||
if (msg != null) {
|
||||
if(this.uid != 0 && msg.uid != this.uid){
|
||||
Log.i(TAG, "rule:$this checkMsg:$msg checked:false")
|
||||
return false
|
||||
}
|
||||
//先检查规则是否命中
|
||||
when (this.filed) {
|
||||
FILED_TRANSPOND_ALL -> mixChecked = true
|
||||
FILED_PHONE_NUM, FILED_PACKAGE_NAME -> mixChecked = checkValue(msg.from)
|
||||
FILED_UID -> mixChecked = checkValue(msg.uid.toString())
|
||||
FILED_CALL_TYPE -> mixChecked = checkValue(msg.callType.toString())
|
||||
FILED_MSG_CONTENT, FILED_INFORM_CONTENT -> mixChecked = checkValue(msg.content)
|
||||
FILED_MULTI_MATCH -> mixChecked = RuleLineUtils.checkRuleLines(msg, this.value)
|
||||
|
@ -130,18 +130,19 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
||||
initAppSpinner()
|
||||
//监听已安装App信息列表加载完成事件
|
||||
LiveEventBus.get(EVENT_LOAD_APP_LIST, String::class.java).observeStickyForever(appListObserver)
|
||||
binding!!.layoutUid.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
"call" -> {
|
||||
titleBar?.setTitle(R.string.call_rule)
|
||||
binding!!.rbContent.visibility = View.GONE
|
||||
binding!!.rbPackageName.visibility = View.GONE
|
||||
binding!!.rbUid.visibility = View.GONE
|
||||
binding!!.rbInformContent.visibility = View.GONE
|
||||
//binding!!.rbMultiMatch.visibility = View.GONE
|
||||
binding!!.tvMuRuleTips.setText(R.string.mu_rule_call_tips)
|
||||
binding!!.btInsertContent.visibility = View.GONE
|
||||
binding!!.btInsertSenderApp.visibility = View.GONE
|
||||
binding!!.btInsertUid.visibility = View.GONE
|
||||
binding!!.btInsertTitleApp.visibility = View.GONE
|
||||
binding!!.btInsertContentApp.visibility = View.GONE
|
||||
|
||||
@ -158,18 +159,18 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
||||
binding!!.spCallType.selectedIndex = callTypeIndex
|
||||
}
|
||||
binding!!.spCallType.selectedIndex = callTypeIndex
|
||||
binding!!.layoutUid.visibility = View.GONE
|
||||
}
|
||||
|
||||
else -> {
|
||||
titleBar?.setTitle(R.string.sms_rule)
|
||||
binding!!.rbCallType.visibility = View.GONE
|
||||
binding!!.rbPackageName.visibility = View.GONE
|
||||
binding!!.rbUid.visibility = View.GONE
|
||||
binding!!.rbInformContent.visibility = View.GONE
|
||||
binding!!.btInsertSenderApp.visibility = View.GONE
|
||||
binding!!.btInsertUid.visibility = View.GONE
|
||||
binding!!.btInsertTitleApp.visibility = View.GONE
|
||||
binding!!.btInsertContentApp.visibility = View.GONE
|
||||
binding!!.layoutUid.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,6 +190,7 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
||||
binding!!.btInsertSender.setOnClickListener(this)
|
||||
binding!!.btInsertContent.setOnClickListener(this)
|
||||
binding!!.btInsertSenderApp.setOnClickListener(this)
|
||||
binding!!.btInsertUid.setOnClickListener(this)
|
||||
binding!!.btInsertTitleApp.setOnClickListener(this)
|
||||
binding!!.btInsertContentApp.setOnClickListener(this)
|
||||
binding!!.btInsertExtra.setOnClickListener(this)
|
||||
@ -320,6 +322,11 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
||||
return
|
||||
}
|
||||
|
||||
R.id.bt_insert_uid -> {
|
||||
CommonUtils.insertOrReplaceText2Cursor(etSmsTemplate, getString(R.string.tag_uid))
|
||||
return
|
||||
}
|
||||
|
||||
R.id.bt_insert_title_app -> {
|
||||
CommonUtils.insertOrReplaceText2Cursor(etSmsTemplate, getString(R.string.tag_title))
|
||||
return
|
||||
@ -595,7 +602,6 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
||||
binding!!.sbStatus.isChecked = rule.statusChecked
|
||||
silentPeriodStart = rule.silentPeriodStart
|
||||
silentPeriodEnd = rule.silentPeriodEnd
|
||||
binding!!.etUid.setText(rule.uid.toString())
|
||||
//初始化发送通道下拉框
|
||||
initSenderSpinner()
|
||||
}
|
||||
@ -612,6 +618,7 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
||||
R.id.rb_phone -> FILED_PHONE_NUM
|
||||
R.id.rb_call_type -> FILED_CALL_TYPE
|
||||
R.id.rb_package_name -> FILED_PACKAGE_NAME
|
||||
R.id.rb_uid -> FILED_UID
|
||||
R.id.rb_inform_content -> FILED_INFORM_CONTENT
|
||||
R.id.rb_multi_match -> FILED_MULTI_MATCH
|
||||
else -> FILED_TRANSPOND_ALL
|
||||
@ -662,11 +669,6 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
||||
//if (status == STATUS_OFF) {
|
||||
// throw Exception(getString(R.string.invalid_rule_status))
|
||||
//}
|
||||
val uidText = binding!!.etUid.text
|
||||
var uid = 0
|
||||
if(uidText!=null&& uidText.isNotEmpty()){
|
||||
uid = uidText.toString().toInt()
|
||||
}
|
||||
return Rule(
|
||||
ruleId,
|
||||
ruleType,
|
||||
@ -682,8 +684,7 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
||||
senderListSelected,
|
||||
senderLogic,
|
||||
silentPeriodStart,
|
||||
silentPeriodEnd,
|
||||
uid
|
||||
silentPeriodEnd
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@file:Suppress("unused")
|
||||
@file:Suppress("unused", "DEPRECATION")
|
||||
|
||||
package com.idormy.sms.forwarder.utils
|
||||
|
||||
@ -104,6 +104,7 @@ const val FILED_TRANSPOND_ALL = "transpond_all"
|
||||
const val FILED_PHONE_NUM = "phone_num"
|
||||
const val FILED_CALL_TYPE = "call_type"
|
||||
const val FILED_PACKAGE_NAME = "package_name"
|
||||
const val FILED_UID = "uid"
|
||||
const val FILED_MSG_CONTENT = "msg_content"
|
||||
const val FILED_INFORM_CONTENT = "inform_content"
|
||||
const val FILED_MULTI_MATCH = "multi_match"
|
||||
@ -139,6 +140,7 @@ val FILED_MAP = object : HashMap<String, String>() {
|
||||
put("package_name", getString(R.string.rule_package_name))
|
||||
put("inform_content", getString(R.string.rule_inform_content))
|
||||
put("call_type", getString(R.string.rule_call_type))
|
||||
put("uid", getString(R.string.rule_uid))
|
||||
}
|
||||
}
|
||||
val CHECK_MAP = object : HashMap<String, String>() {
|
||||
@ -180,6 +182,7 @@ val BARK_ENCRYPTION_ALGORITHM_MAP = mapOf(
|
||||
"AES256/CBC/PKCS7Padding" to "AES256/CBC/PKCS7Padding",
|
||||
"AES256/ECB/PKCS7Padding" to "AES256/ECB/PKCS7Padding",
|
||||
)
|
||||
|
||||
//通话类型:1.来电挂机 2.去电挂机 3.未接来电 4.来电提醒 5.来电接通 6.去电拨出
|
||||
val CALL_TYPE_MAP = mapOf(
|
||||
//"0" to getString(R.string.unknown_call),
|
||||
@ -470,4 +473,36 @@ var CLIENT_FRAGMENT_LIST = listOf(
|
||||
CoreAnim.slide,
|
||||
R.drawable.icon_api_battery_query
|
||||
),
|
||||
)
|
||||
|
||||
//自动任务
|
||||
var TASK_FRAGMENT_LIST = listOf(
|
||||
PageInfo(
|
||||
getString(R.string.dingtalk_robot),
|
||||
"com.idormy.sms.forwarder.fragment.senders.DingtalkGroupRobotFragment",
|
||||
"{\"\":\"\"}",
|
||||
CoreAnim.slide,
|
||||
R.drawable.icon_dingtalk
|
||||
),
|
||||
PageInfo(
|
||||
getString(R.string.email),
|
||||
"com.idormy.sms.forwarder.fragment.senders.EmailFragment",
|
||||
"{\"\":\"\"}",
|
||||
CoreAnim.slide,
|
||||
R.drawable.icon_email
|
||||
),
|
||||
PageInfo(
|
||||
getString(R.string.bark),
|
||||
"com.idormy.sms.forwarder.fragment.senders.BarkFragment",
|
||||
"{\"\":\"\"}",
|
||||
CoreAnim.slide,
|
||||
R.drawable.icon_bark
|
||||
),
|
||||
PageInfo(
|
||||
getString(R.string.webhook),
|
||||
"com.idormy.sms.forwarder.fragment.senders.WebhookFragment",
|
||||
"{\"\":\"\"}",
|
||||
CoreAnim.slide,
|
||||
R.drawable.icon_webhook
|
||||
),
|
||||
)
|
@ -15,6 +15,7 @@ class RuleLine(line: String, lineNum: Int, beforeRuleLine: RuleLine?) {
|
||||
val FILED_PHONE_NUM: String = getString(R.string.FILED_PHONE_NUM)
|
||||
val FILED_MSG_CONTENT: String = getString(R.string.FILED_MSG_CONTENT)
|
||||
val FILED_PACKAGE_NAME: String = getString(R.string.FILED_PACKAGE_NAME)
|
||||
val FILED_UID: String = getString(R.string.FILED_UID)
|
||||
val FILED_INFORM_TITLE: String = getString(R.string.FILED_INFORM_TITLE)
|
||||
val FILED_INFORM_CONTENT: String = getString(R.string.FILED_INFORM_CONTENT)
|
||||
val FILED_SIM_SLOT_INFO: String = getString(R.string.FILED_SIM_SLOT_INFO)
|
||||
@ -59,6 +60,7 @@ class RuleLine(line: String, lineNum: Int, beforeRuleLine: RuleLine?) {
|
||||
FILED_LIST.add(FILED_INFORM_TITLE)
|
||||
FILED_LIST.add(FILED_SIM_SLOT_INFO)
|
||||
FILED_LIST.add(FILED_CALL_TYPE)
|
||||
FILED_LIST.add(FILED_UID)
|
||||
}
|
||||
|
||||
init {
|
||||
@ -101,6 +103,7 @@ class RuleLine(line: String, lineNum: Int, beforeRuleLine: RuleLine?) {
|
||||
var mixChecked = false
|
||||
when (field) {
|
||||
FILED_PHONE_NUM, FILED_PACKAGE_NAME -> mixChecked = checkValue(msg.from)
|
||||
FILED_UID -> mixChecked = checkValue(msg.uid.toString())
|
||||
FILED_CALL_TYPE -> mixChecked = checkValue(msg.callType.toString())
|
||||
FILED_MSG_CONTENT, FILED_INFORM_CONTENT -> mixChecked = checkValue(msg.content)
|
||||
FILED_INFORM_TITLE, FILED_SIM_SLOT_INFO -> mixChecked = checkValue(msg.simInfo)
|
||||
@ -123,15 +126,19 @@ class RuleLine(line: String, lineNum: Int, beforeRuleLine: RuleLine?) {
|
||||
CHECK_CONTAIN -> if (msgValue != null) {
|
||||
checked = msgValue.contains(value)
|
||||
}
|
||||
|
||||
CHECK_NOT_CONTAIN -> if (msgValue != null) {
|
||||
checked = !msgValue.contains(value)
|
||||
}
|
||||
|
||||
CHECK_START_WITH -> if (msgValue != null) {
|
||||
checked = msgValue.startsWith(value)
|
||||
}
|
||||
|
||||
CHECK_END_WITH -> if (msgValue != null) {
|
||||
checked = msgValue.endsWith(value)
|
||||
}
|
||||
|
||||
CHECK_REGEX -> if (msgValue != null) {
|
||||
try {
|
||||
//checked = Pattern.matches(this.value, msgValue);
|
||||
@ -149,6 +156,7 @@ class RuleLine(line: String, lineNum: Int, beforeRuleLine: RuleLine?) {
|
||||
logg("Pattern: " + e.pattern)
|
||||
}
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
logg("checkValue $msgValue $check $value checked:$checked")
|
||||
|
4
app/src/main/res/drawable/custom_radio_button.xml
Normal file
4
app/src/main/res/drawable/custom_radio_button.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/custom_radio_button_checked" android:state_checked="true" />
|
||||
<item android:drawable="@drawable/custom_radio_button_unchecked" android:state_checked="false" />
|
||||
</selector>
|
10
app/src/main/res/drawable/custom_radio_button_checked.xml
Normal file
10
app/src/main/res/drawable/custom_radio_button_checked.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="18dp"
|
||||
android:height="18dp"
|
||||
android:tint="@color/colorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5 5,-2.24 5,-5 -2.24,-5 -5,-5zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
|
||||
</vector>
|
10
app/src/main/res/drawable/custom_radio_button_unchecked.xml
Normal file
10
app/src/main/res/drawable/custom_radio_button_unchecked.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="18dp"
|
||||
android:height="18dp"
|
||||
android:tint="@color/gray_text_light"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
|
||||
</vector>
|
@ -78,8 +78,8 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_sender_logic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
@ -143,28 +143,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutUid"
|
||||
style="@style/ruleBarStyleWithSwitch"
|
||||
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:layout_marginStart="5dp"
|
||||
android:text="@string/uid"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.xuexiang.xui.widget.edittext.materialedittext.MaterialEditText
|
||||
android:id="@+id/et_uid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
app:met_clearButton="true" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/ruleBarStyleWithSwitch"
|
||||
android:layout_width="match_parent"
|
||||
@ -209,6 +187,11 @@
|
||||
style="@style/rg_rb_style_wrap"
|
||||
android:text="@string/package_name" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_uid"
|
||||
style="@style/rg_rb_style_wrap"
|
||||
android:text="@string/uid" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_inform_content"
|
||||
style="@style/rg_rb_style_wrap"
|
||||
@ -222,6 +205,7 @@
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_match_type"
|
||||
style="@style/ruleBarStyle"
|
||||
@ -308,8 +292,8 @@
|
||||
|
||||
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
|
||||
android:id="@+id/sp_call_type"
|
||||
android:layout_marginTop="@dimen/config_margin_4dp"
|
||||
style="@style/Material.SpinnerStyle"
|
||||
android:layout_marginTop="@dimen/config_margin_4dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
@ -419,6 +403,12 @@
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="@string/insert_sender_app" />
|
||||
|
||||
<com.xuexiang.xui.widget.button.shadowbutton.RippleShadowShadowButton
|
||||
android:id="@+id/bt_insert_uid"
|
||||
style="@style/insertButtonStyle"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="@string/insert_uid" />
|
||||
|
||||
<com.xuexiang.xui.widget.button.shadowbutton.RippleShadowShadowButton
|
||||
android:id="@+id/bt_insert_title_app"
|
||||
style="@style/insertButtonStyle"
|
||||
|
@ -198,25 +198,19 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_msg_type"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/sampleText" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_markdown"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/sampleMarkdown" />
|
||||
|
||||
</RadioGroup>
|
||||
|
@ -175,25 +175,19 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_msg_type"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/sampleText" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_markdown"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/sampleMarkdown" />
|
||||
|
||||
</RadioGroup>
|
||||
|
@ -103,21 +103,18 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_msg_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="3dp"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/feishu_msg_type_text" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_interactive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/feishu_msg_type_interactive" />
|
||||
|
||||
|
@ -133,21 +133,18 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_msg_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/feishu_msg_type_text" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_interactive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/feishu_msg_type_interactive" />
|
||||
|
||||
|
@ -84,20 +84,14 @@
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_website_plus"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/pushplus_plus"
|
||||
android:textSize="11sp" />
|
||||
android:text="@string/pushplus_plus" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_website_hxtrip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/pushplus_hxtrip"
|
||||
android:textSize="11sp" />
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/pushplus_hxtrip" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
@ -63,32 +63,25 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_method"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_mqtt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/mqtt"
|
||||
android:textSize="14sp" />
|
||||
android:text="@string/mqtt" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_tcp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tcp"
|
||||
android:textSize="14sp" />
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/tcp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_udp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/udp"
|
||||
android:textSize="14sp" />
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/udp" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
@ -357,24 +350,19 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_uriType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_uriType_tcp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tcp"
|
||||
android:textSize="14sp" />
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/tcp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_uriType_ssl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ssl"
|
||||
android:textSize="14sp" />
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/ssl" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
@ -83,22 +83,19 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_method"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_post"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/post" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_get"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/get" />
|
||||
|
||||
</RadioGroup>
|
||||
|
@ -63,50 +63,30 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_method"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_post"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:scaleX="0.7"
|
||||
android:scaleY="0.7"
|
||||
android:text="@string/post"
|
||||
android:textSize="14sp"
|
||||
android:translationX="18dp" />
|
||||
android:text="@string/post" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_get"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleX="0.7"
|
||||
android:scaleY="0.7"
|
||||
android:text="@string/get"
|
||||
android:textSize="14sp"
|
||||
android:translationX="18dp" />
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/get" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_put"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleX="0.7"
|
||||
android:scaleY="0.7"
|
||||
android:text="@string/put"
|
||||
android:textSize="14sp"
|
||||
android:translationX="18dp" />
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/put" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_method_patch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleX="0.7"
|
||||
android:scaleY="0.7"
|
||||
android:text="@string/patch"
|
||||
android:textSize="14sp"
|
||||
android:translationX="18dp" />
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/patch" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
@ -91,22 +91,19 @@
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_msg_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="3dp"
|
||||
style="@style/rg_style"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:checked="true"
|
||||
android:text="@string/wework_msg_type_text" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_msg_type_markdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/rg_rb_style"
|
||||
android:text="@string/wework_msg_type_markdown" />
|
||||
|
||||
</RadioGroup>
|
||||
|
@ -381,6 +381,7 @@
|
||||
<string name="custom_template_tips">Tip: Insert labels as needed; Leave blank to apply default template</string>
|
||||
<string name="insert_sender">Phone</string>
|
||||
<string name="insert_sender_app">PackageName</string>
|
||||
<string name="insert_uid">UID</string>
|
||||
<string name="insert_content">SMS</string>
|
||||
<string name="insert_title_app">InformTitle</string>
|
||||
<string name="insert_content_app">InformContent</string>
|
||||
@ -621,6 +622,7 @@
|
||||
<string name="rule_package_name">Package Name</string>
|
||||
<string name="rule_inform_content">Inform Content</string>
|
||||
<string name="rule_call_type">Call Type</string>
|
||||
<string name="rule_uid">UID</string>
|
||||
<string name="rule_card">Card</string>
|
||||
<string name="rule_when">When</string>
|
||||
<string name="rule_fw_to">Fw.</string>
|
||||
@ -838,6 +840,7 @@
|
||||
<string name="FILED_PHONE_NUM">PHONE_NUM</string>
|
||||
<string name="FILED_MSG_CONTENT">MSG_CONTENT</string>
|
||||
<string name="FILED_PACKAGE_NAME">PACKAGE_NAME</string>
|
||||
<string name="FILED_UID">UID</string>
|
||||
<string name="FILED_INFORM_TITLE">INFORM_TITLE</string>
|
||||
<string name="FILED_INFORM_CONTENT">INFORM_CONTENT</string>
|
||||
<string name="FILED_SIM_SLOT_INFO">CARD_SLOT</string>
|
||||
|
@ -382,6 +382,7 @@
|
||||
<string name="custom_template_tips">Tip:按需插入内容标签;留空使用默认模版</string>
|
||||
<string name="insert_sender">来源号码</string>
|
||||
<string name="insert_sender_app">APP包名</string>
|
||||
<string name="insert_uid">UID</string>
|
||||
<string name="insert_content">短信内容</string>
|
||||
<string name="insert_title_app">通知标题</string>
|
||||
<string name="insert_content_app">通知内容</string>
|
||||
@ -622,6 +623,7 @@
|
||||
<string name="rule_package_name">APP包名</string>
|
||||
<string name="rule_inform_content">通知内容</string>
|
||||
<string name="rule_call_type">通话类型</string>
|
||||
<string name="rule_uid">UID</string>
|
||||
<string name="rule_card">卡</string>
|
||||
<string name="rule_when">当</string>
|
||||
<string name="rule_fw_to">转发到</string>
|
||||
@ -839,6 +841,7 @@
|
||||
<string name="FILED_PHONE_NUM">手机号</string>
|
||||
<string name="FILED_MSG_CONTENT">短信内容</string>
|
||||
<string name="FILED_PACKAGE_NAME">APP包名</string>
|
||||
<string name="FILED_UID">UID</string>
|
||||
<string name="FILED_INFORM_TITLE">通知标题</string>
|
||||
<string name="FILED_INFORM_CONTENT">通知内容</string>
|
||||
<string name="FILED_SIM_SLOT_INFO">卡槽信息</string>
|
||||
|
@ -175,20 +175,30 @@
|
||||
<style name="rg_rb_style">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:padding">0dp</item>
|
||||
<item name="android:layout_margin">0dp</item>
|
||||
<item name="android:drawablePadding">5dp</item>
|
||||
<item name="android:minHeight">30dp</item>
|
||||
<item name="android:minWidth">30dp</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:button">@drawable/custom_radio_button</item>
|
||||
</style>
|
||||
|
||||
<style name="rg_rb_style_wrap">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:padding">0dp</item>
|
||||
<item name="android:layout_marginEnd">5dp</item>
|
||||
<item name="android:drawablePadding">5dp</item>
|
||||
<item name="android:minHeight">30dp</item>
|
||||
<item name="android:minWidth">30dp</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:layout_marginEnd">5dp</item>
|
||||
<item name="android:button">@drawable/custom_radio_button</item>
|
||||
</style>
|
||||
|
||||
<style name="rg_rb_style_match">
|
||||
@ -196,6 +206,7 @@
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:button">@drawable/custom_radio_button</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user