Added Apps Configs Template function

This commit is contained in:
2022-06-08 18:59:18 +08:00
parent 3c623365f3
commit 62c9982e2e
23 changed files with 741 additions and 54 deletions

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="184.6dp"
android:height="150dp"
android:viewportWidth="1260"
android:viewportHeight="1024">
<path
android:fillColor="#ffffff"
android:pathData="M419.2,548.3L17,108.9C-23.6,64.4 13,0 79.7,0h846.5c66.6,0 103.3,64.4 62.8,108.9l-402.2,439.3v472.7c0,1.6 -1.3,2.9 -2.8,2.9a8.3,8.3 0,0 1,-5.2 -1.8l-154.3,-120a13.7,13.7 0,0 1,-5.3 -10.8L419.2,548.3zM838.2,511.9L1257.3,511.9L1257.3,597.2h-419.1L838.2,511.9zM838.2,682.5L1257.3,682.5v85.3h-419.1L838.2,682.5zM838.2,853.2L1257.3,853.2v85.3h-419.1v-85.3z" />
</vector>

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorThemeBackground"
android:orientation="vertical"
tools:context=".ui.activity.main.ConfigureActivity"
tools:ignore="ContentDescription,UseCompoundDrawables">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
android:gravity="center|start"
android:paddingLeft="15dp"
android:paddingTop="13dp"
android:paddingRight="15dp"
android:paddingBottom="5dp">
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/title_back_icon"
style="?android:attr/selectableItemBackgroundBorderless"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="20dp"
android:src="@mipmap/ic_back"
android:tint="@color/colorTextGray"
android:tooltipText="@string/back" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="2.5dp"
android:layout_weight="1"
android:gravity="center|start"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:singleLine="true"
android:text="@string/apps_config_template"
android:textColor="@color/colorTextGray"
android:textSize="19sp"
android:textStyle="bold" />
<TextView
android:id="@+id/title_count_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/loading"
android:textColor="@color/colorTextDark"
android:textSize="11.5sp" />
</LinearLayout>
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/filter_icon"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_marginEnd="10dp"
android:src="@drawable/ic_filter"
android:tint="@color/colorTextGray"
android:tooltipText="@string/filter_by_condition"
android:visibility="gone" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:animateLayoutChanges="true">
<ProgressBar
android:id="@+id/list_progress_view"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
<TextView
android:id="@+id/list_no_data_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:lineSpacingExtra="6dp"
android:text="@string/no_list_result"
android:textColor="@color/colorTextDark"
android:textSize="17sp"
android:visibility="gone" />
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/trans"
android:dividerHeight="15dp"
android:fadingEdgeLength="10dp"
android:listSelector="@color/trans"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingBottom="15dp"
android:requiresFadingEdge="vertical"
android:scrollbars="none"
android:visibility="gone" />
</FrameLayout>
</LinearLayout>

View File

@@ -155,6 +155,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:fadingEdgeLength="10dp"
android:fillViewport="true"
@@ -170,37 +171,6 @@
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/bg_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="10dp"
android:alpha="0.85"
android:src="@mipmap/ic_about"
android:tint="@color/colorTextDark" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.6"
android:lineSpacingExtra="5dp"
android:text="@string/after_some_settings_need_restart"
android:textColor="@color/colorTextGray"
android:textSize="11sp" />
</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:animateLayoutChanges="true"
android:background="@drawable/bg_permotion_round"

View File

@@ -0,0 +1,55 @@
<?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="wrap_content"
android:background="@drawable/bg_permotion_ripple"
android:gravity="center|start"
android:orientation="horizontal"
android:padding="10dp"
tools:ignore="ContentDescription,UseCompoundDrawables,SmallSp">
<androidx.cardview.widget.CardView
android:layout_width="45dp"
android:layout_height="45dp"
app:cardBackgroundColor="@color/trans"
app:cardCornerRadius="10dp"
app:cardElevation="0dp">
<ImageView
android:id="@+id/app_icon"
android:layout_width="45dp"
android:layout_height="45dp" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:gravity="center|start"
android:orientation="vertical">
<TextView
android:id="@+id/app_name_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:layout_marginBottom="4dp"
android:ellipsize="end"
android:singleLine="true"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
<TextView
android:id="@+id/config_type_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textColor="@color/colorTextDark"
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,46 @@
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingTop="15dp"
android:paddingRight="15dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8.5dp"
android:layout_marginRight="8.5dp"
android:layout_marginBottom="10dp"
android:lineSpacingExtra="6dp"
android:text="@string/when_errors_how_to_show_tip"
android:textSize="14sp" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/config_radio_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/show_errors_dialog"
app:buttonTint="@color/colorPrimaryAccent" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/config_radio_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/show_errors_toast"
app:buttonTint="@color/colorPrimaryAccent" />
<com.google.android.material.radiobutton.MaterialRadioButton
android:id="@+id/config_radio_3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/show_nothing"
app:buttonTint="@color/colorPrimaryAccent" />
</RadioGroup>
</LinearLayout>

