Progress bar are used at the time of loading data from the server it is very simple to apply progress bars.The code for the same is given below
Xml code
Xml code
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/progress"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
Javacode
Intialization
ProgressBar progressBar;
Typecating
progressBar=findViewById(R.id.progress);Setting visibility
progressBar.setVisibility(View.VISIBLE);
No comments:
Post a Comment