请帮忙。我有3个imageview getresources来自数据库的Intent.putExtra listview。我想要imageview单击打开新活动,然后滑动以移动下一个图像。我该怎么办?感谢提前
// Declare Variables
String title;
String firstimages, secondimages, thirdimages;
ImageLoader imageLoader = new ImageLoader(this);
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.page_single_itemview);
Intent i = getIntent();
// Get the result of image
firstimages = i.getStringExtra("first_image");
secondimages = i.getStringExtra("second_image");
thirdimages = i.getStringExtra("third_image");
// Locate the TextViews in singleitemview.xml
TextView txttitle = (TextView) findViewById(R.id.title);
// Locate the ImageView in singleitemview.xml
ImageView imgImageone = (ImageView) findViewById(R.id.image_single_one);
ImageView imgImagetwo = (ImageView) findViewById(R.id.image_single_two);
ImageView imgImagethree = (ImageView) findViewById(R.id.image_single_three);
txttitle.setText(title);
imageLoader.DisplayImage(firstimages, imgImageone);
imageLoader.DisplayImage(secondimages, imgImagetwo);
imageLoader.DisplayImage(thirdimages, imgImagethree);
}
}
答案 0 :(得分:0)
查看android-code-snippet-listening-swipe博文以获取滑动事件。您可以为整个活动或任何您想要的视图添加滑动事件。根据您的滑动事件更改图像/图像视图。