Using RecyclerView to display data instead of ScrollView or lInearLayout for a strong app. It replaces the ScrollView used in trackMySleep app.

Overview

RecyclerView - SleepQualityTracker with RecyclerView app

This is the toy app for Lesson 7 of the Android App Development in Kotlin course on Udacity.

SleepQualityTracker with RecyclerView

This app builds on the SleepQualityTracker you developed in Lesson 6. In this lesson you'll learn how to display a list of results in a RecyclerView instead of a static ScrollView. You'll also learn how you can refactor your code to make it more efficient so it will be easier to maintain and test.

Screenshots

Screenshot1 Screenshot2

How to use this repo while taking the course

Each code repository in this class has a chain of commits that looks like this:

listofcommits

These commits show every step you'll take to create the app. Each commit contains instructions for completing the that step.

Each commit also has a branch associated with it of the same name as the commit message, as seen below:

branches Access all branches from this tab.

listofbranches

branchesdropdown

The branches are also accessible from the drop-down in the "Code" tab.

Working with the Course Code

Here are the basic steps for working with and completing exercises in the repo.

The basic steps are:

  1. Clone the repo.
  2. Check out the branch corresponding to the step you want to attempt.
  3. Find and complete the TODOs.
  4. Optionally commit your code changes.
  5. Compare your code with the solution.
  6. Repeat steps 2-5 until you've gone trough all the steps to complete the toy app.

Step 1: Clone the repo

As you go through the course, you'll be instructed to clone the different exercise repositories, so you don't need to set these up now. You can clone a repository from github in a folder of your choice with the command:

git clone https://github.com/udacity/REPOSITORY_NAME.git

Step 2: Check out the step branch

As you go through different steps in the code, you'll be told which step you're on, as well as a link to the corresponding branch.

You'll want to check out the branch associated with that step. The command to check out a branch would be:

git checkout BRANCH_NAME

Step 3: Find and complete the TODOs

Once you've checked out the branch, you'll have the code in the exact state you need. You'll even have TODOs, which are special comments that tell you all the steps you need to complete the exercise. You can easily navigate to all the TODOs using Android Studio's TODO tool. To open the TODO tool, click the button at the bottom of the screen that says TODO. This will display a list of all comments with TODO in the project.

We've numbered the TODO steps so you can do them in order: todos

Step 4: Commit your code changes

After You've completed the TODOs, you can optionally commit your changes. This will allow you to see the code you wrote whenever you return to the branch. The following git code will add and save all your changes.

git add .
git commit -m "Your commit message"

Step 5: Compare with the solution

Most exercises will have a list of steps for you to check off in the classroom. Once you've checked these off, you'll see a pop up window with a link to the solution code. Note the Diff link:

solutionwindow

The Diff link will take you to a Github diff as seen below: diff

All of the code that was added in the solution is in green, and the removed code (which will usually be the TODO comments) is in red.

You can also compare your code locally with the branch of the following step.

Report Issues

Notice any issues with a repository? Please file a github issue in the repository.

You might also like...
Pagination-RecyclerView - Simple and easy way to Paginating a RecyclerView
Pagination-RecyclerView - Simple and easy way to Paginating a RecyclerView

Pagination-RecyclerView Simple and easy way to Paginating a RecyclerView Android

A Common RecyclerView.Adapter  implementation which supports all kind of items and has useful data operating APIs such as remove,add,etc.
A Common RecyclerView.Adapter implementation which supports all kind of items and has useful data operating APIs such as remove,add,etc.

##PowerfulRecyclerViewAdapter A Common RecyclerView.Adapter implementation which supports any kind of items and has useful data operating APIs such as

Sort & Filter Data RecyclerView
Sort & Filter Data RecyclerView

Sort-Filter-RecyclerView Sort & Filter Data RecyclerView Tutorial Build with Android Studio

ItemDecoration for RecyclerView using LinearLayoutManager for Android
ItemDecoration for RecyclerView using LinearLayoutManager for Android

RecyclerItemDecoration RecyclerItemDecoration allows you to draw divider between items in recyclerview with multiple ViewType without considering item

RecyclerView Application example using kotlin and viewbinding.

SimpleRecyclerViewApp Shows how to display some items in a simple list using the RecyclerView and RecycleView.Adapter. The RecycleView is the entity t

The library that removes all boilerplate code allowing you to display lists with few lines of code.

VsRecyclerView The library that removes all boilerplate code allowing you to display lists with few lines of code. Gradle androidExtensions { expe

RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)

Advanced RecyclerView This RecyclerView extension library provides Google's Inbox app like swiping, Play Music app like drag-and-drop sorting and expa

Dogglers app uses a RecyclerView in horizontal, vertical and grid view to show a group of CardViews
Dogglers app uses a RecyclerView in horizontal, vertical and grid view to show a group of CardViews

Welcome to DogglersApp! This app is the final project from Unit 2 of Android Basics in Kotlin given by Google codelabs: https://developer.android.com/

RecyclerView with DiffUtil is a way to improve the performance of your app
RecyclerView with DiffUtil is a way to improve the performance of your app

RecylerViewSamples RecyclerView with DiffUtil is a way to improve the performanc

Owner
Espérant GADA
I'm currently studying software engineering. I'm one of ALX students and aim to become an Android developer through Google Africa Developers Scholarship.
Espérant GADA
TikTok-RecyclerView - This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoPlayer2.

TikTok-RecyclerView Demo About This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoP

Baljeet Singh 19 Dec 28, 2022
the library is a loop RecyclerView(expression), can show some effects when display

CircleRecyclerView the library is a loop RecyclerView, can show some effects when display screenshot CircularViewMode ScaleXViewMode & ScaleYViewMode

Matt Yao 704 Jan 5, 2023
ScrollableList - learn how to efficiently display a list of text in a RecyclerView and understand its architecture.

ScrollableList Learn how to efficiently display a list of text in a RecyclerView and understand its architecture. activity_main RecyclerView widget he

null 0 Jan 3, 2022
how to handle recyclerView in Kotlin to display grid , vertical , horizontal layouts

Dogglers - Starter Code Starter code for the second independent project for Android Basics in Kotlin. Introduction This is the starter code for the Do

null 0 Mar 28, 2022
RecyclerView : SleepQualityTracker with RecyclerView app

RecyclerView - SleepQualityTracker with RecyclerView app SleepQualityTracker with RecyclerView This app builds on the SleepQualityTracker developed pr

Kevin 2 May 14, 2022
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView

XRecyclerView a RecyclerView that implements pullrefresh , loadingmore and header featrues.you can use it like a standard RecyclerView. you don't need

XRecyclerView 5.3k Dec 26, 2022
ANDROID. ChipsLayoutManager (SpanLayoutManager, FlowLayoutManager). A custom layout manager for RecyclerView which mimicric TextView span behaviour, flow layouts behaviour with support of amazing recyclerView features

ChipsLayoutManager This is ChipsLayoutManager - custom Recycler View's LayoutManager which moves item to the next line when no space left on the curre

Oleg Beloy 3.2k Dec 25, 2022
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView

XRecyclerView a RecyclerView that implements pullrefresh , loadingmore and header featrues.you can use it like a standard RecyclerView. you don't need

XRecyclerView 5.3k Dec 26, 2022
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Jack and phantom 504 Dec 25, 2022