×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: joseifm
Added: Sep 23, 2014 4:42 PM
Views: 32
Display a indeterminate progress bar on title bar.
  1. //Declare on Activity main OnCreate
  2. protected void onCreate(Bundle savedInstanceState) {
  3.         super.onCreate(savedInstanceState);
  4.        
  5.         requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
  6.  
  7.         setContentView(R.layout.activity_my);
  8. }
  9.  
  10. //To Show ProgressBar
  11. setProgressBarIndeterminateVisibility(true);
  12. //To Hide ProgressBar
  13. setProgressBarIndeterminateVisibility(false);