I want to show progress bar to going from one activity to another activity until another activity is loaded can anybody give example
Thanks
I want to show progress bar to going from one activity to another activity until another activity is loaded can anybody give example
Thanks
You can do this by declaring two progressbar inside a ViewFlipper in xml.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/lah"
>
<ViewFlipper
android:id="@+id/myFlipper"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ProgressBar
android:id="@+id/first_progressbar" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ProgressBar
android:id="@+id/second_progressbar" />
</LinearLayout>
</ViewFlipper>
</LinearLayout>
Then in your java program create a ViewFlipper object.
ViewFlipper vf = (ViewFlipper) findViewById( R.id.myFlipper);
And call
vf.showNext();
Thus you can show two ProgressBar. You can also apply animation that seems ProgressBars moves from one activity to next. Thanks...
vf.setInAnimation(AnimationUtils.loadAnimation( getApplicationContext(), R.anim.right_in ));
vf.setOutAnimation( AnimationUtils.loadAnimation( getApplicationContext(), R.anim.left_out ));
vf.showNext();