Skip to content

Commit

Permalink
优化 页面布局&文本描述
Browse files Browse the repository at this point in the history
  • Loading branch information
Sevtinge committed Nov 10, 2023
1 parent a86ea12 commit 1bda0c3
Show file tree
Hide file tree
Showing 30 changed files with 90 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Android 11 ~ 13 的 MIUI 12.5 ~ 14
| 小爱视觉 | com.xiaomi.scanner |
| 小爱同学 | com.miui.voiceassist |
| 音乐 | com.miui.player |
| MIUI+ Beta 版 | com.xiaomi.mirror |
| MIUI+ | com.xiaomi.mirror |
| NetworkBoost | com.xiaomi.NetworkBoost |
| NFC 服务 | com.android.nfc |

Expand Down
2 changes: 1 addition & 1 deletion README_en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ MIUI 12.5 ~ 14 for Android 11 ~ 13
| Scanner | com.xiaomi.scanner |
| Mi AI | com.miui.voiceassist |
| Music | com.miui.player |
| MIUI+ Beta | com.xiaomi.mirror |
| MIUI+ | com.xiaomi.mirror |
| NetworkBoost | com.xiaomi.NetworkBoost |
| NFC Service | com.android.nfc |

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.sevtinge.hyperceiler.ui.fragment;

import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreHyperOSVersion;

import android.view.View;

import com.sevtinge.hyperceiler.R;
Expand All @@ -15,7 +17,7 @@ public int getContentResId() {
@Override
public View.OnClickListener addRestartListener() {
return view -> ((BaseSettingsActivity)getActivity()).showRestartDialog(
getResources().getString(R.string.aod),
getResources().getString(!isMoreHyperOSVersion(1f) ? R.string.aod : R.string.aod_hyperos),
"com.miui.aod"
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.sevtinge.hyperceiler.ui.fragment;

import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreHyperOSVersion;

import android.view.View;

import com.sevtinge.hyperceiler.R;
Expand All @@ -15,7 +17,7 @@ public int getContentResId() {
@Override
public View.OnClickListener addRestartListener() {
return view -> ((BaseSettingsActivity)getActivity()).showRestartDialog(
getResources().getString(R.string.guard_provider),
getResources().getString(!isMoreHyperOSVersion(1f) ? R.string.guard_provider : R.string.guard_provider_hyperos),
"com.miui.guardprovider"
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sevtinge.hyperceiler.ui.fragment;

import static com.sevtinge.hyperceiler.utils.api.VoyagerApisKt.isPad;
import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreHyperOSVersion;

import com.sevtinge.hyperceiler.R;
import com.sevtinge.hyperceiler.ui.fragment.base.SettingsPreferenceFragment;
Expand All @@ -12,6 +13,14 @@
public class MainFragment extends SettingsPreferenceFragment {
Preference mSecurityCenter;
Preference mSecurityCenterPad;
Preference mMiLink;
Preference mMiLinkHyperOS;
Preference mAod;
Preference mAodHyperOS;
Preference mGuardProvider;
Preference mGuardProviderHyperOS;
Preference mMirror;
Preference mMirrorHyperOS;
Preference mTip;
Random r = new Random();

Expand Down Expand Up @@ -51,11 +60,31 @@ public void initPrefs() {

mSecurityCenter = findPreference("prefs_key_security_center");
mSecurityCenterPad = findPreference("prefs_key_security_center_pad");
mMiLink = findPreference("prefs_key_milink");
mMiLinkHyperOS = findPreference("prefs_key_milink_hyperos");
mAod = findPreference("prefs_key_aod");
mAodHyperOS = findPreference("prefs_key_aod_hyperos");
mGuardProvider = findPreference("prefs_key_guardprovider");
mGuardProviderHyperOS = findPreference("prefs_key_guardprovider_hyperos");
mMirror = findPreference("prefs_key_mirror");
mMirrorHyperOS = findPreference("prefs_key_mirror_hyperos");
mTip = findPreference("prefs_key_tip");

mSecurityCenter.setVisible(!isPad());
mSecurityCenterPad.setVisible(isPad());

mMiLink.setVisible(!isMoreHyperOSVersion(1f));
mMiLinkHyperOS.setVisible(isMoreHyperOSVersion(1f));

mAod.setVisible(!isMoreHyperOSVersion(1f));
mAodHyperOS.setVisible(isMoreHyperOSVersion(1f));

mGuardProvider.setVisible(!isMoreHyperOSVersion(1f));
mGuardProviderHyperOS.setVisible(isMoreHyperOSVersion(1f));

mMirror.setVisible(!isMoreHyperOSVersion(1f));
mMirrorHyperOS.setVisible(isMoreHyperOSVersion(1f));

mTip.setSummary(tips[randomTip]);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.sevtinge.hyperceiler.ui.fragment;

import static com.sevtinge.hyperceiler.utils.api.VoyagerApisKt.isPad;
import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreHyperOSVersion;

import android.view.View;

import com.sevtinge.hyperceiler.R;
Expand All @@ -15,7 +18,7 @@ public int getContentResId() {
@Override
public View.OnClickListener addRestartListener() {
return view -> ((BaseSettingsActivity)getActivity()).showRestartDialog(
getResources().getString(R.string.milink),
getResources().getString(!isMoreHyperOSVersion(1f) ? R.string.milink : R.string.milink_hyperos),
"com.milink.service"
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.sevtinge.hyperceiler.ui.fragment;

import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreHyperOSVersion;

import android.view.View;

import com.sevtinge.hyperceiler.R;
Expand All @@ -15,7 +17,7 @@ public int getContentResId() {
@Override
public View.OnClickListener addRestartListener() {
return view -> ((BaseSettingsActivity)getActivity()).showRestartDialog(
getResources().getString(R.string.mirror),
getResources().getString(!isMoreHyperOSVersion(1f) ? R.string.mirror : R.string.mirror_hyperos),
"com.xiaomi.mirror"
);
}
Expand Down
Binary file added app/src/main/res/drawable/ic_android.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_browser.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_call.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_camera.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_clock.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_downloads.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_fileexplorer.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_gallery.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_market.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_milink.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_misettings.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_mms.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_scanner.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_security_center.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_sogou.webp
Binary file not shown.
Binary file removed app/src/main/res/drawable/ic_system_framework.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_system_settings.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_theme_manager.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_updater.webp
Binary file not shown.
Binary file modified app/src/main/res/drawable/ic_weather.webp
Binary file not shown.
6 changes: 5 additions & 1 deletion app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,11 @@
<string name="lbe_clipboard_tip">读取了剪贴板</string>
<!--投屏-->
<string name="milink">投屏</string>
<string name="milink_hyperos">互联互通服务</string>
<string name="milink_unlock_mishare">解锁小米妙享</string>
<!--万象息屏-->
<string name="aod">万象息屏</string>
<string name="aod_hyperos">息屏与锁屏编辑</string>
<string name="aod_unlock_always_on_display">解锁息屏显示时长限制</string>
<!--传送门-->
<string name="content_extension">传送门</string>
Expand Down Expand Up @@ -800,6 +802,7 @@
<string name="gallery_enable_magic_sky">解锁魔法换天</string>
<!--MIUI 安全组件-->
<string name="guard_provider">MIUI 安全组件</string>
<string name="guard_provider_hyperos">系统安全组件</string>
<string name="guard_provider_disable_upload_applist">阻止自动上传已安装应用列表</string>
<!--系统桌面-->
<string name="home">系统桌面</string>
Expand Down Expand Up @@ -1199,6 +1202,7 @@
<string name="market_disable_new_icon_desc">使桌面更加整洁</string>
<!--MIUI+-->
<string name="mirror">MIUI+</string>
<string name="mirror_hyperos">跨屏协同服务</string>
<string name="mirror_unlock_miui_plus">解锁 MIUI+</string>
<!--小米设置-->
<string name="mi_settings">小米设置</string>
Expand All @@ -1210,7 +1214,7 @@
<string name="mtb_auth">绕过鲁班 (MTB) 鉴权</string>
<string name="mtb_auth_desc">这是一个高危险性的功能,由此引发的后果全部由用户本人承担,请及时备份基带。</string>
<!--搜狗输入法-->
<string name="sogou_xiaomi">搜狗输入法</string>
<string name="sogou_xiaomi">搜狗输入法小米版</string>
<string name="sogou_xiaomi_clipboard">解除剪贴板数量限制</string>
<!--小爱视觉-->
<string name="scanner">小爱视觉</string>
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@
<string name="gallery_enable_magic_sky">Unlock Sky</string>
<!--MIUI security components-->
<string name="guard_provider">MIUI security components</string>
<string name="guard_provider_hyperos">System Security Components</string>
<string name="guard_provider_disable_upload_applist">Prevent automatic upload of installed app list</string>
<!--System launcher-->
<string name="home">System launcher</string>
Expand Down Expand Up @@ -1321,6 +1322,9 @@
<string name="development">Developer Options</string>
<string name="development_ui">UI</string>
<string name="powerkeeper_disable_get_display_ctrl_code">Disable to Get Display Control Code</string>
<string name="milink_hyperos">Interconnectivity Services</string>
<string name="aod_hyperos">Always-on Display And Lock Screen Editor</string>
<string name="mirror_hyperos">Device Interconnectivity Services</string>
<!--Tip-->
<string name="tip_0">Tip: Here\'s a tip!</string>
<string name="tip_1">Tip: You can support us by donating in \"About - Support\".</string>
Expand Down
45 changes: 37 additions & 8 deletions app/src/main/res/xml/prefs_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PreferenceCategory>
<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.SystemFrameworkFragment"
android:icon="@drawable/ic_system_framework"
android:icon="@drawable/ic_android"
android:key="prefs_key_system_framework"
android:summary="android"
android:title="@string/system_framework" />
Expand Down Expand Up @@ -92,6 +92,7 @@
android:key="prefs_key_various_theme"
android:summary="com.android.thememanager"
android:title="@string/theme_manager" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.UpdaterFragment"
android:icon="@drawable/ic_updater"
Expand All @@ -113,13 +114,27 @@
android:summary="com.milink.service"
android:title="@string/milink" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.MiLinkFragment"
android:icon="@drawable/ic_milink"
android:key="prefs_key_milink_hyperos"
android:summary="com.milink.service"
android:title="@string/milink_hyperos" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.AodFragment"
android:icon="@drawable/ic_aod"
android:key="prefs_key_aod"
android:summary="com.miui.aod"
android:title="@string/aod" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.AodFragment"
android:icon="@drawable/ic_aod"
android:key="prefs_key_aod_hyperos"
android:summary="com.miui.aod"
android:title="@string/aod_hyperos" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.ContentExtensionFragment"
android:icon="@drawable/ic_contentextension"
Expand Down Expand Up @@ -148,6 +163,13 @@
android:summary="com.miui.guardprovider"
android:title="@string/guard_provider" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.GuardProviderFragment"
android:icon="@drawable/ic_guard_provider_new"
android:key="prefs_key_guardprovider_hyperos"
android:summary="com.miui.guardprovider"
android:title="@string/guard_provider_hyperos" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.HomeFragment"
android:icon="@drawable/ic_home"
Expand Down Expand Up @@ -246,6 +268,13 @@
android:summary="com.miui.weather2"
android:title="@string/weather" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.SoGouFragment"
android:icon="@drawable/ic_sogou"
android:key="prefs_key_sogou"
android:summary="com.sohu.inputmethod.sogou.xiaomi"
android:title="@string/sogou_xiaomi" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.AiAsstFragment"
android:icon="@drawable/ic_aiasst"
Expand Down Expand Up @@ -281,6 +310,13 @@
android:summary="com.xiaomi.mirror"
android:title="@string/mirror" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.MirrorFragment"
android:icon="@drawable/ic_miui_plus"
android:key="prefs_key_mirror_hyperos"
android:summary="com.xiaomi.mirror"
android:title="@string/mirror_hyperos" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.MiSettingsFragment"
android:icon="@drawable/ic_misettings"
Expand Down Expand Up @@ -309,13 +345,6 @@
android:summary="com.xiaomi.scanner"
android:title="@string/scanner" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.SoGouFragment"
android:icon="@drawable/ic_sogou"
android:key="prefs_key_sogou"
android:summary="com.sohu.inputmethod.sogou(.xiaomi)"
android:title="@string/sogou_xiaomi" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:enabled="false"
android:icon="@drawable/ic_custom"
Expand Down

0 comments on commit 1bda0c3

Please sign in to comment.