Expandable Floating Action Button - Android Studio Tutorial

Поділитися
Вставка
  • Опубліковано 10 вер 2024

КОМЕНТАРІ • 94

  • @liomazza1313
    @liomazza1313 3 роки тому +15

    Thanks for the tutorial! Maybe I can collaborate with two tips:
    1 - Setting the view as GONE will solve the problem of clickable in INVISIBLE state.
    2- If you use the variable "clicked" as a global kind, you wont need to pass it as parameter in the functions.
    Thanks again!

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

      GONE is the right way to do it. Invisible will block clicks on the underlaying fragment/activity and is a bad hack overall.

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

      This should be pinned since it is a better approach than what is done in the video. Thank you.

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

      yes but no, setting the visibility to GONE and the animation wont work since the INVISIBLE state let the view stay at that position but the GONE state will move the view back to where it was restricted. But a workaround for this is to set visibility to GONE after finishing the animation using Handler or etc (I think the android team should support this in the future)

  • @joacortez3423
    @joacortez3423 4 роки тому +5

    There are very few android studio with kotlin tutorials but after discovering you I don't think I need more

  • @AnilKumar-hf2po
    @AnilKumar-hf2po 2 роки тому

    Thank you, Stevdza San. I love this channel. It has taught me a lot of new things.
    I found one issue with Floating action button invisibility and I resolved that issue with FloatingActionButton hide() and show().

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

    How to decrease the opacity of background (including the action bar) when fab expands? I've tried multiple measures but can't find a way to apply the required effect to action bar.

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

    Really appreciate but How to close or collapse the fab button NOT ONLY when we click on the fab button again BUT ALSO when we click outside of the fab (elsewhere in the background) ? Help me please ! 🙏 I'm a beginner and I've been looking for this for a really long time....

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

    Do you have the same tutorial as this but in java

  • @4ytonly
    @4ytonly 4 роки тому +2

    If you use visibility GONE instead of INVISIBLE, you shouldn't have problems with registering clicks on empty space. And great video btw :)

    • @StevdzaSan
      @StevdzaSan  4 роки тому +1

      But then animation would not work

    • @4ytonly
      @4ytonly 4 роки тому

      @@StevdzaSan Aha, ok :)

    • @4ytonly
      @4ytonly 4 роки тому +1

      @@StevdzaSan How about for the second part of the video putting all the code into library and reusing it in different project?

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

    A lot of your videos helped me so much! Thank you, I hope you make more videos about UI/UX

  • @vitorsantos-sedesigner7549
    @vitorsantos-sedesigner7549 4 роки тому +1

    Wooow, finally, the best of web!! Awesome

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

    Thank you, Stevdza San. I love this channel. It has taught me a lot of things.

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

      I'm happy to hear that buddy! :)

  • @Ayor88
    @Ayor88 6 місяців тому

    can you do this with jetpack compose ? can't find any video as clear as this one on expandable FAB with jetpack compose

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

    Hello Sir, what must i change to be able to use the logic code in java?

  • @HimanshuSharma-cs4pe
    @HimanshuSharma-cs4pe 4 роки тому +1

    it is very much helpful . Thank you for the videos.

  • @Manishkumar-wt9tf
    @Manishkumar-wt9tf Рік тому

    I want to add text in floating action button.. How can i do that

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

    Hi thanks fo the tutorial, was really helpful but i have a problem. My buttons keep visible after i trigger the add button, why could it be??

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

    Hi. Is there a way to do this with Jetpack Compose? I didn't find any resource for that

  • @ManuelGonzalez-sw1bv
    @ManuelGonzalez-sw1bv 3 роки тому +2

    Hi how are things! I saw your video and I really liked it, will you have another one explaining the procedure in JAVA? Thank you

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

    This is very helpful! Thank you so much!

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

    essa parte do private val no da certo no java.......como que eu coloco ....

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

    Bro please paste github link so that we can copy and reuse your code

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

    Thanks for the lesson. Would be nice if you shared link to repo too. But thanks a lot!

  • @Mahmudulhasan-ts5hm
    @Mahmudulhasan-ts5hm Рік тому

    thank you very much

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

    What is val in "private val rotateOpen"? Is it a java Class?

  • @cyberandroidgames6101
    @cyberandroidgames6101 4 роки тому

    amazing, firebase cloud functions a video about this was excellent

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

    I have a question. how will you add this in a navigation component?

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

    VeryGood Thanks

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

    Thanks a lot brother for this!

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

    is there a java version or the MainActivity? i am using java

  • @hdkloh6857
    @hdkloh6857 4 роки тому

    Add more videos man... You are too awesome....

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

    Gracias, saludos desde Colombia

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

    Rally good video!

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

    Very good but animation doesn't work the second time. Can you help me ?

  • @ashishgautam2842
    @ashishgautam2842 4 роки тому +1

    very helpful 👍👍

  • @alvaroruiz259
    @alvaroruiz259 4 роки тому

    Very good! but someone who helps me the logic in java, thanks you!

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

    Great tutorial

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

    Bro! Can u show how can i autoclose this FAB when i press on one of this button or screen pls!
    I think need some write on setAnimation(), but i'll try all xD

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

    I have the problem when i try to write "add_btn.SetOnClickListener... etc. Android Studio doesn't see any of floating buttons. I tried with new project with normal button and it is still the same problem. Someone knows how to solve the problem?

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

      Kotlinx.synthetic is deprecated. I made video about that, check on my channel.

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

      @@StevdzaSan Thanks a lot! That's my begining with Android Studio and I spend a lot of time to find solutions. Your channel is the most helpful on YT!

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

      I have a question. I tried to implement this buttons in my new project. But when I did everything the same like from tutorial app is crashing. stackoverflow.com/questions/65755070/aplication-crashing-with-floating-button-and-navigation-drawer-kotlin
      Could you make a look on it?

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

      @@StevdzaSan I've tried Kotlinx Synthetic migrate to View Binding in your video but it didn't worked, add_btn.set..... still not showed up in android studio. I'm using Android Studio Dolphin | 2021.3.1 Canary 7. Glad if you can help me. Thank you.

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

    Thanks!!!

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

    getting error while type val after private ! Any solution to please!!

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

      if we are talking about this (private val clicked = false) then it will be correct (private var clicked = false) then there will be no error clicked =! clicked

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

    The buttons are still there. That means you can't scroll when you accidentally click on the invisible buttons...

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

    Hi, great tutorial, but could you tell me how to make the buttons not so far apart? There is a large gap between the first button and the pen button. Thank you!

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

      All you have to do is reducing the constraint space. You can either type the XML code or use the properties panel on the right. I hope it helps!

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

    when I use the code private val and animation by lazy it doesnt recognize val and lazy
    how can I fix this?

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

      Same error 😭😭

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

      @Carolina Pistillo if you have the solution please text

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

      If you get the answer please text I have to submit this by tomorrow

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

      @@stanleyjohnson8781 Yes I have it. Try this:
      rotateOpen = AnimationUtils.loadAnimation(this, R.anim.rotate_open_anim);

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

      @@carolinapistillo4147 how to use this? I mean we have to use this after private val or just this line?

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

    voce poderia fazer em java ...por favor........um video sobre esse assunto....eu gostei muito....gostaria de fazer esse detalhe no meu aplicativo......

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

    Thx!

  • @CubeEdgeRecap
    @CubeEdgeRecap 4 роки тому

    Instead of clickable false. why not set visibility to gone?
    And what if any clickable view stack below that fab which are invisible and not clickable?
    By the way you are awesome. Just perfect

    • @StevdzaSan
      @StevdzaSan  4 роки тому

      Setting visibility to gone will disable the animation

    • @CubeEdgeRecap
      @CubeEdgeRecap 4 роки тому

      @@StevdzaSan oh I did not notice that. Thanks for quick reply. ❤️

  • @clxwnxD-vy7sf
    @clxwnxD-vy7sf 4 роки тому

    How could I implement this in java sir? is it the same way as what you did in kotlin?

    • @danielleguizamon9891
      @danielleguizamon9891 4 роки тому

      It is basically the same but in Java, it would not have any problem

    • @clxwnxD-vy7sf
      @clxwnxD-vy7sf 4 роки тому +1

      @@danielleguizamon9891 Thanks bro!

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

    Спасибо большое !!! )

  • @hachij_
    @hachij_ 4 роки тому

    any common library for this kind of functionality out there?

    • @danielleguizamon9891
      @danielleguizamon9891 4 роки тому

      A library is not necessary for this, you could use the code in an extension function and use it where it should, it is a recommendation

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

    in java, please!!

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

    Isso é Kotlin ou Java no MainActivity?

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

      Uma dica: é só olhar a extensão do lado do nome da classe (MainActivity no caso). Quando for .kt é kotlin, se não, será .java

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

    Добротно

  • @leonidas_30052
    @leonidas_30052 6 місяців тому

    In Jetpack Compose, please

  • @farhad9579
    @farhad9579 4 роки тому +1

    VIDEOS Speed is fast as hell wtf

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

    Can you use motion layout instead??

  • @yuviplays6579
    @yuviplays6579 4 роки тому

    Please create video on firebase authentication with OTP

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

    Sou do Brasil

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

    Впервые в жизни, пришлось ставить скорость 0.75х. Обычно ставлю 1.5х или 2х. Но тут пришлось замедлить 😆😆😆

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

    im stuck at 1:25

  • @h.r.60
    @h.r.60 4 роки тому

    😃

  • @rahulthambi7689
    @rahulthambi7689 2 місяці тому

    hl

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

    nice russian accent