我尝试将图片滑块放在ListView
上。当我点击该滑块的图片时,我想针对不同的图片点击不同的网址。
这是我的代码
Hash_file_maps.put("Android Donut", "http://www.planwallpaper.com/static/images/9-credit-1.jpg");
Hash_file_maps.put("Android Eclair", "http://www.planwallpaper.com/static/images/canberra_hero_image_JiMVvYU.jpg");
Hash_file_maps.put("Android Froyo", "http://androidblog.esy.es/images/froyo-4.png");
Hash_file_maps.put("Android GingerBread", "http://www.planwallpaper.com/static/images/6775415-beautiful-images.jpg");
for(String name : Hash_file_maps.keySet()) {
TextSliderView textSliderView = new TextSliderView(MainActivity.this);
textSliderView
// .description(name)
.image(Hash_file_maps.get(name))
// .setScaleType(BaseSliderView.ScaleType.Fit)
.setOnSliderClickListener(this);
textSliderView.bundle(new Bundle());
// textSliderView.getBundle().putString("extra",name);
sliderLayout.addSlider(textSliderView);
}
sliderLayout.setPresetTransformer(SliderLayout.Transformer.Stack);
// sliderLayout.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
sliderLayout.setCustomAnimation(new DescriptionAnimation());
sliderLayout.setDuration(5000);
sliderLayout.addOnPageChangeListener(this);