Exposed Drop-Down Menu - Forget about Spinner | Android Studio Tutorial

Поділитися
Вставка
  • Опубліковано 22 лип 2024
  • 🏆 My Online Courses
    stevdza-san.com
    🐱‍👤 Wanna become a member? Join!
    / @stevdzasan
    📸 Instagram
    / stevdza_san
    Menus allow users to make a selection from multiple options. They are less prominent and take up less space than selection controls, such as a set of radio buttons. Exposed Drop-down menu is a new material design component, and you should use it as a replacement for an old Spinner. Watch the video to learn everything about it!
    🕒 Timestamps:
    0:00 - Introduction
    0:27 - TextInputLayout with AutoCompleteTextView
    2:30 - Disable InputType
    3:10 - Create String-Array
    3:44 - Create dropdown_item.xml
    5:00 - Create ArrayAdapter
    6:27 - FilledBox Style
    7:44 - add onResume() function
    8:47 - Icon and Label

КОМЕНТАРІ • 183

  • @anonymousgoyal6792
    @anonymousgoyal6792 3 роки тому +1

    This is awesome. I won't use spinner ever again. Thankyou so much

  • @avigyandas3829
    @avigyandas3829 Рік тому +7

    Cannot understand the view binding part in 5:11 mark, I can't really seem to achieve that even after having viewBinding on in the gradle file

  • @tinch014
    @tinch014 2 роки тому

    Thank you for the tutorial! The "onResume" part was really useful for me

  • @YoussefMoataz_
    @YoussefMoataz_ 3 роки тому +3

    Brilliant , I am gonna apply this on my projects now 🤩👏👏

  • @TheNerdsHouse
    @TheNerdsHouse Рік тому

    Bro 2 yrs old vid, but helped me a lot on work today. THANKS!!!

  • @areejturkei5482
    @areejturkei5482 3 роки тому +4

    Can you convert the code in “create array adapter” to java? Cuz it’s give me syntax errors

  • @dankim4652
    @dankim4652 Рік тому

    Is it possible to remove the elevation and replace it with an outline for the item list dropped down?

  • @muhammadsarimmehdi
    @muhammadsarimmehdi 2 роки тому

    If I set layout_width to wrap_content, I get a warning about localized text expansion. How do I get rid of this without using the suppress warning annotation since that doesn't really solve the problem

  • @PiyushSharma-gw1wx
    @PiyushSharma-gw1wx Рік тому

    hi sir thank you for such an informative video just wanted to know how could i put the menu item list at bottom of the drop down since it coming on top of drop down container.

  • @sanketbhangale5788
    @sanketbhangale5788 2 роки тому +1

    In my case after selecting one item from the dropdown, When I go for selecting it again it only shows one item in the dropdown list any ideas why it is happening?

  • @anurajms
    @anurajms 3 роки тому +1

    how do we add on click listeners to drop down menu items?
    thank you

  • @alexong123
    @alexong123 2 роки тому

    Hello sir. Did this drop down menu can use as select item in recycler view?

  • @GAGANDEEP901
    @GAGANDEEP901 2 роки тому +1

    thanks that helped a lot , can i also add a checkbox in the TextInputLayout along with the text, for multiple selections?

  • @CarlosMonteirotube
    @CarlosMonteirotube Місяць тому

    what's your recommendation for the same type of dropdown with material3 and compose?

  • @markdelphi8075
    @markdelphi8075 2 роки тому

    I can't understand why it behaves otherwise in my project. I do that exactly in that way, but after selection, when I change to a fragment and than come back, the list is empty. Why does it happen?

  • @bboydarknesz
    @bboydarknesz 3 роки тому

    I always have problem in dropdown if items is dynamic. Like I get Model from API and need to pass the ID from selected item. Usually I manipulate it with save the Model globally,when select item, I set selected item. Do you have best idea for this case??? Thank youuu

  • @Jdg70
    @Jdg70 2 роки тому

    Great video. was what I was looking for. Thank you!!

  • @ogieperalta9414
    @ogieperalta9414 Рік тому

    When I input the Exposed Drop Down menu as the style the thing ain't showing and it gives an error failed to instantiate one or more classes

  • @anuragtiwari2511
    @anuragtiwari2511 3 роки тому +3

    Best exaplanation ever possible

  • @ericuche755
    @ericuche755 2 роки тому

    Please how do i create the “exposed drop down style “ it doesn’t show in my style

  • @pickemparty
    @pickemparty 3 роки тому

    I have set android:inputType="none" in the xml layout but the user is still able to enter text!? I am not sure how your does not allow it!?

  • @HelPfeffer
    @HelPfeffer 2 роки тому +1

    I have a question a think you should have mentioned. How do you recive the input?

  • @yusamertcakr8419
    @yusamertcakr8419 2 роки тому

    Thank you Yours are very helpful. but i got a a question about this video.
    How to set selected item ?

  • @ninabraelyn1857
    @ninabraelyn1857 2 роки тому

    Thank you for the tutorial ! Can u explain on the binding part as well ?

  • @muhammadizzahramadhan3000
    @muhammadizzahramadhan3000 3 роки тому

    i got error when inplementation this menu drop down.....can i see your implementation for drop down menu....please

  • @mohammedsharikh9405
    @mohammedsharikh9405 3 роки тому +2

    can you show me how to get value selected from this dropdown

  • @jyotimoykashyap9179
    @jyotimoykashyap9179 3 роки тому +3

    1st to watch , thanks for all these videos it really helps me so so much

  • @sulthan0022
    @sulthan0022 3 роки тому +1

    is there java version of the adapter, i don't understand kotlin

  • @_ytuser11
    @_ytuser11 2 роки тому

    Sir I have also created an exposed drop down menu and I want to store the options in firebase.Please tell

  • @convi346
    @convi346 Рік тому

    Very helpful Tutorial, thanks man!

  • @mikumikomiku.
    @mikumikomiku. 3 роки тому +3

    help i don't know how to create FirstFragment file and it didn't show how

  • @nareshsharma206
    @nareshsharma206 3 роки тому +2

    Sir please answer this question from where you learn android development

  • @okisulton
    @okisulton 3 роки тому +1

    can you give me tutorial to parsing data from json (retrofit) to exposed dropdown menu?

  • @pickemparty
    @pickemparty 3 роки тому +11

    Can you please share the Java code for the same element?

  • @hendri2018
    @hendri2018 2 роки тому

    Why did i got an error 1:21, when using custom style? is there a way to fix that?

  • @techpark9486
    @techpark9486 2 роки тому

    How can I add this programmatically? I can't add style to TextInputLayout programmatically

  • @mehakmemon5605
    @mehakmemon5605 Рік тому

    Pls anyone tell which which classses are imported in firstfragment

  • @codingmafia1642
    @codingmafia1642 3 роки тому

    Great Video ,but challenge is when u set backgroundColor for AutoCompleteTextView doesn't appear which forces you to set for TextInputLayout and which create a space above hint text that doesn't align

  • @hansheng654
    @hansheng654 Рік тому

    the dropdown hight doesn't seem to be calculated correctly when text become multiline ...

  • @theblurdev2828
    @theblurdev2828 2 роки тому

    Does anybody know how to set links to the different activities through the Drop down menu options?

  • @DiegoTube85
    @DiegoTube85 3 роки тому

    which app theme are you using?

  • @kurtl.3773
    @kurtl.3773 2 роки тому

    how did you create firstfragment class?

  • @abdallaha.raheem3078
    @abdallaha.raheem3078 3 роки тому +1

    In --- Val arrayAdapter = ArrayAdapter (requireContext(), ....)
    It's showing me error in requireContext
    What is this ?!

  • @AzkaLgamer
    @AzkaLgamer 3 роки тому

    how a i get the selected item ? in this method?

  • @yogeshaggarwal5045
    @yogeshaggarwal5045 4 місяці тому

    i am getting failed to instantiate one or more classes error and can not find the solution for it.

  • @technicmachine
    @technicmachine Рік тому

    Can you put the source code on github? I keep getting error with the style tag, telling me that it can't locate many different attributes.

  • @jesmarsuan5516
    @jesmarsuan5516 2 роки тому

    how to fix "Render Probelm" it appear everytime I add the "style"??

  • @rr2r2r2ra
    @rr2r2r2ra 2 роки тому

    how do we put the item selected into toast?

  • @darkcrow9319
    @darkcrow9319 11 місяців тому

    How i can keep the endIcon static?

  • @temangoding
    @temangoding 2 роки тому

    this is what im looking for, thanks sensei

  • @miliriam7060
    @miliriam7060 2 роки тому

    hi please i wrote all this code but they tell me i was wrong i wrote it in FragmentFirstJava, if you are urgent please answer me

  • @Arun_rajak2786
    @Arun_rajak2786 3 роки тому

    sir my drop down menu is not showing so what i do ?

  • @akshaykondekar3571
    @akshaykondekar3571 3 роки тому

    How can we show material spinner with custom object

  • @nomanzafarzafar7912
    @nomanzafarzafar7912 3 роки тому

    Great effort bro. Keep it up.

  • @desimusfiroh6536
    @desimusfiroh6536 3 роки тому

    how to get selected value from exposed dropdown menu ?

  • @markronderoragasa6493
    @markronderoragasa6493 2 роки тому

    Is there a way to make it searchable?

  • @VenewebTV
    @VenewebTV 3 роки тому +1

    Thanks for the video, usefull and updated, is possible for you to create an option to download the video's code in Java? Regards from Caracas, Venezuela

  • @BharadwajGiridhar
    @BharadwajGiridhar 3 роки тому

    I just hit the 100th like Stevdza-San :D .

  • @UbedThaheem
    @UbedThaheem Рік тому

    I need this code for Java, will you please explain?

  • @fzfxfcf
    @fzfxfcf 3 роки тому

    I don't know what version of Android is that that always is using VAL. But this isn't mine

  • @ZivShaltiel
    @ZivShaltiel 8 місяців тому

    i think it doesn't work anymore, it igonres the inputtype attribute and doesnt show the options until you start to type

  • @farezrosli9623
    @farezrosli9623 3 роки тому

    hello, can u make a tutorial on how to save spinner adapter data in firebase ? pls

  • @aarondraws7699
    @aarondraws7699 2 роки тому

    how do I do this without a fragment

  • @NHikmetK
    @NHikmetK Рік тому

    İ have been studying android for 16 month and i have started from zero during this period l had a chance to work on a real project for 5 month.
    Do you think can l work as an android developer ?

  • @magoelias3846
    @magoelias3846 3 роки тому +1

    Can you make this tutorial using java?

  • @mehakmemon5605
    @mehakmemon5605 Рік тому

    Can anyone pls send the source code as i am not able to get the imported classes here

  • @vladfedos5554
    @vladfedos5554 Рік тому

    Thank you Bro. It's perfect.

  • @itrustme4174
    @itrustme4174 2 роки тому

    how to show Error when No Item was Selected ?

  • @adamrampazzo1739
    @adamrampazzo1739 Рік тому

    "No value passed for parameter 'provider' in ContentProviderCompat.requireContext( 'here' )". How do I proceed?

  • @rubenvillanuevabaxarias5460
    @rubenvillanuevabaxarias5460 2 роки тому +1

    Hello and thank you for the video. How do I know in which string of the array I am at a certain moment? I would like to see changes in the screen when I change for example from English to Chinese, so how could I track in the code that I have changed from English to Chinese? Thanks in advance.

    • @deeno9631
      @deeno9631 2 роки тому

      hello, do you already have the answer for this problem, because I have the same problem as well I want to track the code from the dropdown list that I choose

  • @adidebnag6086
    @adidebnag6086 5 місяців тому

    Hello! Just wanted to ask if anyone knows how to programmatically reset the selection to the Layout? Like to the point where it has nothing selected with just the hint showing. If anyone figures that out, please let me know :)

  • @Another0neTime
    @Another0neTime 3 роки тому

    Great video!

  • @bileldallagi2890
    @bileldallagi2890 2 роки тому

    please how i can send data to firebase ??

  • @dinurangapriyasad5872
    @dinurangapriyasad5872 3 роки тому

    This will helpfull to everyone who likes to learn android... can you please give us to tutorial about the in-app purchases ? 😍

  • @elsisdeo9060
    @elsisdeo9060 3 роки тому

    Good, I need this, thanks btw

  • @bayuindradinata9209
    @bayuindradinata9209 3 роки тому +2

    nive vid. well, may you give a tutorial for save a input value for this data menu dropdown to database mysql ? many thanks

  • @manishsaxena2974
    @manishsaxena2974 2 роки тому

    is there any java translation?

  • @manavtamboli2109
    @manavtamboli2109 3 роки тому +3

    The offset in the FilledBox style might be because filled box has a floating hint/label and it left the space for it

    • @miliriam7060
      @miliriam7060 2 роки тому

      hi please i wrote all this code but they tell me i was wrong i wrote it in FragmentFirstJava, if you are urgent please answer me

  • @azwarinaazman
    @azwarinaazman Рік тому

    Is this coding available in Java Language?

  • @user-wd5so4xk2b
    @user-wd5so4xk2b Рік тому +1

    This is a great work, but this method works with the "fragment" and does not work with the "activity"

  • @clo4k661
    @clo4k661 3 роки тому

    How many years it takes you to reach this level?

  • @makhalibagas
    @makhalibagas 3 роки тому

    Thanks for this tutorial sir

  • @wilsonahanmisi1187
    @wilsonahanmisi1187 3 роки тому

    Life Saver..... Keep it up

  • @jaloliddinabdullaev2310
    @jaloliddinabdullaev2310 3 роки тому

    thank you bro, nice video

  • @sujitprasadkushwaha9031
    @sujitprasadkushwaha9031 3 роки тому

    you are the best. 🥰🥰❤️

  • @sjjayaswal7621
    @sjjayaswal7621 2 роки тому

    Good information 👍

  • @leunamvon2565
    @leunamvon2565 3 роки тому

    how we gonna forget it if you dont tell us how to get the data of it?...

  • @luizpaulo6169
    @luizpaulo6169 3 роки тому +12

    Your channel is amazing!!! Hugs from Brazil :)

    • @_johndoew
      @_johndoew 2 роки тому

      curti o canal dele tmb

    • @user-sv3ww2rz9o
      @user-sv3ww2rz9o 2 роки тому

      please what's the name of the fragment where he wrote

  • @ErtBaran
    @ErtBaran 3 роки тому

    Thanks so much. 💯

  • @aldrichnavoa5173
    @aldrichnavoa5173 2 роки тому

    how to do this in java?

  • @user-th7tm9lc7m
    @user-th7tm9lc7m 2 роки тому

    6:23 appears
    private var _binding: FragmentFirstBinding? = null
    but my kt file does not know FragmentFirstBinding. Could somebody know how do I solve this problem?

    • @the0nerens
      @the0nerens Рік тому

      It's named after the name of your fragment, since his fragment was called FirstFragment or something like that he had to use FragmentFirstBinding. In my case it was FragmentHomeBinding. It's: "Fragment(**Name of fragment**)Binding

  • @sajithpython
    @sajithpython 3 роки тому

    Sir please teach how to use scope storage in sticked in 😭😭😭😭 android 10+

  • @MonichGPT
    @MonichGPT 3 роки тому +1

    please share the source code of this project

  • @fadzriangibran799
    @fadzriangibran799 3 роки тому +1

    can we retrieve the data from the API and display it in the drop-down menu?

    • @kalibra2121
      @kalibra2121 3 роки тому

      well, depends what you're getting from the API.. for example if you get a list of items you can pass the list to the adapter and get the same result

  • @itomasandev7418
    @itomasandev7418 3 роки тому

    awesome video, can you give me tutorial about exposed dropdown menu with checkbox?

  • @alexanderfuentespe
    @alexanderfuentespe 3 роки тому +1

    How can I get the selected item from the autocompletetextview

  • @harunarrashid3048
    @harunarrashid3048 2 роки тому

    Thankyou sir :D

  • @alexanderchurkin3531
    @alexanderchurkin3531 2 роки тому

    Thank you. How to clear field after choosing an item ?

    • @smoybelizaire4100
      @smoybelizaire4100 Рік тому

      binding.autocomplete.setOnItemClickListener{adapterview,view,i,l->
      if(i==0){
      your toast here
      }else {
      Your toast here
      }
      Good luck
      }

  • @AadiOneYT
    @AadiOneYT 3 роки тому +1

    explanation and video was very helpful but I think spinner still better in handling item selection listener, both have different usage I think so we still need spinner in some cases

  • @ampa4989
    @ampa4989 3 роки тому +9

    Thank you. The videos are very helpful. It would be really nice if your editor were set to High Contrast instead of Dracula.