私はいくつかのクイズのためのアプリを設計しています。 私はスタートボタンを押すと開始するアクティビティが必要です。1秒間待ってから赤いイメージを表示すると、1秒間watisが再び黄色の顔を表示し、もう1秒待って緑色のイメージを表示します。アクティブカウントを3秒間カウントダウンし、別のアクティビティを自動的に開始する
開始クイズを押すと開始するアクティビティ。
パブリッククラスpgtwo iはとしてinvisable画像visabilityを設定し、1秒間待った後、各画像visabilityがvisableなるアクティビティ{
ImageView rface,yface,gface;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.newpg2);
rface = (ImageView) findViewById(R.id.imageView1);
yface = (ImageView) findViewById(R.id.imageView2);
gface = (ImageView) findViewById(R.id.imageView3);
rface.setVisibility(ImageView.INVISIBLE);
yface.setVisibility(ImageView.INVISIBLE);
gface.setVisibility(ImageView.INVISIBLE);
Thread trd = new Thread(){
@Override
public void run() {
// TODO Auto-generated method stub
try {
sleep(1000);
rface.setVisibility(ImageView.VISIBLE);
sleep(1000);
yface.setVisibility(ImageView.VISIBLE);
sleep(1000);
gface.setVisibility(ImageView.VISIBLE);
} catch (Exception e) {
// TODO: handle exception
}finally{
Intent myIntent = new Intent("com.ak.qmttpack.pgthree");
myIntent.putExtra("pname", pname);
myIntent.putExtra("tabList", tabList);
myIntent.putExtra("order",order);
myIntent.putExtra("noq", noq);
myIntent.putExtra("seq", seq);
startActivity(myIntent);
}
}
};
trd.start();
}
}
を拡張します。 それは数秒待って、次のactivity.it dosentの作業を開始します。なぜ助けplese。 または私が必要とするものを得る別の方法があります。
どういうわけではありませんか教えてください。 – Cata
画像は全く見えません。 – akhil
画像は順番に表示されるはずですが、何も表示されていません。 – akhil