You can try this alternative method, I created it when I found out about the execution bar,
main.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"> <Button android:text="@string/Button02Text" android:id="@+id/Button02" android:layout_width="fill_parent" android:layout_height="wrap_content"> </Button> </LinearLayout>
Activities of the ProgressBar,
public class ProgressBarExampleActivity extends Activity { ProgressThread progThread; ProgressDialog progDialog; Button button1, button2; int typeBar;
source share