Skip to content

Commit

Permalink
优化: 亮度/音量百分比接入高级材质
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX committed Apr 14, 2024
1 parent e9670d8 commit 9be5fd1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import com.sevtinge.hyperceiler.R;
import com.sevtinge.hyperceiler.utils.ContextUtils;
import com.sevtinge.hyperceiler.utils.blur.MiBlurUtils;
import com.sevtinge.hyperceiler.utils.log.XposedLogUtils;

import java.io.File;
Expand Down Expand Up @@ -171,6 +172,14 @@ public static void initPct(ViewGroup container, int source, Context context) {
} catch (Throwable err) {
XposedLogUtils.logE("ShowVolumePct", err);
}
try {
MiBlurUtils.setContainerPassBlur(getTextView(), 160);
MiBlurUtils.setMiViewBlurMode(getTextView(), 3);
MiBlurUtils.clearMiBackgroundBlendColor(getTextView());
MiBlurUtils.addMiBackgroundBlendColor(getTextView(), Color.argb(120, 0, 0, 0), 103);
} catch (Throwable e) {
XposedLogUtils.logE("ShowVolumePct", e);
}
container.addView(getTextView());
}
getTextView().setTag(source);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void initNavigationView() {
int a;
if (isDarkMode(this)) a = 100;
else a = 140;
MiBlurUtils.setContainerPassBlur(mNavigationView, i);
MiBlurUtils.setContainerPassBlur(mNavigationView, 160);
MiBlurUtils.setMiViewBlurMode(mNavigationView, 3);
MiBlurUtils.clearMiBackgroundBlendColor(mNavigationView);
MiBlurUtils.addMiBackgroundBlendColor(mNavigationView, Color.argb(a, 0, 0, 0), 103);
Expand Down

0 comments on commit 9be5fd1

Please sign in to comment.