ImageView: imageView
同じものを更新しているためTextView: text
、最後のビットマップとテキストのみが表示されます。
すべてのビットマップとそれぞれのテキストをレイアウトに追加しようとしていますか??
次のようにします。
for(int i=0; i<numImages; i++)
{
// Stuff processes here including getting a new Bitmap bmp image
ImageView imageView = new ImageView(this);
imageView.setImageBitmap(bmp);
parent.addView(imageView);
TextView text = new TextView(this);
text.setText(text.getText()+"image "+i+" a success!\n");
parent.addView(text);
Log.d("update", text.getText()+"image "+i+" a success!\n");
}
数秒ごとにビットマップを ImageView に追加する場合:
private Timer timer = new Timer();
private TimerTask timerTask;
timerTask = new TimerTask() {
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
//Keep a count and change the ImageView and Text depending on that count
}
});
}
};
timer.schedule(timerTask, 0, 5000);