ここに私のボタンアクティビティのコードがあります。私はprogressvialogを追加することができました。それは、actvity sciencetechnologyがそのショーの読み込み中であるときだけです。それは回転していないので、 mabyの誰かがここに私のミスを探すことができますコードです:ProgressDialogホイールが回転しない
package net.thinkbin;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
public class tutorial1 extends Activity{
private ProgressDialog progressDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
super.onCreate(savedInstanceState);
setContentView(R.layout.tutorial1);
Button share = (Button) findViewById(R.id.button2);
share.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent("net.thinkbin.SHARE"));
overridePendingTransition(0, 0);
finish();
}
});
Button menu = (Button) findViewById(R.id.buttonhome);
menu.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
progressDialog = ProgressDialog.show(tutorial1.this, "", "Loading...");
Thread th = new Thread(new Runnable() {
public void run(){
startActivity(new Intent("net.thinkbin.MENU"));
overridePendingTransition(0, 0);
progressDialog.dismiss();
finish();
}
});
th.start();
}
});
Button culture = (Button) findViewById(R.id.button3);
culture.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
progressDialog = ProgressDialog.show(tutorial1.this, "", "Loading...");
Thread th = new Thread(new Runnable() {
public void run(){
startActivity(new Intent("net.thinkbin.CULTURE"));
overridePendingTransition(0, 0);
progressDialog.dismiss();
finish();
}
});
th.start();
}
});
Button entertainment = (Button) findViewById(R.id.button4);
entertainment.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
progressDialog = ProgressDialog.show(tutorial1.this, "", "Loading...");
Thread th = new Thread(new Runnable() {
public void run(){
startActivity(new Intent("net.thinkbin.ENTERTAINMENT"));
overridePendingTransition(0, 0);
progressDialog.dismiss();
finish();
}
});
th.start();
}
});
Button philosophy = (Button) findViewById(R.id.button5);
philosophy.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
progressDialog = ProgressDialog.show(tutorial1.this, "", "Loading...");
Thread th = new Thread(new Runnable() {
public void run(){
startActivity(new Intent("net.thinkbin.PHILOSOPHY"));
overridePendingTransition(0, 0);
progressDialog.dismiss();
finish();
}
});
th.start();
}
});
Button sciencetechnology = (Button) findViewById(R.id.button6);
sciencetechnology.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
progressDialog = ProgressDialog.show(tutorial1.this, "", "Loading...");
Thread th = new Thread(new Runnable() {
public void run(){
startActivity(new Intent("net.thinkbin.SCIENCETECHNOLOGY"));
overridePendingTransition(0, 0);
progressDialog.dismiss();
finish();
}
});
th.start();
}
});
}
}