martes, 3 de septiembre de 2013

ProgressBar in ActionBar

For using the indeterminate progress bar in the actionbar, just a few steps:

Put requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); before setContentView();

@Override
protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 
 requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
 setContentView(R.layout.extern_main);
}


and use the function setProgressBarIndeterminateVisibility(true); for start the spining and setProgressBarIndeterminateVisibility(false); to stop

No hay comentarios:

Publicar un comentario