View File

@@ -0,0 +1,31 @@
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingTop="15dp"
android:paddingRight="15dp">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/app_filters_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:hint="@string/typo_app_name_pkg_name"
android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/contains_system_switch"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:text="@string/result_contains_system_apps"
app:buttonTint="@color/colorPrimaryAccent" />
</LinearLayout>

View File

@@ -52,7 +52,6 @@
<string name="module_version">モジュールバージョン: %1$s</string>
<string name="system_version">システムバージョン: %1$s</string>
<string name="module_is_activated">モジュールが有効化でした</string>
<string name="after_some_settings_need_restart">一部の設定を変更した後、リスタートシステムして有効にするには、右上隅をクリックする必要がある場合があります。</string>
<string name="display_settings">表示設定</string>
<string name="hide_app_icon_on_launcher">デスクトップ上のアプリアイコンを非表示</string>
<string name="hide_app_icon_on_launcher_tip">モジュールアイコンを非表示にすると、インターフェイスが閉じてデスクトップに表示されなくなります。モジュール設定は、EdXposedまたはLSPosedで検索して開くことができます。</string>
@@ -88,4 +87,16 @@
<string name="unmute">無視を解除</string>
<string name="unmute_all">無視を全部解除</string>
<string name="are_you_sure_unmute_all">エラーを無視したすべてのアプリを解除してもよろしいですか</string>
<string name="apps_config_template">アプリ設定テンプレート</string>
<string name="filter_by_condition">条件でフィルタリング</string>
<string name="no_list_result">表示結果はありません</string>
<string name="typo_app_name_pkg_name">アプリ名とパッケージ名を入力できます</string>
<string name="result_contains_system_apps">結果にはシステムアプリが含まれます</string>
<string name="clear_filters">条件をクリア</string>
<string name="result_count">%1$s の合計結果</string>
<string name="loading">ロード中</string>
<string name="when_errors_how_to_show_tip">エラーが現在適用されているときにシステムがエラーを表示する方法を構成できます。</string>
<string name="show_errors_dialog">エラーダイアログを表示</string>
<string name="show_errors_toast">エラー Toast を表示</string>
<string name="show_nothing">何も表示されません</string>
</resources>

View File

