我想要的是设置它,以便进度条加载 15 秒,然后继续下一个活动。
现在活动有:
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);
}
});
}
}
xml页面有:
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="144dp"
android:layout_gravity="center_vertical" />
我想知道如何使 progressBar1 加载 15 秒,然后转到 result.xml