整理:code review

This commit is contained in:
pppscn 2024-04-04 22:21:22 +08:00
parent 356d16a417
commit 75b0e48815
12 changed files with 24 additions and 57 deletions

View File

@ -149,9 +149,9 @@ class CallQueryFragment : BaseFragment<FragmentClientCallQueryBinding?>() {
//搜索框 //搜索框
binding!!.searchView.findViewById<View>(com.xuexiang.xui.R.id.search_layout).visibility = View.GONE binding!!.searchView.findViewById<View>(com.xuexiang.xui.R.id.search_layout).visibility = View.GONE
binding!!.searchView.setVoiceSearch(true) //binding!!.searchView.setVoiceSearch(true)
binding!!.searchView.setEllipsize(true) binding!!.searchView.setEllipsize(true)
binding!!.searchView.setSuggestions(resources.getStringArray(R.array.query_suggestions)) //binding!!.searchView.setSuggestions(resources.getStringArray(R.array.query_suggestions))
binding!!.searchView.setOnQueryTextListener(object : MaterialSearchView.OnQueryTextListener { binding!!.searchView.setOnQueryTextListener(object : MaterialSearchView.OnQueryTextListener {
override fun onQueryTextSubmit(query: String): Boolean { override fun onQueryTextSubmit(query: String): Boolean {
SnackbarUtils.Indefinite(view, String.format(getString(R.string.search_keyword), query)).info() SnackbarUtils.Indefinite(view, String.format(getString(R.string.search_keyword), query)).info()

View File

@ -131,9 +131,9 @@ class ContactQueryFragment : BaseFragment<FragmentClientContactQueryBinding?>()
//搜索框 //搜索框
binding!!.searchView.findViewById<View>(com.xuexiang.xui.R.id.search_layout).visibility = View.GONE binding!!.searchView.findViewById<View>(com.xuexiang.xui.R.id.search_layout).visibility = View.GONE
binding!!.searchView.setVoiceSearch(true) //binding!!.searchView.setVoiceSearch(true)
binding!!.searchView.setEllipsize(true) binding!!.searchView.setEllipsize(true)
binding!!.searchView.setSuggestions(resources.getStringArray(R.array.query_suggestions)) //binding!!.searchView.setSuggestions(resources.getStringArray(R.array.query_suggestions))
binding!!.searchView.setOnQueryTextListener(object : MaterialSearchView.OnQueryTextListener { binding!!.searchView.setOnQueryTextListener(object : MaterialSearchView.OnQueryTextListener {
override fun onQueryTextSubmit(query: String): Boolean { override fun onQueryTextSubmit(query: String): Boolean {
SnackbarUtils.Indefinite(view, String.format(getString(R.string.search_keyword), query)).info() SnackbarUtils.Indefinite(view, String.format(getString(R.string.search_keyword), query)).info()

View File

@ -137,9 +137,9 @@ class SmsQueryFragment : BaseFragment<FragmentClientSmsQueryBinding?>() {
//搜索框 //搜索框
binding!!.searchView.findViewById<View>(com.xuexiang.xui.R.id.search_layout).visibility = View.GONE binding!!.searchView.findViewById<View>(com.xuexiang.xui.R.id.search_layout).visibility = View.GONE
binding!!.searchView.setVoiceSearch(true) //binding!!.searchView.setVoiceSearch(true)
binding!!.searchView.setEllipsize(true) binding!!.searchView.setEllipsize(true)
binding!!.searchView.setSuggestions(resources.getStringArray(R.array.query_suggestions)) //binding!!.searchView.setSuggestions(resources.getStringArray(R.array.query_suggestions))
binding!!.searchView.setOnQueryTextListener(object : MaterialSearchView.OnQueryTextListener { binding!!.searchView.setOnQueryTextListener(object : MaterialSearchView.OnQueryTextListener {
override fun onQueryTextSubmit(query: String): Boolean { override fun onQueryTextSubmit(query: String): Boolean {
SnackbarUtils.Indefinite(view, String.format(getString(R.string.search_keyword), query)).info() SnackbarUtils.Indefinite(view, String.format(getString(R.string.search_keyword), query)).info()

View File

@ -12,7 +12,7 @@ import java.util.Properties
import javax.mail.Authenticator import javax.mail.Authenticator
import javax.mail.PasswordAuthentication import javax.mail.PasswordAuthentication
@Suppress("PrivatePropertyName", "unused", "DEPRECATION") @Suppress("PrivatePropertyName", "DEPRECATION")
class EmailSender( class EmailSender(
// SMTP参数 // SMTP参数
private val host: String, // SMTP服务器地址 private val host: String, // SMTP服务器地址

View File

@ -36,7 +36,7 @@ import javax.mail.internet.MimeUtility
import javax.mail.util.ByteArrayDataSource import javax.mail.util.ByteArrayDataSource
@Suppress("PrivatePropertyName", "unused") @Suppress("PrivatePropertyName")
class PgpUtils( class PgpUtils(
private val properties: Properties, private val properties: Properties,
private val authenticator: Authenticator, private val authenticator: Authenticator,

View File

@ -36,7 +36,7 @@ import javax.mail.internet.MimeMessage
import javax.mail.internet.MimeMultipart import javax.mail.internet.MimeMultipart
import javax.mail.internet.MimeUtility import javax.mail.internet.MimeUtility
@Suppress("PrivatePropertyName", "unused") @Suppress("PrivatePropertyName")
class SmimeUtils( class SmimeUtils(
private val properties: Properties, private val properties: Properties,
private val authenticator: Authenticator, private val authenticator: Authenticator,

View File

@ -32,6 +32,7 @@ import com.idormy.sms.forwarder.utils.TASK_ACTION_RULE
import com.idormy.sms.forwarder.utils.TASK_ACTION_SENDER import com.idormy.sms.forwarder.utils.TASK_ACTION_SENDER
import com.idormy.sms.forwarder.utils.TASK_ACTION_SENDSMS import com.idormy.sms.forwarder.utils.TASK_ACTION_SENDSMS
import com.idormy.sms.forwarder.utils.TASK_ACTION_SETTINGS import com.idormy.sms.forwarder.utils.TASK_ACTION_SETTINGS
import com.idormy.sms.forwarder.utils.TASK_ACTION_TASK
import com.idormy.sms.forwarder.utils.TASK_CONDITION_APP import com.idormy.sms.forwarder.utils.TASK_CONDITION_APP
import com.idormy.sms.forwarder.utils.TASK_CONDITION_BATTERY import com.idormy.sms.forwarder.utils.TASK_CONDITION_BATTERY
import com.idormy.sms.forwarder.utils.TASK_CONDITION_BLUETOOTH import com.idormy.sms.forwarder.utils.TASK_CONDITION_BLUETOOTH
@ -77,6 +78,7 @@ class TaskUtils private constructor() {
TASK_ACTION_SENDER -> R.drawable.auto_task_icon_sender TASK_ACTION_SENDER -> R.drawable.auto_task_icon_sender
TASK_ACTION_ALARM -> R.drawable.auto_task_icon_alarm TASK_ACTION_ALARM -> R.drawable.auto_task_icon_alarm
TASK_ACTION_RESEND -> R.drawable.auto_task_icon_resend TASK_ACTION_RESEND -> R.drawable.auto_task_icon_resend
TASK_ACTION_TASK -> R.drawable.auto_task_icon_task
else -> R.drawable.auto_task_icon_custom_time else -> R.drawable.auto_task_icon_custom_time
} }
} }
@ -106,6 +108,7 @@ class TaskUtils private constructor() {
TASK_ACTION_SENDER -> R.drawable.auto_task_icon_sender_grey TASK_ACTION_SENDER -> R.drawable.auto_task_icon_sender_grey
TASK_ACTION_ALARM -> R.drawable.auto_task_icon_alarm_grey TASK_ACTION_ALARM -> R.drawable.auto_task_icon_alarm_grey
TASK_ACTION_RESEND -> R.drawable.auto_task_icon_resend_grey TASK_ACTION_RESEND -> R.drawable.auto_task_icon_resend_grey
TASK_ACTION_TASK -> R.drawable.auto_task_icon_task_grey
else -> R.drawable.auto_task_icon_custom_time_grey else -> R.drawable.auto_task_icon_custom_time_grey
} }
} }

View File

@ -1,8 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:autoMirrored="true" android:tint="#ffffffff"
android:tint="#FFFFFF"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<group <group

View File

@ -52,8 +52,8 @@
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner <com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
android:id="@+id/sp_call_type" android:id="@+id/sp_call_type"
android:layout_marginTop="@dimen/config_margin_4dp"
style="@style/Material.SpinnerStyle" style="@style/Material.SpinnerStyle"
android:layout_marginTop="@dimen/config_margin_5dp"
android:visibility="gone" /> android:visibility="gone" />
<TextView <TextView

View File

@ -143,13 +143,17 @@
<item name="android:singleLine">true</item> <item name="android:singleLine">true</item>
<item name="android:padding">0dp</item> <item name="android:padding">0dp</item>
<item name="android:layout_margin">0dp</item> <item name="android:layout_margin">0dp</item>
<item name="android:drawablePadding">5dp</item>S <item name="android:drawablePadding">5dp</item>
<item name="android:minHeight">30dp</item> <item name="android:minHeight">30dp</item>
<item name="android:minWidth">30dp</item> <item name="android:minWidth">30dp</item>
<item name="android:textSize">@dimen/text_size_small</item> <item name="android:textSize">@dimen/text_size_small</item>
<item name="android:button">@drawable/custom_radio_button</item> <item name="android:button">@drawable/custom_radio_button</item>
</style> </style>
<style name="rg_rb_style.mini">
<item name="android:textSize">@dimen/text_size_mini</item>
</style>
<style name="rg_rb_style_wrap"> <style name="rg_rb_style_wrap">
<item name="android:layout_width">wrap_content</item> <item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>

View File

@ -130,49 +130,6 @@
<item>@string/other_mail_type</item><!--注意这里不能修改--> <item>@string/other_mail_type</item><!--注意这里不能修改-->
</string-array> </string-array>
<string-array name="query_suggestions">
<item>A very long suggestion that would span multiple lines.</item>
<item>Android</item>
<item>iOS</item>
<item>SCALA</item>
<item>Ruby</item>
<item>JavaScript</item>
<item>C#</item>
<item>Python</item>
<item>C</item>
<item>C++</item>
<item>PHP</item>
<item>Go</item>
<item>Perl</item>
<item>Bash</item>
<item>Lua</item>
<item>R</item>
<item>TCL</item>
<item>Haskell</item>
<item>Objective C</item>
<item>Swift</item>
<item>Kotlin</item>
<item>jQuery</item>
<item>Development</item>
<item>Web</item>
<item>Ajax</item>
<item>Test</item>
<item>Testing</item>
<item>CookBook</item>
<item>Beagle</item>
<item>VMware</item>
<item>Less.js</item>
<item>IDE</item>
<item>Arduino</item>
<item>Xamarin</item>
<item>UI</item>
<item>Microsoft</item>
<item>Application</item>
<item>JUnit</item>
<item>SQL</item>
<item>Beagle</item>
</string-array>
<string-array name="charsets"> <string-array name="charsets">
<item>UTF-8</item> <item>UTF-8</item>
<item>US-ASCII</item> <item>US-ASCII</item>

View File

@ -145,13 +145,17 @@
<item name="android:singleLine">true</item> <item name="android:singleLine">true</item>
<item name="android:padding">0dp</item> <item name="android:padding">0dp</item>
<item name="android:layout_margin">0dp</item> <item name="android:layout_margin">0dp</item>
<item name="android:drawablePadding">5dp</item>S <item name="android:drawablePadding">5dp</item>
<item name="android:minHeight">30dp</item> <item name="android:minHeight">30dp</item>
<item name="android:minWidth">30dp</item> <item name="android:minWidth">30dp</item>
<item name="android:textSize">@dimen/text_size_small</item> <item name="android:textSize">@dimen/text_size_small</item>
<item name="android:button">@drawable/custom_radio_button</item> <item name="android:button">@drawable/custom_radio_button</item>
</style> </style>
<style name="rg_rb_style.mini">
<item name="android:textSize">@dimen/text_size_mini</item>
</style>
<style name="rg_rb_style_wrap"> <style name="rg_rb_style_wrap">
<item name="android:layout_width">wrap_content</item> <item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>