I am new to Android. I want to set different icon (images) at different position of spinner item. How can I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think what you are looking for is a custom dialog.
What you basically want to do is create a custom dialog and put your own animation in there.
There are a couple of ways to do animation, but I prefer to use animation lists. You can look up how to use them here: http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html
If you don’t have a series of images to create an animation list an alterative might be animate your image using a translate or rotate animation. Here’s a really great link on how to do that. http://www.barebonescoder.com/2010/06/android-development-more-animations-part-1/
After you figure out how to make an animation, all you have to do is put in a dialog.
Look here for how to do that: http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog
Hope that helps!