@@ -52,7 +52,6 @@
<string name="module_version">模块版本:%1$s</string>
<string name="system_version">系统版本:%1$s</string>
<string name="module_is_activated">模块已激活</string>
<string name="after_some_settings_need_restart">部分设置修改后可能需要点击右上角重启系统才能生效。</string>
<string name="display_settings">显示设置</string>
<string name="hide_app_icon_on_launcher">在桌面隐藏模块图标</string>
<string name="hide_app_icon_on_launcher_tip">隐藏模块图标后界面可能会被关闭,将不会再在桌面显示,你可以在 EdXposed、LSPosed 中找到模块设置并打开。</string>
@@ -73,19 +72,31 @@
<string name="share_error_stack">分享异常堆栈</string>
<string name="preference_settings">偏好设置</string>
<string name="function_mgr">功能管理</string>
<string name="only_show_errors_in_front">仅对前台应用示错误对话框</string>
<string name="only_show_errors_in_main_process">仅对应用主进程示错误对话框</string>
<string name="only_show_errors_in_front">仅对前台应用示错误对话框</string>
<string name="only_show_errors_in_main_process">仅对应用主进程示错误对话框</string>
<string name="enable_apps_config_template">启用应用配置模板</string>
<string name="mgr_apps_config_template">管理应用配置模板</string>
<string name="view_errors_record">查看异常历史记录</string>
<string name="view_muted_errors_apps">查看已忽略异常的应用</string>
<string name="only_show_errors_in_front_tip">启用后,只有发生异常的应用处于前台(正在使用中)时才会示错误对话框,发生异常的后台应用虽然不会示错误对话框,但是它们都会被记录到异常历史记录中。</string>
<string name="only_show_errors_in_main_process_tip">启用后,只有应用发生的异常位于主进程(第一个 Application 实例对象)时才会示错误对话框。</string>
<string name="apps_config_template_tip">你可以在这里对每个应用发生异常时,单独配置其在发生异常时是否示错误对话框。</string>
<string name="only_show_errors_in_front_tip">启用后,只有发生异常的应用处于前台(正在使用中)时才会示错误对话框,发生异常的后台应用虽然不会示错误对话框,但是它们都会被记录到异常历史记录中。</string>
<string name="only_show_errors_in_main_process_tip">启用后,只有应用发生的异常位于主进程(第一个 Application 实例对象)时才会示错误对话框。</string>
<string name="apps_config_template_tip">你可以在这里对每个应用发生异常时,单独配置其在发生异常时是否示错误对话框。</string>
<string name="view_errors_record_tip">在这里,你可以找到从系统开机以来到现在为止的全部应用异常记录,异常历史记录在重新启动后会自动清空,你可以对记录进行查看、导出和分享以及清空。</string>
<string name="view_muted_errors_apps_tip">在这里,你可以找到已被你以不同形式手动忽略异常的应用,这个列表将会在重新启动后自动清空,你可以对这些已忽略的应用进行管理以及从忽略列表中移除它们。</string>
<string name="muted_errors_apps">已忽略异常的应用</string>
<string name="unmute">取消忽略</string>
<string name="unmute_all">取消全部忽略</string>
<string name="are_you_sure_unmute_all">你确定要取消全部已忽略异常的应用吗?</string>
<string name="apps_config_template">应用配置模板</string>
<string name="filter_by_condition">按条件过滤</string>
<string name="no_list_result">没有结果可以显示</string>
<string name="typo_app_name_pkg_name">可输入 APP 名称、包名</string>
<string name="result_contains_system_apps">结果包含系统应用</string>
<string name="clear_filters">清除条件</string>
<string name="result_count">共 %1$s 个结果</string>
<string name="loading">加载中</string>
<string name="when_errors_how_to_show_tip">你可以配置当前应用崩溃时系统将如何向你显示错误提示信息。</string>
<string name="show_errors_dialog">显示错误对话框</string>
<string name="show_errors_toast">显示错误 Toast 提示</string>
<string name="show_nothing">不显示任何提示</string>
</resources>

View File

@@ -52,7 +52,6 @@
<string name="module_version">模組版本:%1$s</string>
<string name="system_version">系統版本:%1$s</string>
<string name="module_is_activated">模組已激活</string>
<string name="after_some_settings_need_restart">部分設置修改後可能需要點擊右上角重啟系統才能生效。</string>
<string name="display_settings">顯示設置</string>
<string name="hide_app_icon_on_launcher">在桌面隱藏模組圖標</string>
<string name="hide_app_icon_on_launcher_tip">隱藏模組圖標後界面可能會被關閉,將不會再在桌面顯示,你可以在 EdXposed、LSPosed 中找到模組設置並打開。</string>
@@ -88,4 +87,16 @@
<string name="unmute">取消忽略</string>
<string name="unmute_all">取消全部忽略</string>
<string name="are_you_sure_unmute_all">你確認要取消全部已忽略異常的程式嗎?</string>
<string name="apps_config_template">程式配置模板</string>
<string name="filter_by_condition">按條件過濾</string>
<string name="no_list_result">沒有結果可以展示</string>
<string name="typo_app_name_pkg_name">可輸入 APP 名稱、包名</string>
<string name="result_contains_system_apps">結果包含系統程式</string>
<string name="clear_filters">清除條件</string>
<string name="result_count">共 %1$s 個結果</string>
<string name="loading">加載中</string>
<string name="when_errors_how_to_show_tip">你可以配置當前程式崩潰時系統將如何向你展示錯誤提醒副案。</string>
<string name="show_errors_dialog">顯示錯誤對話框</string>
<string name="show_errors_toast">顯示錯誤 Toast 提示</string>
<string name="show_nothing">不顯示任何提示</string>
</resources>

View File

