问题
Thanks for reading!
I am using the Android Gallery tutorial and wondering if there's a way to customize the thumbnails of the gallery> For eg: Display caption ON the image?
Thanks!
回答1:
After trying all approaches suggested here, I wasn't able to still get a custom gallery the way I wanted it to. I kept running into ClassCastException
. So, here's what worked for me till now. This is just a workaround and incase someone comes up with a better way to design a custom gallery - do post your answer here so I can accept it.
Thanks for helping out!
回答2:
You can completely customize your Gallery
items. Just return whatever View
you want from the getView
method of the ImageAdapter
.
(I assume your are using this tutorial)
来源:https://stackoverflow.com/questions/5517101/custom-gallery-thumbnails-in-android