How to Put set delay on android Progress bar

Raz

New Member
What I want is to set it up so that the progress bar loads for 15 seconds, and then go on to the next activity.Right now the activity has : \[code\]public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button btn5 =(Button)findViewById(R.id.button); btn5.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { Intent myIntent = new Intent(); myIntent.setAction(Intent.ACTION_VIEW); myIntent.setData(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI); setContentView(R.layout.loading); } }); }}\[/code\]And the xml page has: \[code\]<ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleHorizontal" android:layout_width="match_parent" android:layout_height="144dp" android:layout_gravity="center_vertical" />\[/code\]I want to know how to make to make progressBar1 Load for 15 seconds and then go to result.xml
 
Back
Top