Skip to main content

RecyclerView on Android

Recently I gave a 10 minute lightning talk at the Android Alliance meetup about RecyclerViews on Android. The talk was aimed at Android developers at all levels. I decided to talk about this since the recent Android Study Jam for beginners that I helped run did not touch upon this topic and almost all Android developers have to make use of this ViewGroup sooner or later.

Since the Recycler View offers 3 built in-layout managers, I built a sample that showed how to lay out views either using a LinearLayoutManager, GridLayoutManager and a StaggeredGridLayoutManager.


I also talked about how it makes sense to only use a RecyclerView if you have a large dataset of items. If you just want to show a grid of say 5 items, maybe a GridLayout is a much better option.

Code sample is available at RecyclerViewExample.

Slides are available at RecyclerViewSlides.

More information about RecyclerViews is available in the Android documentation.

Comments

Popular posts from this blog

Technical Blogging session at ElaConf 2016

This is probably going to be one of several blog posts related to ElaConf. It's a wonderful conference for empowering women in tech that took place in Philly for the second time recently. One of the breakout sessions at ElaConf was on Technical Blogging which was run by Vaidehi Joshi (@vaidehijoshi). Here are my takeaways from that session.


We started off by reading Julia Evans' blog post on processes. Vaidehi asked us to take a few minutes to read it and discuss with a partner. Here are some things that stood out to us in the blog post:

ConversationalMatter of factFormatted Code snippetsAuthor's personality shows in the code commentsCondensed scope, author links to external content for more researchGood introduction to the topic even for a newbie
We also took some time doing a fun exercise, with one of us pretending to be a student and the other a teacher. The teacher had to describe "opening a Facebook account to someone who has not used a computer before". Thi…

Google I/O 2017 Recap: Things I learned

Google I/O 2017 was a lot of fun and informative. I wish I had Hermione's Time-Turner as there were many talks to attend and many amazing people to meet.
Here are some things I learned at I/O: AI & Machine Learning This year, I/O was all about AI on every Google product. A product mentioned at the Keynote was Google Lens which enables your smartphone to take pictures of an image like a flower and identify it. That's pretty helpful for a hobbyist gardener like me. 
I also happened to drop by their Android Experiments sandbox and play the AI powered Quick Draw with fellow I/O attendees.
Google Assistant  Google's voice assistant is available on many devices now - not just on your Google Home & Pixel phones but on Android TV as well as iPhone. It's also available on more languages and has an Assistant SDK.You can build an app fairly quickly with Actions on Google and there is a challenge at g.co/ActionsChallenge. You could possible win a trip to I/O 2018 if you e…

Moderating my first panel - Ask an Android Developer

Every month at Android Alliance which I help organize, we have a monthly speaker and a few lightning talks. Someone in the Phillydev Slack group's android-philly channel suggested doing a panel for the June meetup.

I have been a panelist before but this time I wanted to try moderating. To prepare for that, I googled how to be a moderator and found Cate Huston's blog on moderating as well as this book - The Eloquent Woman's Guide to Moderating Panels recommended by Cate. The book is a quick read on moderating panels and has several pointers on how to moderate effectively.  

Of course, a panel is only as good as its panelists and moderator. For the panelists, I reached out to Corey, Travis, Nick & Arpit.  

Here are some things I set out to do as a moderator:
Set the toneWhen we start an event at Android Alliance, we go around and ask everyone to say their name, what they do and a fun fact about themselves. This usually makes it an informal atmosphere and lbreaks the ice qu…