mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 01:17:41 +08:00
精简:界面微调 & 去除不常用设置
This commit is contained in:
parent
16e4037c73
commit
5ca161629f
@ -14,6 +14,8 @@ import androidx.appcompat.app.ActionBarDrawerToggle
|
|||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.viewpager.widget.ViewPager
|
import androidx.viewpager.widget.ViewPager
|
||||||
|
import androidx.work.OneTimeWorkRequestBuilder
|
||||||
|
import androidx.work.WorkManager
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||||
import com.hjq.permissions.OnPermissionCallback
|
import com.hjq.permissions.OnPermissionCallback
|
||||||
@ -32,6 +34,7 @@ import com.idormy.sms.forwarder.utils.*
|
|||||||
import com.idormy.sms.forwarder.utils.sdkinit.XUpdateInit
|
import com.idormy.sms.forwarder.utils.sdkinit.XUpdateInit
|
||||||
import com.idormy.sms.forwarder.widget.GuideTipsDialog.Companion.showTips
|
import com.idormy.sms.forwarder.widget.GuideTipsDialog.Companion.showTips
|
||||||
import com.idormy.sms.forwarder.widget.GuideTipsDialog.Companion.showTipsForce
|
import com.idormy.sms.forwarder.widget.GuideTipsDialog.Companion.showTipsForce
|
||||||
|
import com.idormy.sms.forwarder.workers.LoadAppListWorker
|
||||||
import com.jeremyliao.liveeventbus.LiveEventBus
|
import com.jeremyliao.liveeventbus.LiveEventBus
|
||||||
import com.xuexiang.xaop.annotation.SingleClick
|
import com.xuexiang.xaop.annotation.SingleClick
|
||||||
import com.xuexiang.xhttp2.XHttp
|
import com.xuexiang.xhttp2.XHttp
|
||||||
@ -199,7 +202,15 @@ class MainActivity : BaseActivity<ActivityMainBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.nav_app_list -> openNewPage(AppListFragment::class.java)
|
R.id.nav_app_list -> {
|
||||||
|
if (App.UserAppList.isEmpty() && App.SystemAppList.isEmpty()) {
|
||||||
|
XToastUtils.info(getString(R.string.loading_app_list))
|
||||||
|
val request = OneTimeWorkRequestBuilder<LoadAppListWorker>().build()
|
||||||
|
WorkManager.getInstance(this).enqueue(request)
|
||||||
|
Thread.sleep(2000)
|
||||||
|
}
|
||||||
|
openNewPage(AppListFragment::class.java)
|
||||||
|
}
|
||||||
//R.id.nav_logcat -> openNewPage(LogcatFragment::class.java)
|
//R.id.nav_logcat -> openNewPage(LogcatFragment::class.java)
|
||||||
R.id.nav_help -> AgentWebActivity.goWeb(this, getString(R.string.url_help))
|
R.id.nav_help -> AgentWebActivity.goWeb(this, getString(R.string.url_help))
|
||||||
R.id.nav_about -> openNewPage(AboutFragment::class.java)
|
R.id.nav_about -> openNewPage(AboutFragment::class.java)
|
||||||
|
@ -50,11 +50,6 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="?attr/xui_config_color_separator_light" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout_Senders"
|
android:id="@+id/layout_Senders"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -65,40 +60,51 @@
|
|||||||
android:id="@+id/layout_sender_logic"
|
android:id="@+id/layout_sender_logic"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:orientation="vertical"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<TextView
|
<View
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="1dp"
|
||||||
android:text="@string/sender_logic"
|
android:background="?attr/xui_config_color_separator_light" />
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<RadioGroup
|
<LinearLayout
|
||||||
android:id="@+id/rg_sender_logic"
|
android:layout_width="match_parent"
|
||||||
style="@style/rg_style"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="5dp"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RadioButton
|
<TextView
|
||||||
android:id="@+id/rb_sender_logic_all"
|
android:layout_width="wrap_content"
|
||||||
style="@style/rg_rb_style_wrap"
|
android:layout_height="wrap_content"
|
||||||
android:checked="true"
|
android:text="@string/sender_logic"
|
||||||
android:text="@string/sender_logic_all" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioGroup
|
||||||
android:id="@+id/rb_sender_logic_until_fail"
|
android:id="@+id/rg_sender_logic"
|
||||||
style="@style/rg_rb_style_wrap"
|
style="@style/rg_style"
|
||||||
android:text="@string/sender_logic_until_fail" />
|
android:layout_marginStart="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/rb_sender_logic_until_success"
|
android:id="@+id/rb_sender_logic_all"
|
||||||
style="@style/rg_rb_style_wrap"
|
style="@style/rg_rb_style"
|
||||||
android:text="@string/sender_logic_until_success" />
|
android:checked="true"
|
||||||
|
android:text="@string/sender_logic_all" />
|
||||||
|
|
||||||
</RadioGroup>
|
<RadioButton
|
||||||
|
android:id="@+id/rb_sender_logic_until_fail"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sender_logic_until_fail" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_sender_logic_until_success"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sender_logic_until_success" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -17,23 +17,23 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:contentDescription="@string/task_notification"
|
||||||
|
app:srcCompat="@drawable/auto_task_icon_sender"
|
||||||
|
tools:ignore="ImageContrastCheck" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
style="@style/ruleBarStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:layout_width="120dp"
|
|
||||||
android:layout_height="120dp"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:contentDescription="@string/task_notification"
|
|
||||||
app:srcCompat="@drawable/auto_task_icon_sender"
|
|
||||||
tools:ignore="ImageContrastCheck" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -59,11 +59,6 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="?attr/xui_config_color_separator_light" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout_Senders"
|
android:id="@+id/layout_Senders"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -74,40 +69,51 @@
|
|||||||
android:id="@+id/layout_sender_logic"
|
android:id="@+id/layout_sender_logic"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:orientation="vertical"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<TextView
|
<View
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="1dp"
|
||||||
android:text="@string/sender_logic"
|
android:background="?attr/xui_config_color_separator_light" />
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<RadioGroup
|
<LinearLayout
|
||||||
android:id="@+id/rg_sender_logic"
|
android:layout_width="match_parent"
|
||||||
style="@style/rg_style"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="5dp"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RadioButton
|
<TextView
|
||||||
android:id="@+id/rb_sender_logic_all"
|
android:layout_width="wrap_content"
|
||||||
style="@style/rg_rb_style_wrap"
|
android:layout_height="wrap_content"
|
||||||
android:checked="true"
|
android:text="@string/sender_logic"
|
||||||
android:text="@string/sender_logic_all" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioGroup
|
||||||
android:id="@+id/rb_sender_logic_until_fail"
|
android:id="@+id/rg_sender_logic"
|
||||||
style="@style/rg_rb_style_wrap"
|
style="@style/rg_style"
|
||||||
android:text="@string/sender_logic_until_fail" />
|
android:layout_marginStart="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/rb_sender_logic_until_success"
|
android:id="@+id/rb_sender_logic_all"
|
||||||
style="@style/rg_rb_style_wrap"
|
style="@style/rg_rb_style"
|
||||||
android:text="@string/sender_logic_until_success" />
|
android:checked="true"
|
||||||
|
android:text="@string/sender_logic_all" />
|
||||||
|
|
||||||
</RadioGroup>
|
<RadioButton
|
||||||
|
android:id="@+id/rb_sender_logic_until_fail"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sender_logic_until_fail" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_sender_logic_until_success"
|
||||||
|
style="@style/rg_rb_style"
|
||||||
|
android:text="@string/sender_logic_until_success" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -6,10 +6,13 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/xui_config_color_white"
|
android:background="@color/xui_config_color_white"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
tools:ignore="UseCompoundDrawables">
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?attr/xui_config_color_separator_light" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -62,9 +65,4 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="?attr/xui_config_color_separator_light" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user