Custom ProgressView.
Add BatterProgressView to your layout
<example.com.batterytest.BatteryProgressView
android:layout_width="250dp"
android:id="@+id/progress"
android:layout_height="250dp"
/>
Call setProgress() to set Progress on the view.
progress= (BatteryProgressView) findViewById(R.id.progress);
progress.setProgress(66);