0
プロセスダイアログスレッドをポップアップして、一連の異なる文字列を循環するテキストを持つことができるかどうかは疑問でした。あなたが新しい都市を作ったときの古いSimCityゲームのような種類のもの: "Building TeraForming などの人口"Android:異なる文字列を使ってダイアログサイクルを処理する
haha最高の例ではありませんが、それが頭に浮かぶ最初のことです。私は基本的な対話のためにこれを使用しますと呼ばれる
private class LoadingThread extends AsyncTask<Void, Void, String> {
@Override
protected String doInBackground(Void... params) {
try {
Thread.sleep(8000);
}
@Override
protected void onPostExecute(String result) {
progressDialog.dismiss();
new AlertDialog.Builder(MyClass.this)
.setMessage(result).setCancelable(false).setTitle("Title")
.setPositiveButton("Done", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getApplicationContext(), "Sorry.", Toast.LENGTH_LONG).show();
}
}
).show();
}
}
その:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.progressDialog =
ProgressDialog.show(
this,
"String 1",
"String 2"
);
new LoadingThread().execute();
}