1

Ok so. I'm trying to build a nice Android Wear app with a companion app and I cannot for the life of me find a none animated circle element. To be clear this is what I'm looking for.

Multistage circle graphs in Google Fit App

Single stage battrey level graph

They appear to be fairly basic elements however they're not in the palette of available default elements despite showing up in a lot of apps and watch faces from a myriad of developers.

azariah
  • 439
  • 4
  • 15

3 Answers3

3

Try Material Progress Bar https://github.com/pnikosis/materialish-progress

OR

Try this link. Choose one of the progress bar as you want

Er.Rohit Sharma
  • 696
  • 5
  • 21
1

You can use this class.

<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
    android:fromDegrees="270"
    android:toDegrees="270">
    <shape
        android:innerRadiusRatio="2.5"
        android:shape="ring"
        android:thickness="1dp"
        android:useLevel="true"><!-- this line fixes the issue for lollipop api 21 -->

        <gradient
            android:angle="0"
            android:endColor="#007DD6"
            android:startColor="#007DD6"
            android:type="sweep"
            android:useLevel="false" />
    </shape>
</rotate>

And set it as android:progressDrawable="@drawable/circular_progress_bar" to your progressbar.

KishuDroid
  • 5,411
  • 4
  • 30
  • 47
1

Yes, that is not a default element.
Basically you have 2 options.
1. Go and find something suitable here https://android-arsenal.com/tag/76. Don't worry about extra dependency it usually consists of 1-5 classes for custom view.
2. You can create your own custom view, using Canvas.drawArc(..) method.

Also here are couple of links to help you
https://stackoverflow.com/a/26806770/1527472
https://github.com/Todd-Davies/ProgressWheel

Community
  • 1
  • 1
  • You are also legend. Android Arsenal looks to be the go to resource for standard non-standard and non-standard elements. :D Thanks for the link. However Sharma provided the direct solution to my problem today so he gets the cred. :) – azariah Sep 17 '15 at 08:53