我正在构建我的第一个应用程序。当我点击它时,我想为每个列表视图项目显示一个不同的图像。任何人都可以请帮我吗?!我被卡住了。Android中的每个listview项目的不同图像
这是我在调用活动中尝试的方式。
公共无效onItemClick(适配器视图父,观景,INT位置,长的id){
locationListView.buildDrawingCache();
Bitmap image= locationListView.getDrawingCache();
Bundle extras = new Bundle();
extras.putParcelable("imagebitmap", image);
Intent intent;
intent.putExtras(extras);
startActivity(intent);
Bundle extra = getIntent().getExtras();
Bitmap bmp = (Bitmap) extras.getParcelable("imagebitmap");
image.setImageBitmap(bmp);
}});
发布你的代码你试过的东西是什么 – Amsheer 2014-11-14 13:43:41