Practical 13. Determinant Cyclic Progress Bar
Practical 13. Determinant Cyclic Progress Bar
Practical 13. Determinant Cyclic Progress Bar
MainActivity.java
package com.example.practicalno13;
import androidx.appcompat.app.AppCompatActivity;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.widget.ProgressBar;
import android.widget.TextView;
import java.util.PrimitiveIterator;
import java.util.Timer;
import java.util.TimerTask;
}
}
Drawable Resource File ( Goto res->Drawable->create new drawable resource file)
</shape>
Activity_main.xml
<ProgressBar
android:id="@+id/progressBar2"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_marginTop="188dp"
android:progress="80"
android:progressDrawable="@drawable/circle_shape"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView"
android:layout_width="45dp"
android:layout_height="24dp"
app:layout_constraintBottom_toBottomOf="@+id/progressBar2"
app:layout_constraintEnd_toEndOf="@+id/progressBar2"
app:layout_constraintHorizontal_bias="0.509"
app:layout_constraintStart_toStartOf="@+id/progressBar2"
app:layout_constraintTop_toTopOf="@+id/progressBar2" />
</androidx.constraintlayout.widget.ConstraintLayout>