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

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ต.ค. 2024

ความคิดเห็น • 183

  • @anonymousgoyal6792
    @anonymousgoyal6792 3 ปีที่แล้ว +2

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

  • @avigyandas3829
    @avigyandas3829 2 ปีที่แล้ว +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

  • @TheNerdsHouse
    @TheNerdsHouse ปีที่แล้ว

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

  • @SwagMessiah1
    @SwagMessiah1 2 ปีที่แล้ว +3

    For those having issues with the binding issue at around the ~6:30 mark, just do the code work in onViewCreated instead of onCreateView because then you can use your then inflated view to add the dropdown options. So in onViewCreated it would look something like this for kotlin:
    view.findViewById().setAdapter(arrayAdapter)

  • @anuragtiwari2511
    @anuragtiwari2511 3 ปีที่แล้ว +3

    Best exaplanation ever possible

  • @jyotimoykashyap9179
    @jyotimoykashyap9179 3 ปีที่แล้ว +3

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

  • @YoussefMoataz_
    @YoussefMoataz_ 3 ปีที่แล้ว +3

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

  • @tinch014
    @tinch014 2 ปีที่แล้ว

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

  • @luizpaulo6169
    @luizpaulo6169 3 ปีที่แล้ว +12

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

    • @_johndoew
      @_johndoew 3 ปีที่แล้ว

      curti o canal dele tmb

    • @مطبخناستيا
      @مطبخناستيا 2 ปีที่แล้ว

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

  • @pickemparty
    @pickemparty 3 ปีที่แล้ว +11

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

  • @areejturkei5482
    @areejturkei5482 3 ปีที่แล้ว +4

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

  • @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

  • @Jdg70
    @Jdg70 2 ปีที่แล้ว

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

  • @codingmafia1642
    @codingmafia1642 3 ปีที่แล้ว +1

    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

  • @abdallaha.raheem3078
    @abdallaha.raheem3078 3 ปีที่แล้ว +1

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

  • @sanketbhangale5788
    @sanketbhangale5788 3 ปีที่แล้ว +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?

  • @vladfedos5554
    @vladfedos5554 ปีที่แล้ว

    Thank you Bro. It's perfect.

  • @yogeshaggarwal5045
    @yogeshaggarwal5045 7 หลายเดือนก่อน +1

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

  • @mohammedsharikh9405
    @mohammedsharikh9405 3 ปีที่แล้ว +3

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

  • @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

  • @temangoding
    @temangoding 3 ปีที่แล้ว

    this is what im looking for, thanks sensei

  • @nareshsharma206
    @nareshsharma206 3 ปีที่แล้ว +2

    Sir please answer this question from where you learn android development

  • @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

  • @yusamertcakr8419
    @yusamertcakr8419 2 ปีที่แล้ว

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

  • @CarlosMonteirotube
    @CarlosMonteirotube 5 หลายเดือนก่อน

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

  • @HelPfeffer
    @HelPfeffer 3 ปีที่แล้ว +1

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

  • @sulthan0022
    @sulthan0022 3 ปีที่แล้ว +1

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

  • @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

  • @stephanrobert5593
    @stephanrobert5593 ปีที่แล้ว +1

    You forgot a few steps. what on earth and where did the bindings come from. My AutoCompleteTextView id does not popup when i type binding. Please dont do stuff off camera and expect people to know what you did

  • @NHikmetK
    @NHikmetK 2 ปีที่แล้ว

    İ 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 ?

  • @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?

  • @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!?

  • @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

  • @nomanzafarzafar7912
    @nomanzafarzafar7912 3 ปีที่แล้ว

    Great effort bro. Keep it up.

  • @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.

  • @anurajms
    @anurajms 3 ปีที่แล้ว +1

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

  • @PiyushSharma-gw1wx
    @PiyushSharma-gw1wx 2 ปีที่แล้ว

    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.

  • @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

  • @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 ? 😍

  • @alexong123
    @alexong123 2 ปีที่แล้ว

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

  • @makhalibagas
    @makhalibagas 3 ปีที่แล้ว

    Thanks for this tutorial sir

  • @techpark9486
    @techpark9486 2 ปีที่แล้ว

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

  • @sjjayaswal7621
    @sjjayaswal7621 2 ปีที่แล้ว

    Good information 👍

  • @elsisdeo9060
    @elsisdeo9060 3 ปีที่แล้ว

    Good, I need this, thanks btw

  • @hendri2018
    @hendri2018 2 ปีที่แล้ว

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

  • @jaloliddinabdullaev2310
    @jaloliddinabdullaev2310 3 ปีที่แล้ว

    thank you bro, nice video

  • @adamrampazzo1739
    @adamrampazzo1739 ปีที่แล้ว

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

  • @bigotes20random86
    @bigotes20random86 3 ปีที่แล้ว +1

    Long life to you!! :)

  • @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

  • @ZivShaltiel
    @ZivShaltiel 11 หลายเดือนก่อน

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

  • @hansheng654
    @hansheng654 2 ปีที่แล้ว

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

  • @wilsonahanmisi1187
    @wilsonahanmisi1187 3 ปีที่แล้ว

    Life Saver..... Keep it up

  • @alexanderfuentespe
    @alexanderfuentespe 3 ปีที่แล้ว +1

    How can I get the selected item from the autocompletetextview

  • @aarondraws7699
    @aarondraws7699 2 ปีที่แล้ว

    how do I do this without a fragment

  • @ninabraelyn1857
    @ninabraelyn1857 2 ปีที่แล้ว

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

  • @_ytuser11
    @_ytuser11 2 ปีที่แล้ว

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

  • @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

  • @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.

  • @dankim4652
    @dankim4652 2 ปีที่แล้ว

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

  • @anshikachoudhary9130
    @anshikachoudhary9130 ปีที่แล้ว

    I am getting an error " Error inflating class com.google.android.material.textfield.TextInputLayout". How to fix it?

  • @adithyaraj307
    @adithyaraj307 2 ปีที่แล้ว

    Steve bro, apart from AutoCompleteTextView can we use any other text view for same purpose it is possible.....🤔

    • @StevdzaSan
      @StevdzaSan  2 ปีที่แล้ว

      Well Compose offers a lot of flexibility. I'm no longer using XML 😉

  • @احمدالسكافي
    @احمدالسكافي 2 ปีที่แล้ว +1

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

  • @BharadwajGiridhar
    @BharadwajGiridhar 3 ปีที่แล้ว

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

  • @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

  • @runknown7366
    @runknown7366 ปีที่แล้ว +1

    nice video - Getting the value of the selection would help. I used this code snippet. Im assuming this could be improved. binding.autoCompleteTextView.onItemClickListener = AdapterView.OnItemClickListener { parent, view, position, id ->
    val item = parent.getItemAtPosition(position)
    Toast.makeText(this, item.toString(), Toast.LENGTH_LONG).show()
    }

  • @gunturdarmawan1513
    @gunturdarmawan1513 2 ปีที่แล้ว +1

    why in my code FragmentFirstBinding still error, help me somebody plz

  • @陳章民
    @陳章民 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 2 ปีที่แล้ว

      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

  • @ericuche755
    @ericuche755 3 ปีที่แล้ว

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

  • @muhammadizzahramadhan3000
    @muhammadizzahramadhan3000 3 ปีที่แล้ว

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

  • @Another0neTime
    @Another0neTime 3 ปีที่แล้ว

    Great video!

  • @ErtBaran
    @ErtBaran 3 ปีที่แล้ว

    Thanks so much. 💯

  • @jesmarsuan5516
    @jesmarsuan5516 3 ปีที่แล้ว

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

  • @kurtl.3773
    @kurtl.3773 2 ปีที่แล้ว

    how did you create firstfragment class?

  • @okisulton
    @okisulton 3 ปีที่แล้ว +1

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

  • @azwarinaazman
    @azwarinaazman ปีที่แล้ว

    Is this coding available in Java Language?

  • @useptampan123
    @useptampan123 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

  • @sujitprasadkushwaha9031
    @sujitprasadkushwaha9031 3 ปีที่แล้ว

    you are the best. 🥰🥰❤️

  • @Arun_rajak2786
    @Arun_rajak2786 3 ปีที่แล้ว

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

  • @axw-ei3fn
    @axw-ei3fn 2 ปีที่แล้ว

    Very useful.

  • @HelPfeffer
    @HelPfeffer 3 ปีที่แล้ว

    Thank you

  • @AndreaBonatti
    @AndreaBonatti 3 ปีที่แล้ว +1

    Spinner is better! With the drop down menu there are no method to set selected item, get selected item, get selected item position, no method to create dependant menu.
    The drop down menu is good only for the most basic usage.

  • @mehakmemon5605
    @mehakmemon5605 ปีที่แล้ว

    Pls anyone tell which which classses are imported in firstfragment

  • @DiegoTube85
    @DiegoTube85 3 ปีที่แล้ว

    which app theme are you using?

  • @InvincibleXXX
    @InvincibleXXX 3 ปีที่แล้ว

    Thank you very much

    • @StevdzaSan
      @StevdzaSan  3 ปีที่แล้ว +1

      Always glad to help 👊

  • @harunarrashid3048
    @harunarrashid3048 3 ปีที่แล้ว

    Thankyou sir :D

  • @adidebnag6086
    @adidebnag6086 8 หลายเดือนก่อน

    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 :)

  • @alexanderchurkin3531
    @alexanderchurkin3531 2 ปีที่แล้ว

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

    • @smoybelizaire4100
      @smoybelizaire4100 2 ปีที่แล้ว

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

  • @theblurdev2828
    @theblurdev2828 2 ปีที่แล้ว

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

  • @markronderoragasa6493
    @markronderoragasa6493 2 ปีที่แล้ว

    Is there a way to make it searchable?

  • @NishantKumar-cr6fb
    @NishantKumar-cr6fb 3 ปีที่แล้ว

    Definetly looks good than spinner , helpful video

  • @UbedThaheem
    @UbedThaheem 2 ปีที่แล้ว

    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

  • @magoelias3846
    @magoelias3846 3 ปีที่แล้ว +1

    Can you make this tutorial using java?

  • @rr2r2r2ra
    @rr2r2r2ra 2 ปีที่แล้ว

    how do we put the item selected into toast?

  • @matthewburdett2364
    @matthewburdett2364 3 ปีที่แล้ว

    What ram and cpu do you have? My computer can't run emulator very well

    • @StevdzaSan
      @StevdzaSan  3 ปีที่แล้ว

      16GB RAM, 8700k Intel.

    • @matthewburdett2364
      @matthewburdett2364 3 ปีที่แล้ว

      @@StevdzaSan Thanks, great video. Spinner is very poor, I had problems making it same height as Edit Text. your method great,

  • @clo4k661
    @clo4k661 3 ปีที่แล้ว

    How many years it takes you to reach this level?

  • @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

  • @fars7346
    @fars7346 3 ปีที่แล้ว

    perfect timing...

  • @wisnuaji6426
    @wisnuaji6426 3 ปีที่แล้ว

    i want to make 2 drop down menu, and first dropdown affect second dropdown, how to create that?
    like : hot drink -> cappucino
    iced drink -> ice cappucino
    if i choose hot drink of course ice cappucino is not present on the list