battery-view-android

所属分类:能源行业(电力石油煤炭)
开发工具:kotlin
文件大小:406KB
下载次数:0
上传日期:2021-10-30 08:07:51
上 传 者sh-1993
说明:  具有持久长宽比和可定制特征的简单视图,xml或编程两者
(Simple view with persist aspect ratio and customizeable characteristiscs, xml or programmatically both)

文件列表:
app (0, 2021-10-30)
app\build.gradle (1383, 2021-10-30)
app\proguard-rules.pro (751, 2021-10-30)
app\src (0, 2021-10-30)
app\src\androidTest (0, 2021-10-30)
app\src\androidTest\java (0, 2021-10-30)
app\src\androidTest\java\iam (0, 2021-10-30)
app\src\androidTest\java\iam\thevoid (0, 2021-10-30)
app\src\androidTest\java\iam\thevoid\batteryviewexample (0, 2021-10-30)
app\src\androidTest\java\iam\thevoid\batteryviewexample\ExampleInstrumentedTest.java (771, 2021-10-30)
app\src\main (0, 2021-10-30)
app\src\main\AndroidManifest.xml (724, 2021-10-30)
app\src\main\java (0, 2021-10-30)
app\src\main\java\iam (0, 2021-10-30)
app\src\main\java\iam\thevoid (0, 2021-10-30)
app\src\main\java\iam\thevoid\batteryviewexample (0, 2021-10-30)
app\src\main\java\iam\thevoid\batteryviewexample\MainActivity.kt (7622, 2021-10-30)
app\src\main\java\iam\thevoid\batteryviewexample\OnSeekBarChangeListenerAdapter.kt (374, 2021-10-30)
app\src\main\res (0, 2021-10-30)
app\src\main\res\drawable-v24 (0, 2021-10-30)
app\src\main\res\drawable-v24\ic_launcher_foreground.xml (1880, 2021-10-30)
app\src\main\res\drawable (0, 2021-10-30)
app\src\main\res\drawable\ic_launcher_background.xml (5606, 2021-10-30)
app\src\main\res\layout (0, 2021-10-30)
app\src\main\res\layout\activity_main.xml (9611, 2021-10-30)
app\src\main\res\mipmap-anydpi-v26 (0, 2021-10-30)
app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml (272, 2021-10-30)
app\src\main\res\mipmap-anydpi-v26\ic_launcher_round.xml (272, 2021-10-30)
app\src\main\res\mipmap-hdpi (0, 2021-10-30)
app\src\main\res\mipmap-hdpi\ic_launcher.png (3056, 2021-10-30)
app\src\main\res\mipmap-hdpi\ic_launcher_round.png (5024, 2021-10-30)
app\src\main\res\mipmap-mdpi (0, 2021-10-30)
app\src\main\res\mipmap-mdpi\ic_launcher.png (2096, 2021-10-30)
app\src\main\res\mipmap-mdpi\ic_launcher_round.png (2858, 2021-10-30)
app\src\main\res\mipmap-xhdpi (0, 2021-10-30)
app\src\main\res\mipmap-xhdpi\ic_launcher.png (4569, 2021-10-30)
... ...

[](https://search.maven.org/search?q=g:io.github.iamthevoid.batteryview) # battery-view-android Simple View to show battery level. View scales perfectly inside bounds whatever they are, so it looks always beautiful. View can be customized. Except bounds and color can be changed: charging status - is charging or not, border thickness, spacing between border and battery-level rect and sure battery level percent. If need something else you can just leave feature request. Screenshots how it looks like: Charged | Charging | Discharged a bit | Low with colored border :-------------------------:|:-------------------------:|:-------------------------:|:-------------------------: ![charged](media/charged.png "Charged") | ![charging](media/charging.png "Charging") | ![discharged](media/discharged.png "Discharged a bit") | ![borderColor](media/borderColor.png "Low with colored border") ## Also you can set attributes in xml: attribute | meaning :-------------------------:|:-------------------------: ```app:bv_borderColor``` | Has 'color' type, and sets the color of the border of the battery. Also can be set in code with view `borderColor` property. ```app:bv_infillColor``` | Has 'color' type, and sets the color of the infill of the battery. Also can be set in code with view `infillColor` property. ```app:bv_percent``` | Has 'integer' type, sets the percent of battery. Also can be set in code with view `batteryLevel` property. ```app:bv_charging``` | Has 'boolean' type, sets the charging state. If battery is 'charging' level rect is not shown. Also can be set in code with view `isCharging` property. ```app:bv_internalSpacing``` | Has 'float' type, sets spacing between border and level drawable. Value is relative to border width and actually this is percent of border width. Also can be set in code with view `internalSpacing` property. ## You can add this lib in your project as simple as add this line to your build.gradle file ``` implementation "io.github.iamthevoid.batteryview:batteryview:0.6.1" ```

近期下载者

相关文件


收藏者