米温岛

Verified safe
—
No reviews reviews
21
downloads
8.0
android

AI summary

A battery temperature monitoring tool designed for Xiaomi HyperOS. It displays real-time battery temperatures in the status bar and the "Live Update" island area, with customizable temperature ranges, color-coded icons, and threshold notifications.

Generated by AI. May contain inaccuracies.

Screenshots

About this app

小米电池温度岛 一款在小米手机上实时显示电池温度的小组件工具,基于小米澎湃系统的「超级岛」(Live Update)接口实现。 核心功能: • 在状态栏和超级岛区域实时展示当前电池温度 • 支持多级温度区间显示:冰冻(<0℃)、寒冷(0-10℃)、凉爽(10-20℃)、正常(20-42℃)、温暖(42-45℃)、过热(45-48℃)、危险(>48℃),每个区间配有对应图标 • 温度超过阈值时自动发出通知提醒 • 后台持续监控,开机自动启动,无需手动操作 技术实现: • 前台服务(Foreground Service)保活,确保后台稳定运行 • 读取系统电池温度节点 /sys/class/power_supply/battery/temp • 利用 Notification.Builder + Live Update 在通知栏实时渲染温度 • 支持 Android 13+ 的通知权限和电池优化白名单申请 • 小米澎湃系统专属,针对 MIUI/澎湃系统优化 权限说明: • POST_NOTIFICATIONS — Android 13+ 发送通知 • POST_PROMOTED_NOTIFICATIONS — 超级岛 Live Update • FOREGROUND_SERVICE — 前台服务保活 • RECEIVE_BOOT_COMPLETED — 开机自启 • REQUEST_IGNORE_BATTERY_OPTIMIZATIONS — 关闭电池优化保障稳定运行 注意事项: • 仅适用于小米/红米手机(需要澎湃系统 Live Update 支持) • 建议将应用从最近任务中划掉不会停止监控,服务默认常驻 • 正常情况下耗电极低,后台仅做文件读取操作

What's new

v1.13.3Sep 26, 2026
  • ### v1.13.3(versionCode 38)
  • 修:浅色模式下**每个按钮四个圆角都有灰色阴影**。
  • #### 现象与根因
  • 按钮背景早就全换成了自绘 shape(`bg_btn_secondary` / `bg_btn_primary`), 看起来"不该有阴影",但**从未覆盖过 `buttonStyle`**, 于是一直在用平台默认按钮样式 `Widget.Material.Button`,而它自带两条会画阴影的东西:
  • 1. `android:stateListAnimator` = `@anim/button_state_list_anim_material` —— 按状态把 elevation 动画到 1dp(按下时抬得更高); 2. 由此产生的 Z 值由系统按**背景 drawable 的轮廓**(圆角矩形)投影。
  • 阴影沿圆角矩形轮廓绘制并向下偏移,在浅色页面上就表现为 按钮四个圆角的灰色阴影;暗色下与深背景融合,不易察觉 —— 所以只有白天模式看得见,和 v1.13.2 卡片那个问题同源。
  • #### 修法
  • 新增 `AppButton`,并通过 `android:buttonStyle` 挂到主题上(一次改全项目 25 个按钮):
  • ```xml <style name="AppButton" parent="@android:style/Widget.Material.Button"> <item name="android:elevation">0dp</item> <item name="android:stateListAnimator">@null</item> <item name="android:minWidth">0dp</item> </style> ```
  • *两项缺一不可**:只设 elevation 的话,按下时 stateListAnimator 仍会把 Z 抬起来。
  • 按下反馈不会丢 —— `bg_btn_secondary` / `bg_btn_primary` 各有 `state_pressed` 分支改底色,视觉反馈仍然明确(只是少了一个"抬起"动画)。
  • #### 两个附带处理
  • *① `buttonStyle` 必须在 `values-night` 里重复写** `values-night` 下的同名 style 是**替换**而非**合并**,不会继承 values 版里新加的 `buttonStyle`。这和 v1.13.2 修的 brand 属性是同一个坑,第二次踩到了。
  • *② 顺带把 `minWidth` 置 0** 平台默认 88dp。本项目多数按钮是 `layout_width=0dp + weight=1` (如五个主题色按钮、四个胶囊格式按钮),极窄横屏下这个下限会顶住不收缩。
  • *③ 没用 `outlineAmbientShadowColor` / `outlineSpotShadowColor` 兜底** 这两个属性 API 28 才加入,本项目 `minSdk 26`,在 26~27 上会被忽略, 属于"写了也没用"的死项。
  • #### 检查(26 项全过)
  • 45 个 XML 合法、AppButton 三项生效、**两个模式都挂了 buttonStyle**、 五个浅色主题 parent 均为 AppTheme(能继承到 buttonStyle)、 night AppTheme 品牌属性齐全(防 v1.13.2 回归)、72 个 id 零悬空、 btn/switch/tab 全监听、无未使用方法、无重复注释。

About this version

Version
1.13.3 (38)
Size
895.86 KB
Requires Android
8.0
Target SDK
26
Architecture
universal
Downloads
21
Updated
Sep 26, 2026
Package
com.example.batterytemp

Similar apps

Ratings & reviews

—
0 ratings
  • 5
    0
  • 4
    0
  • 3
    0
  • 2
    0
  • 1
    0

Write a review

Tap a star to rate this app