简体   繁体   English

android可点击图像轮播

[英]android clickable image carousel

I want to implement an image carousel that opens up an activity whenever a particular image is clicked.我想实现一个图像轮播,每当单击特定图像时都会打开一个活动。 Also the carousel should be dynamic in the sense that when a user clicks a particular marker in google maps, an image pertaining to that marker is displayed.轮播也应该是动态的,因为当用户点击谷歌地图中的特定标记时,会显示与该标记相关的图像。 Kindly assist.请协助。

You can use a thread wich communicates with the UI main thread using the function RunOnUiThread(), so that this thread can change image and parameters of the Button/ImageButton/Image which is clicked.您可以使用 RunOnUiThread() 函数与 UI 主线程通信的线程,以便该线程可以更改单击的 Button/ImageButton/Image 的图像和参数。

Besides, if you want to let the map interact with it, just modify some global parameter of the Activity while pressing the marker, and use this parameter within the same thread which alrealdy modifies the image resource of your button.此外,如果您想让地图与其交互,只需在按下标记的同时修改 Activity 的一些全局参数,并在已修改按钮图像资源的同一线程中使用此参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM