0
public class ImageViewActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
Integer[] ImgPreview = { R.drawable.mlview1, R.drawable.mlview2,
R.drawable.mlview3 };
super.onCreate(savedInstanceState);
setContentView(R.layout.image_prev);
Intent intent = null;
Bundle b = intent.getExtras();
int position = b.getInt("position");
// here, what to do?
if (position == 0) {
}
從以前的活動中,它根據「position」的值提取參數「position」,它應該顯示圖像。例如:如果位置爲0,則顯示圖像「mlview1」,等等。在接受的位置的基礎上,如何顯示圖像?
謝謝!成功了! – Shiven