Sunday, May 19, 2019

progressbar

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


<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:

Alert Dialog Box

Alert Dialog Box Android AlertDialog   can be used to display the dialog message with OK and Cancel buttons. It can be used to inter...