A
A
afna2015-01-21 14:29:01
Android
afna, 2015-01-21 14:29:01

How to stop ProgressBar?

There is a ProgressBar:

<ProgressBar
        android:id="@+id/progressBar1"
        style="?android:attr/progressBarStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"   
        android:indeterminateDrawable="@drawable/progress"
/>

@drawable/progress is:
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
    android:fromDegrees="0"
    android:pivotX="50%"
    android:pivotY="50%"        
    android:toDegrees="1080" 
    android:drawable="@drawable/tacu_tr_compressor">

 </rotate>

Can you please tell me how to programmatically start and stop the rotation of the ProgressBar ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artix, 2015-01-21
@sulik93

I would advise you to use this library, there is a complete customization of ProgressBar

mProgressBar.setIndeterminateDrawable(new SmoothProgressDrawable.Builder(context)
[...]
.progressiveStopSpeed(3.4)
.progressiveStart(false)
[...]
.build());

M
Max, 2015-01-23
@mbelskiy

.show();
.hide();

not satisfied?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question