Material 3 Search Bar with Jetpack Compose - Easy Tutorial

Поділитися
Вставка
  • Опубліковано 25 лип 2024
  • 🏆 My Online Courses
    stevdza-san.com
    ☕ Buy me a Coffee
    ko-fi.com/stevdza_san
    📝Medium
    / stevdza-san
    💻 Github
    github.com/stevdza-san
    📸 Instagram
    / stevdza_san
    💎 Become a Premium Member
    / @stevdzasan

КОМЕНТАРІ • 53

  • @tonnie7079
    @tonnie7079 Рік тому +5

    Wow, great stuff, I like how the SearchBar Compoent expands and shrinks, super good stuff.

  • @RichardMaidenCG
    @RichardMaidenCG 17 днів тому

    Clear and concise. Thanks a lot! 🤓

  • @muhammadirvan8655
    @muhammadirvan8655 Рік тому +2

    Great tutorial, thanks for sharing Stevdza-san!

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

    Hello, great tutorial.Thanks

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

    Hi, how can I modify the text style of the input user types in search bar?

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

    thank you sir

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

    I'm working on your course todoapp , and I tried to work with this searchBar or DockedSearchBar but I had a problem which is that I get a view with suggestions I tried to disable it but I couldn't , do you know how to do it ?

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

    Thanks for what you do!
    Can you share how you did the auto fill of parameters in 1:08, please?

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

    Amazing tutorial, @stevdza-san. Very objective.

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

    Nice job

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

    Thanks

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

    🤩🤩

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

    Nice, Could you make a tutorial about implementation of admob ads ( banner, interstitial and native ) in jetpack compose cuz its still rare in YT 😊 thanks

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

    Hi, can I ask. How can I use this SearchBar on bottom of screen? my problem is when the searchbar on focus, it goes up out of screen.

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

    good job

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

    Hello! Where can you get the source?

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

    Thanks!

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

    Please make video on Oauth2 Authentication with Webview using Jetpack compose
    How the CallBackUrl retrieved from the api and retrieve access token to make api calls.

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

    what if i use this searchBar above a list of items and I don't want it to hide my list or to show me the searchbar menu with history searches? i want the bar to stay as it is and simply filter my list when I press the search button, how do I prevent it from changing it's presentation once I click on it to type something?

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

    How can I add padding to the Search bar without changing the padding when it expands?

    • @erayagdogan3389
      @erayagdogan3389 Рік тому +2

      My best workaround so far is adding this modifier to Searchbar:
      Modifier
      .padding(if (isActive) 0.dp else 16.dp)
      .animateContentSize()
      edit: This method is not efficient in terms of performance . Use this instead:
      val searchBarPadding by animateDpAsState(targetValue = if (isActive) 0.dp else 16.dp)
      SearchBar(
      modifier = Modifier
      .padding(searchBarPadding)
      .
      .
      .

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

    How to place SearchBar with Title in Scaffold ? Can you provide an example for that ?

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

    How to connect Search Bar ?

  • @ww6670
    @ww6670 Рік тому +2

    Hey, I have a question about the SearchBar function. Did you code your own or can we inherit it from somewhere? If it is your function, where could I get the entire code? Thank you in advance

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

      That's a composable function that comes with the compose material dependency.

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

      @@StevdzaSan Do you mind sharing which dependencies you added for this code?

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

      @@ww6670 material3 compose

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

      @@StevdzaSan SearchBar compose is not available currently

    • @muratcakr1264
      @muratcakr1264 Рік тому +3

      @@vickramodero6971 added after 1.2.0-alpha01

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

    hello, how can I add some spacing vertically and horizontally?

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

    How to save history of search in database in app ??

  • @Sj-yf2jg
    @Sj-yf2jg Рік тому +3

    make a video about search in lazycolumn list, using searchview

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

      It's not that different. You just need to connect the dots. 👌

    • @Sj-yf2jg
      @Sj-yf2jg Рік тому

      ok i will try

    • @Sj-yf2jg
      @Sj-yf2jg Рік тому

      Where is the this video project source code link?

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

      @Sj I didn't include it since it's quite simple.

    • @Sj-yf2jg
      @Sj-yf2jg Рік тому

      @@StevdzaSan ok

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

    Can you please provide a list of your dependecies? I can't seem to find the correct material3 one for SearchBar

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

      Every default compose material 3 project template in Android Studio has it.

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

      @@StevdzaSan mine doesn’t. I am using Flamingo

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

      @@ghrafkly Try using the latest Compose BOM version: developer.android.com/jetpack/compose/bom/bom-mapping

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

      @@StevdzaSan Looked like I had to update my Kotlin in build.gradle to 1.8.10. Still have an error on app load, but the app seems to be usable atm

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

      implementation platform('androidx.compose:compose-bom:2023.05.01') change into to this one

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

    I prefer adding an IconButton instead of a simple Icon with an onclick modifier .

  • @khaderel-truk7790
    @khaderel-truk7790 Рік тому

    first like🎉

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

    Can you make a video how to open a dialog when fcm notification received in app whether app is closed or open. Any one interested in this topic leave a like