i have "Gallery" on my layout, and i created a class inherits from BaseAdapter, to set it as Gallery adapter
GalleryAdapter extends BaseAdapter 
and i used it开发者_开发技巧
setAdapter(new GalleryAdapter
and it works fine.
but now i need to change the selected view within the gallery, i need it within the adapter.
is there anyway to know if this "View" is selected from the Adapter so i can change the look of it?
The easiest way to do this is to create a statelist drawable (see here) and customize the "selected" state to whatever you want there. Then you provide this drawable as the background for the item.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论