mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-04 09:45:34 +08:00
Modify hide notification panel alpha function when ColorOS version without 12, 12.1, 13 in MainActivity, ConfigData, activity_main
This commit is contained in:
@@ -68,7 +68,7 @@ object ConfigData {
|
||||
val ENABLE_NOTIFY_MEDIA_PANEL_AUTO_EXP = PrefsData("_enable_notify_media_panel_auto_exp", false)
|
||||
|
||||
/** 启用自定义通知面板背景透明度 */
|
||||
val ENABLE_NOTIFY_PANEL_ALPHA = PrefsData("_enable_notify_panel_alpha", false)
|
||||
val ENABLE_NOTIFY_PANEL_ALPHA = PrefsData("_enable_notify_panel_alpha_pst", false)
|
||||
|
||||
/** 自定义通知面板背景透明度 */
|
||||
val NOTIFY_PANEL_ALPHA_LEVEL = PrefsData("_notify_panel_alpha_pst", 75)
|
||||
|
@@ -124,6 +124,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
binding.notifyMediaPanelAutoExpSwitch.isVisible = false
|
||||
binding.notifyMediaPanelAutoExpText.isVisible = false
|
||||
}
|
||||
/** 通知面板背景透明度功能仅支持 ColorOS 12、12.1、13 */
|
||||
binding.notifyPanelConfigItem.isVisible = colorOSNumberVersion.let { it == "V12" || it == "V12.1" || it == "V13" }
|
||||
binding.notifyIconAutoSyncText.text = ConfigData.notifyIconFixAutoTime
|
||||
binding.moduleEnableSwitch.bind(ConfigData.ENABLE_MODULE) {
|
||||
onInitialize {
|
||||
|
@@ -617,6 +617,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.fankes.coloros.notify.ui.widget.MaterialSwitch
|
||||
@@ -633,7 +634,6 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:alpha="0.6"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:paddingLeft="15dp"
|
||||
@@ -646,8 +646,8 @@
|
||||
<com.fankes.coloros.notify.ui.widget.MaterialSwitch
|
||||
android:id="@+id/notify_media_panel_auto_exp_switch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
android:text="启用媒体通知播放时自动展开"
|
||||
@@ -668,11 +668,17 @@
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/notify_panel_config_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.fankes.coloros.notify.ui.widget.MaterialSwitch
|
||||
android:id="@+id/notify_panel_config_switch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
android:text="自定义通知面板背景透明度"
|
||||
@@ -772,6 +778,7 @@
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/notify_icon_config_item"
|
||||
|
Reference in New Issue
Block a user