How to Create a Bottom Sheet With Jetpack Compose - Android Studio Tutorial

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

КОМЕНТАРІ • 56

  • @immortal_lnight
    @immortal_lnight 2 роки тому +6

    This is exactly what I was missing in the compose! Now I can create all my applications with it.

  • @jellybeast4408
    @jellybeast4408 2 роки тому +2

    i am always hyped when you publish a new video, thank you very much for the free content 💙💙💙💙

  • @jaygitonga2026
    @jaygitonga2026 Рік тому +6

    For those probably working with material 3 api , rememberBottomSheetState() was replaced wuth rememberStandardBottomSheetState() . To set the initialValue field , use SheetState.Hidden.
    I hope this helps!

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

      Can you go from bottom sheet to full screen?

    • @713nandinigupta7
      @713nandinigupta7 10 місяців тому

      Can you elaborate liittle more

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

      @@713nandinigupta7 That would be:
      val sheetState = rememberStandardBottomSheetState(
      initialValue = SheetValue.Hidden
      )

  • @mikec4220
    @mikec4220 2 роки тому +15

    What about ModalBottomSheetLayout Philipp? I find that a bit better as it darkens the rest of the screen on it's own and also we only need to keep track on for sheetState (no scaffoldState needed). Great video by the way :)

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

    That's exactly what i need for the project i'm currently working on

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

    Yes yes yes!!!! Thank you so much for this Philipp!

  • @amiakari7700
    @amiakari7700 7 місяців тому

    Philipp, thank you so much! It was really helpful!

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

    How to add an overlay or shadow to the rest of the screen when the sheet is open

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

    hello philip I'm from Brazil... and I really like your videos on jetpack composition. Congratulations. One question: with jetpack compose I don't need OOP (object oriented) anymore?

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

      You still need OOP because Android Framework relies on Inheritance principles for example interfaces, super classes etc.

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

    Thanks for doing these videos man.

  • @martinrasmussen8526
    @martinrasmussen8526 2 роки тому +2

    Great video, thanks Philipp!
    How would you show this from a child composable?
    So if I have my app positioned in a scaffold with a bottom bar. How can I use the bottom sheet from within that scaffold content, and to be on top of the bottom bar?

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

    Is it possible to have a dynamic views that recomposes itself in the bottomsheet contents?

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

    I like the motion graphics in your videos. Do you do them yourself?

  • @pradeepkumarreddykondreddy7048

    How to open the Jetpack compose bottomsheet from my existing android activity ?

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

    Too bad we don't yet have android BottomSheetScaffold on Material 3.

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

    I cant able to make fullscreen or based on pecertage of screen to occupy using scaffold ,kindly clarify on it

  • @VIjayaKumar-dg1rx
    @VIjayaKumar-dg1rx 6 місяців тому

    Hi All,
    I am facing problem while implementing BottomSheetScafold. The width of BottomSheet content is not working in bigger displays like tablets etc. The width of bottom sheet is not occupying fillMaxWidth of the screen, instead it's filling max width to 640dp.
    Please help me in resolving above issue.

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

    Hello, pls can you do a video for implementing collapsing app bar with tablayout and bottomsheet in the same screen?

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

    great explaining!

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

    Did you ever manage to trigger showing the bottomSheet programmatically? I don't want to trigger it by a UI event

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

    One big drawback with jetpack compose bottom sheets seem to be that the scrim color does not apply to the status bar, the alert dialogues apparently do this out of the box but not with bottom sheets

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

    Good video
    I have a query
    How I can populate data to bottomsheet on an item click of LazyColumn
    Please help I tried in many ways but dint got success

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

    I usually use ModalBottomSheetLayout and the way implementation almost same like BottomSheetScaffold, just have different layout. ModalBottomSheetLayout is top rounded, default not peek and have an indication line at top.
    Maybe could you tell me what's the real different (when to use) ?
    Is BottomSheetScaffold can make its background content become black opacity when it is expand too?
    (overlay or shadow to the rest of the screen when the sheet is open)
    Anyway thanks for the tips

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

      it's in the name. the modal bottom sheet is modal

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

    how i add dependancy , plugins , classpaths in android project , after new gradle update plz make video

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

    hey can we half the bottom sheet width in jetpack compose please reply

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

    Please do a video about jetpack compose and graphql.

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

    Gr8 like always

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

    What a coincidence,
    I just searched in afternoon

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

    Thanks

  • @kingmarwat
    @kingmarwat Рік тому +1

    There is no bottom sheet in latest versions. My bom version is 2023.04.01

  • @John-qt6qk
    @John-qt6qk 2 роки тому

    Awesome thanks

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

    Hey Philipp, could you make a guide on how to use Koin with jetpack compose navigation + savedstatehandle (small master-detail app) and get arguments on 2nd screen (details) from viewmodel? That thing is driving me crazy I can't find a workaround, the argument is always null but it injects properly, and it seems to happen to other people as well

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

      if you use hiltviewmodel, you can catch the bundle savedstatehandle in VM by adding SavedStateHandle in @Inject constructor() then to catch the value just savedStateHandle["key"].
      anyway this is my simple implementation, may have wrong datatype.
      And Phillip already made the video about that.
      ua-cam.com/video/4gUeyNkGE3g/v-deo.html

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

    Dr. Phil! A couple friends of mine want you to make apps for them. Can they email you?

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

    I do not like scafold, it couses leaks when you use accessibility, I don't know if google already fixed it. So for me it's still a shit not a sheet,

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

    oh sheet

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

    No kotlin

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

    First

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

    I want to migrate to compose granularly and create bottomsheet with ComposeView inside xml. But its expanding animation triggered inside composable is laggy because of ComposeView wrap_content in ConstraintLayout. Any ideas how to make it smooth?

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

      why don't you set the width and height to match_parent for composeview

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

      @@TomBerghuis because I need to know the top coordinate of bottomsheet to position other views in xml above it. Width matches parent already

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

      if you can calculate the height of the bottom sheet you can position the other views programatically

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

      @@TomBerghuis sure, but passing composable height back to views will be pretty cumbersome, I hoped I can omit this and invent something simpler and more elegant 🙂

    • @user-sb5ud7ek9c
      @user-sb5ud7ek9c Рік тому

      @@bringoff ParentDataModifier might solve your use-case ua-cam.com/video/xcfEQO0k_gU/v-deo.html

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

    Do you go to gym?