I want to know that is th best way to create a loading screen , when a traitement works in background... like the white screen with loadingDialog in FaceBook app. i though about a seperate activity like splashscreen but i d'ont think that is the best solution.
Asked
Active
Viewed 577 times
2 Answers
0
Facebook's loading page is simply an Activity
with an animated GIF, while they spin off a background AsyncTask
.
-
i d'ont think so : i mean animated gif are not supported by all version – iheb May 30 '11 at 10:08
0
Use AsyncTask,
Instead of ProgressDialog You can use ProgressBar also
ProgressBar with small Spinning Circle
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/FIL_Main_RelativeLayout"
android:background="@color/White">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
style="@android:style/Widget.ProgressBar.Inverse"
android:id="@+id/FIL_Middle_ProgressBar"></ProgressBar>
</RelativeLayout>
For ProgressDialog
See my response in show progressbar on button click when going from 1 intent to other and data is coming from server
Thanks Deepak

Community
- 1
- 1

Sunil Kumar Sahoo
- 53,011
- 55
- 178
- 243
-
Thanks for the answer , but it is exactely what i did , i just want to make it look nicer : i mean changing the classic ugly ^^ progressdialog by a white layout (for example) and a small circle spining and some text. how can i do this : i tried to use layout visibility (GONE,VISIBLE...) but il doesn't work correctly. – iheb May 30 '11 at 10:02
-
See my updated response. I feel you want to use ProgressBar instead of ProgressDialog – Sunil Kumar Sahoo May 30 '11 at 10:28