Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 2.17 KB

README.md

File metadata and controls

67 lines (51 loc) · 2.17 KB

Glass GDK Progressbar

Maven Central

Build Status

Painless ProgressBar for Glass GDK!

###Including In Your Project

#####Gradle

compile 'com.github.prt2121:ProgressBar:1.0@aar'

###Usage

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);
        mSliderView = (SliderView) findViewById(R.id.slider);
        mSliderView.startProgress(5 * 1000, animatorListener); // 5 seconds with listener
        // mSliderView.startProgress(5 * 1000); // 5 seconds without listener
        // mSliderView.startIndeterminate();
    }

Changing the color in xml

gif 02

    <com.prt2121.glass.widget.SliderView
        android:id="@+id/slider_top"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        app:progress_color="@android:color/holo_blue_bright" />

    <com.prt2121.glass.widget.SliderView
        android:id="@+id/slider_bottom"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        app:progress_color="@android:color/holo_blue_bright" />

gif 02

    <com.prt2121.glass.widget.SliderView
        android:id="@+id/slider_top"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true" />

    <com.prt2121.glass.widget.SliderView
        android:id="@+id/slider_bottom"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" />