A collection of custom gauges for Android devices
- Android Studio
- Android Lollipop API 21+
<!-- res/layout/activity.xml -->
<com.bptracker.ui.gauges.GradientCircleGauge
android:id="@+id/gcg_gauge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
gauge:backgroundVisible="false"
gauge:titleText="Battery"
gauge:titleTextRadius="73dp"
gauge:titleTextSize="15sp"
gauge:animation="true"
gauge:gaugeLevel="50"
gauge:additionalLabel="CHARGE CYCLE"
gauge:additionalValue="232323"
gauge:progressLabel="RESERVE"
gauge:foregroundStartColor="#125D9D"
gauge:foregroundEndColor="#125D9D" />
// Activity class
mGauge = (GradientCircleGauge) findViewById(R.id.gcg_gauge);
mGauge.setAdditionalValue("19");
mGauge.setAdditionalLabel("CHARGE CYCLE");
mGauge.setGaugeLevel(54);
See also the included example app.
Android Gauge Library is licensed under the MIT license.
Copyright © 2017 Derek Benda