Android Kotlin: ListView Custom XML Views for Rows (Ep 2)

Поділитися
Вставка
  • Опубліковано 25 лип 2024
  • Knowing how to use the XML Editor for rendering out rows in your lists is very useful for Android Development. Today we look at how to utilize this tool, along with LayoutInflater to get our custom rows. We also utilize the position variable to determine what type of element goes into each row. Enjoy.
    ListView Intro Episode 1: • Android Kotlin: Essent...
    Instagram Firebase Course
    www.letsbuildthatapp.com/cour...
    Facebook Group
    / 1240636442694543
    iOS Basic Training Course
    www.letsbuildthatapp.com/basi...
    Completed Source Code
    www.letsbuildthatapp.com/cour...
    Follow me on Twitter: / buildthatapp

КОМЕНТАРІ • 90

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

    I learned more in this video and the previous one than I have in 5 weeks of class. thank you

  • @davidenale17
    @davidenale17 6 років тому +13

    Keep this Kotlin series up! Your way of explaining things is great!

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

    I can only imagine that you know how much good you are doing in the world by sharing this. Many many thanks from me.

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

    Even after 4 years this is the best video on this topic!

  • @AlexGLuque
    @AlexGLuque 6 років тому

    Thank you for these video series Brian. Your videos about Android dev really helped me clarify the vision about how Layouts really do work. Keep rockin on!

  • @ianschoenrock2285
    @ianschoenrock2285 6 років тому

    I have been developing android apps for about 2 years now and never fully understood listView (Sad I know). These videos have cleared averything up and filled in the spots that I was missing or didn't understand. Everything is so well organized and well explained, you definitely earned this sub. Thanks again and look forward to exploring your channel further.

  • @siewtany1174
    @siewtany1174 6 років тому

    Nice teaching. Great to see there is a progression on Android tutorials from you. Keep it up. It will be good to see you doing Android with Firebase in the future. I will definitely purchase it!

  • @TitiloTeam
    @TitiloTeam 5 років тому

    Man, your videos are awesome! You're very clear explaining. An excellent teacher! Keep it going! Thanks a lot!

  • @alistairholmes3825
    @alistairholmes3825 6 років тому

    I appreciate the effort you're putting into these videos. I'm used to making adapters for a ListView using java. So it's nice to see how to use Kotlin to carry out the same process, and to be honest, it does seem easier.

  • @craigmunday3707
    @craigmunday3707 6 років тому

    Very clear lesson. Thanks for these videos, they are really happy to get started with Android development.

  • @johnvasquez9239
    @johnvasquez9239 5 років тому +1

    Great video! Also, at 8:58 you mention the views move when you change the id. Just in case no one told you, it's because there's a constraint below that's referencing the id (that you just changed). Since it can't find that id, the view jumps around. Just update the constraint with the updated id, and you're all set. Thanks again!

  • @paulisaris
    @paulisaris 6 років тому

    Congrats, awsome tutorial: very good pace and explanatory skills!

  • @ryantemple3502
    @ryantemple3502 6 років тому

    These are awesome I'm loving them keep it up!

  • @joaquin_cloudarch
    @joaquin_cloudarch 6 років тому +1

    Very nice!! It's awesome the way you explain it! Really helpful. Just one thing: in kotlin you don't have to find objects view by id like in Java. Just use the same id name given in the xml file.
    For example:
    rowMain.position_textview.text = "Some Text"
    Thank you for all, master!

  • @UmbertoDOvidio
    @UmbertoDOvidio 6 років тому +7

    It's so weird watching Brian setting up the UI with some UI tools :D

  • @lisapham5629
    @lisapham5629 6 років тому

    Thank so much for being the best teacher!!

  • @nan-syphotographsmemories2051

    a tutorial that you never get bored.

  • @TheYannsonnboys
    @TheYannsonnboys 6 років тому +2

    Yes you are back :-) :-)

  • @JohanAlbrectsen
    @JohanAlbrectsen 6 років тому

    More kotlin, plz. Just like your swift tutorials are these the best out there.

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

    Great content. I learned a lot from you. Thanks

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

    Dude!!You're awesome
    You make it look so easy
    Thanks a lot :D

  • @reydez84
    @reydez84 6 років тому

    hopefully you do more of these videos =), thx a lot !!

  • @PappenbergerApps
    @PappenbergerApps 6 років тому

    High quality Tutorial. Thanks! 😊

  • @franciscososa91
    @franciscososa91 6 років тому

    Great videos man! Thnks for your clear pronunciation.

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

    You are wonderful. Keep up the good work. 2017 and you explained everything futuristic-ally

  • @cidaodotaboao
    @cidaodotaboao 6 років тому +2

    Congratulations! I've been looking for something like that and It's hard to find. We (noobs) need practice lessons of each component, after put all in one APP, but the lessons I found is very complicated and in the end, I don't know where modify the code to meet my need. Tks a lot

  • @jordan9506
    @jordan9506 5 років тому

    I liked the part with the string interpolation. Pretty cool stuff

  • @lizgoldston69
    @lizgoldston69 6 років тому

    Great video, thanks for sharing Brian :-)

  • @dk-sky3820
    @dk-sky3820 5 років тому

    Hi Brian.
    Thanks for tutorial.
    Just one tip - if you change ID of the view in the top right corner in "Design" mode of xml file or you hit right click and "Refactor" on the id field of your view and change it that way, AS will perform changes automatically and you won't have to redraw your constraints again.

  • @samklo992
    @samklo992 6 років тому

    thanks Brian for this video i really learn a lot of thing about listView

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

    Desde Peru!, excelente tutorial! me ha servido de mucho, gracias!

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

    Terrific video, Thank you very much

  • @krutomjer
    @krutomjer 6 років тому

    Nice video Brian, thanks :)

  • @harryc2151
    @harryc2151 6 років тому +3

    Cool stuffs.

  • @sylhos
    @sylhos 6 років тому

    Awesome! I still would like to know how you created the bottom row that slides horizontally. Is there a video describing it?

  • @CiDER_sh
    @CiDER_sh 6 років тому

    Thank you!!!! It's useful to me

  • @SaurabhSingh-ex6vl
    @SaurabhSingh-ex6vl 6 років тому

    Awsome explanation

  • @PappenbergerApps
    @PappenbergerApps 6 років тому

    Great Video 👍👏👏

  • @raj-kal
    @raj-kal 6 років тому

    thank for awesome video :)

  • @skatemachineify
    @skatemachineify 6 років тому

    good video!!Your explanation is very good.
    I have a question: How can i start a event after select a item of the ListView? I want to pass my item selected to a label out of the listview i tried to use OnItemClickListener but i couldnt access the list in order to get the information of the item, from this function.

  • @magic0x0
    @magic0x0 6 років тому

    Good Job thanks for the great tutorial ❤️
    Please can you make a tutorial about Recycler View?

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

    You should make an audio book. Your voice is soothing.

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

    I wonder if there is a way to filter/search the items in the list view. Great video btw.

  • @alexo6960
    @alexo6960 6 років тому

    you are always my savior

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

    Hey man nice tuto can u make a suite with a parse of JSON file to the list view ?
    Really great work I subscibre rigth now

  • @svqventures
    @svqventures 6 років тому

    Brian, great to have you delving into Android development too (a beginner in this platform here.) Just a bit adjustment on the production area if any: If you watch these Android dev videos via iPhone (on the go in my case) Font is too small and can barely see the code. Maybe that "Dracula theme " which I love too has something to do , idk but you get it

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому

      Yeah, still getting used to all of the Android Studio UI while recording. I've been making small changes each video as I understand more and more where I want to take the viewers of these videos.

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

    Thank You Sir..............f or this listview.❤❤❤❤❤❤❤❤❤❤

  • @Theasstasticvillain
    @Theasstasticvillain 6 років тому

    Is this the last episode of this series? I can't find Ep3

  • @sawkhinmaungthoo5063
    @sawkhinmaungthoo5063 6 років тому

    nice !

  • @ROBOTKAMPUS
    @ROBOTKAMPUS 6 років тому

    good jobs

  • @trindadealex2
    @trindadealex2 6 років тому

    Nice! Do you have any plan to teach Realm?

  • @11m0
    @11m0 6 років тому +10

    Can I ask, how do you manage to upload videos so consistently with having a full time job?

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому +18

      I teach online fulltime, youtube is a big part of it.

  • @Rinzir
    @Rinzir 6 років тому

    There a way to do this with multiple tabs ?

  • @coding_ss632
    @coding_ss632 6 років тому

    Why LayoutInflater only cuts and paste the two TextViews from row_main.xml file and not the whole file. Because then the size of each row in the list view in the main activity is much larger. Please explain this :(

  • @akramyounes4298
    @akramyounes4298 6 років тому

    thanks Brian
    .for changing id for a view it is better to do that in right-properties panel, not in xml , and a message appear to fix the layout .

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому +1

      Yeah, I'm a lot more used to editing the xml files directly.

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

    Where can I find ep 3?

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

    How can we pass this data to new activity using onclicklistner

  • @Sgt_Hest
    @Sgt_Hest 5 років тому

    How would you start a new activity when clicking an item in the list

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

    I just wish you added some sort of on click event, but otherwise good job

  • @tommychan6493
    @tommychan6493 5 років тому

    hello do you have a video teach
    how to put the image on the listview?

    • @LetsBuildThatApp
      @LetsBuildThatApp  5 років тому +1

      Yeah just search the channel for android tutorials and you’ll find it.

    • @tommychan6493
      @tommychan6493 5 років тому

      @@LetsBuildThatApp thanks

  • @vaishnav4750
    @vaishnav4750 6 років тому

    How did you put that grey background color to alternative list items???

  • @ronitmankad1920
    @ronitmankad1920 6 років тому +10

    Please do the Firebase Chat app for Android I'm sure many of us want that

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому +9

      I'm thinking of putting out a course on my website for this.

  • @smarttravel8839
    @smarttravel8839 6 років тому

    Can you show us on Kotlin parsing Json (like in swift,use URLSession. for Kotlin which Api is used for Parsing json?) Hope you can show us an example using Kotlin to parse Json and show data in ListView with inflater. Thanks.

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому

      There's already a video on building out the UA-cam app with Kotlin that performs JSON parsing using GSON and OKHttp client.

    • @smarttravel8839
      @smarttravel8839 6 років тому

      new to Kotlin and confused by which library to use for JSon as there are retrofit2,rxjava,rxandroid andOkHttp! In Swift, use URLSession as 3rdparty may break when there r changes. So, which library to use for kotlin to parse json? hope your video will provide useful guideline. Thanks

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому

      I recommend checking out my JSON parsing kotlin video here: ua-cam.com/video/53BsyxwSBJk/v-deo.html

  • @aaqibjavaid3472
    @aaqibjavaid3472 6 років тому

    Can you do quick video on AdvanceWebview ? Please I converted my website to an app but I cant download any file like video and music. Please help me how to do that. Thnak you so much

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому

      That's great, how would you like the solution presented?

    • @aaqibjavaid3472
      @aaqibjavaid3472 6 років тому

      I am using this > github.com/delight-im/Android-AdvancedWebView
      problem is when I click on download button on my website it doesn't do anything

  • @pathakvivek7865
    @pathakvivek7865 6 років тому

    I am having error on "listView.adapter = MyCustomAdapter(this)"
    how to solve..??

    • @krutomjer
      @krutomjer 6 років тому

      What is the error in stacktrace ?

    • @pathakvivek7865
      @pathakvivek7865 6 років тому

      error in adapter
      but its solved.
      i just put this code"val listView = findViewByid(R.id.list_view) as ListView"

  • @SergiySev
    @SergiySev 6 років тому

    Thank you, but using " val layoutInflater = LayoutInflater.from(mContext)" in the getView function is very bad idea for performance, should be in the init { }

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому

      Yes the next video explains how to use the view holder pattern, it should be in the playlist.

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

    (context: this)
    &
    ( colorString:...)
    Showing error 🤔

  • @08mcgregory
    @08mcgregory 5 років тому

    gg

  • @jackh3824
    @jackh3824 6 років тому

    Is there a reason you're using "findViewById" ? If you set the id you can call the item by the id. Maybe this video is outdated.

    • @LetsBuildThatApp
      @LetsBuildThatApp  6 років тому +1

      This was shot in Android Studio Beta, I wasn't able to use synthetic views at the time for some reason. The new series for Kotlin UA-cam is much cleaner. Go ahead and give that a watch.

    • @jackh3824
      @jackh3824 6 років тому

      Oh.. I didn't know you had a new series. Thank you.