@@ -52,7 +52,6 @@
<string name="module_version">模組版本:%1$s</string>
<string name="system_version">系統版本:%1$s</string>
<string name="module_is_activated">模組已激活</string>
<string name="after_some_settings_need_restart">部分設置修改後可能需要點擊右上角重啟系統才能生效。</string>
<string name="display_settings">顯示設置</string>
<string name="hide_app_icon_on_launcher">在桌面隱藏模組圖標</string>
<string name="hide_app_icon_on_launcher_tip">隱藏模組圖標後界面可能會被關閉,將不會再在桌面顯示,你可以在 EdXposed、LSPosed 中找到模組設置並打開。</string>
@@ -88,4 +87,16 @@
<string name="unmute">取消忽略</string>
<string name="unmute_all">取消全部忽略</string>
<string name="are_you_sure_unmute_all">你確認要取消全部已忽略異常的程式嗎?</string>
<string name="apps_config_template">程式配置模板</string>
<string name="filter_by_condition">按條件過濾</string>
<string name="no_list_result">沒有結果可以展示</string>
<string name="typo_app_name_pkg_name">可輸入 APP 名稱、包名</string>
<string name="result_contains_system_apps">結果包含系統程式</string>
<string name="clear_filters">清除條件</string>
<string name="result_count">共 %1$s 個結果</string>
<string name="loading">加載中</string>
<string name="when_errors_how_to_show_tip">你可以配置當前程式崩潰時系統將如何向你展示錯誤提醒副案。</string>
<string name="show_errors_dialog">顯示錯誤對話框</string>
<string name="show_errors_toast">顯示錯誤 Toast 提示</string>
<string name="show_nothing">不顯示任何提示</string>
</resources>

View File

@@ -52,7 +52,6 @@
<string name="module_version">模組版本:%1$s</string>
<string name="system_version">系統版本:%1$s</string>
<string name="module_is_activated">模組已激活</string>
<string name="after_some_settings_need_restart">部分設置修改後可能需要點擊右上角重啟系統才能生效。</string>
<string name="display_settings">顯示設置</string>
<string name="hide_app_icon_on_launcher">在桌面隱藏模組圖標</string>
<string name="hide_app_icon_on_launcher_tip">隱藏模組圖標後界面可能會被關閉,將不會再在桌面顯示,你可以在 EdXposed、LSPosed 中找到模組設置並打開。</string>
@@ -88,4 +87,16 @@
<string name="unmute">取消忽略</string>
<string name="unmute_all">取消全部忽略</string>
<string name="are_you_sure_unmute_all">你確認要取消全部已忽略異常的程式嗎?</string>
<string name="apps_config_template">程式配置模板</string>
<string name="filter_by_condition">按條件過濾</string>
<string name="no_list_result">沒有結果可以展示</string>
<string name="typo_app_name_pkg_name">可輸入 APP 名稱、包名</string>
<string name="result_contains_system_apps">結果包含系統程式</string>
<string name="clear_filters">清除條件</string>
<string name="result_count">共 %1$s 個結果</string>
<string name="loading">加載中</string>
<string name="when_errors_how_to_show_tip">你可以配置當前程式崩潰時系統將如何向你展示錯誤提醒副案。</string>
<string name="show_errors_dialog">顯示錯誤對話框</string>
<string name="show_errors_toast">顯示錯誤 Toast 提示</string>
<string name="show_nothing">不顯示任何提示</string>
</resources>

View File

@@ -52,7 +52,6 @@
<string name="module_version">Module version: %1$s</string>
<string name="system_version">System version: %1$s</string>
<string name="module_is_activated">Module is activated</string>
<string name="after_some_settings_need_restart">After some settings are modified, you may need to click the upper right corner to restart the system to take effect.</string>
<string name="display_settings">Display settings</string>
<string name="hide_app_icon_on_launcher">Hide app icons on launcher</string>
<string name="hide_app_icon_on_launcher_tip">After hiding the app icon, the interface may be closed and will no longer be displayed on the launcher. You can find and open the module settings in EdXposed or LSPosed.</string>
@@ -88,4 +87,16 @@
<string name="unmute">Unmute</string>
<string name="unmute_all">Unmute all</string>
<string name="are_you_sure_unmute_all">Are you sure you want to unmute all apps?</string>
<string name="apps_config_template">Apps Config Template</string>
<string name="filter_by_condition">Filter by condition</string>
<string name="no_list_result">No result to display</string>
<string name="typo_app_name_pkg_name">Typo apps name or package name</string>
<string name="result_contains_system_apps">Result contains system apps</string>
<string name="clear_filters">Clear filters</string>
<string name="result_count">%1$s results found</string>
<string name="loading">Loading</string>
<string name="when_errors_how_to_show_tip">You can configure how the system will show you errors when the current app crashes.</string>
<string name="show_errors_dialog">Show errors dialog</string>
<string name="show_errors_toast">Show errors Toast</string>
<string name="show_nothing">Don\'t show anything</string>
</resources>