Spinner Example Android Studio Tutorial - Custom Spinner Adapter

preview_player
Показать описание
Todays tutorial we are building a simple Spinner App in Android Studio and Java.

In this tutorial I give an example of how to create a custom spinner that contains an ImageView and a Textview. We create a custom adapter class that extends Array Adapter and link it up with our Spinner. After completing this tutorial you will have the skills required to make your spinner components look and feel which ever way best suits the Android App you're currently working on.

Spinner components are a great way to obtain input from the user if you have a good idea of what the user is likely to want to input.

Source Code:

User Images:

⏱️TIMESTAMPS
00:00 - Intro
00:29 - Layout Spinner
01:36 - User Java
02:33 - Main Activity
02:51 - Custom Spinner Adapter
03:56 - Spinner Adapter
06:16 - Set Adapter

#AndroidStudio #AndroidSpinner #AppDevelopment
Рекомендации по теме
Комментарии
Автор

Your tutorial is super concise and direct and that´s what i was looking for. Thanks so much for sharing.

tomas.menniti
Автор

I succeeded in first attempt
Thanks...!
👍

veerendrasimpi
Автор

Thank you, this is what my teacher asked me on class, thanks a lot

yourfingeronscreen
Автор

Thanks... Clear coding. Could you share dependend spinner. Please

jamunaperumal
Автор

sometimes, spinner dialog display the name list double times. duplicate redundant data. why sir?

muthukumar
Автор

Sir, I was trying to implement custom spinner adapter by extending ArrayAdapter but my selected item is not showing in the spinner box. It is just blank however upon clicking on the spinner the dropdown list appears and item can be selected as usual but the selected item is not showing in the spinner widget. Help me please

kartickmanna
Автор

Please do more tutorials in android, I am begging you

yourfingeronscreen
Автор

Hi Cal, can you please make a continuation of this video showing on another screen (once pressing a button )all the details relating to the user that was selected from the spinner. THANKS!

raellefreinkel
Автор

Hi Cal, great video man! Do you know of a way to initialise the spinner display to something other than 0 from the values in the array? The use case would be something like having a spinner in an edit screen where the user wishes to save a different value from something previously saved. When the edit screens new instance is called, instead of the spinner initialising with whatever is at position 0 in the array it initialises with the users previously stored value? Hope the question makes sense to you!

anthonycraddock
Автор

hi bro when i covert website in to android app the droup down list not view not suported in search bar but it is working in web site please help me

easyoneall
Автор

Hey Cal I want to save an activity state when I press back button It recreate

scamstoppers
Автор

Hey cal how can I view the selected item on a Toast?

derrickcuinnedomantay
Автор

great video but my app crashes when i try to open the spinner anyone knows why?

stavrel
visit shbcf.ru