All language subtitles for 2 - L7 01 Introduction V3 - lang_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Displaying a list of data is one of the most common UI tasks in Android.

In a weather app, you might show a list of forecasts.

In a chat app, you will show a list of chat messages.

In a news app, you will show a list of news items.

If you look at the apps on your phone,

almost every single app has at least one list.

List vary from a simple list of TextViews that show simple data,

to very complex items that show the user lots of details inside the scrolling list.

Some apps even use a list as their main user interface,

displaying complex summaries for the user to browse.

Some apps use a grid to show a lot of elements in a compact form.

This is a really good pattern that you can communicate effectively with icons or images,

like a photo browsing app.

To support all these use cases,

android comes with the RecyclerView widget.

RecyclerView is designed to be efficient even when displaying extremely large lists.

It allows you to build everything from simple lists of

TextViews all the way to very complex collections of views.

It only support displaying different types of items in the same list.

For example, a news app may want to mix video items into a list of headlines.

RecyclerView is also highly customizable.

Out-of-the-box, it supports lists and grids.

You can configure it to scroll horizontally or vertically.

If the default options aren't enough,

you can even build your own layout manager to make

RecyclerView display any design you dream up.

RecyclerView is efficient in a few ways.

It uses an adapter pattern,

which we will talk about in the next video,

to minimize the work it does when drawing a list.

By default, it will only do work to

process or draw items that are currently visible on the screen.

That means, if your list has 1,000 elements but only 10 are visible,

it will only do enough for it to draw

the first 10 items on screen until the user scrolls.

When the user scrolls,

RecyclerView will figure out what new items should be

on screen and to just enough work to display those.

What's really nice is,

you don't have to do anything to get this behavior.

It comes by default in RecyclerView.

Another way that RecyclerView is efficient is by reusing or recycling as much as it can.

When an item scrolls off the screen, it's recycled.

That means, it will reuse the views it

allocated for the next item that will scroll onto the screen.

It turns out this saves a lot of processing time,

and it helps making sure your list scroll fluidly.

Finally, when an item changes in RecyclerView,

instead of redrawing the entire list,

it just updates that one single item.

This is a huge efficiency gain when displaying lists of complex items.

Recycling as much as possible is key to

making RecyclerView efficient that it's part of the name.

As you'll see in this lesson,

RecyclerView is designed to do this recycling for you.

You don't have to do anything to enable the recycling,

but it does mean you need to be aware that your views will get re-used.

If you don't use the RecyclerView API correctly,

you can extently show old items when the views are reused.

Here, you can see one view that has been filled

and it keeps getting reused by the RecyclerView.

Instead of getting reset when recycled,

it's keeping to fill and showing it on the next item.

We'll talk later in this lesson about how to

use RecyclerView properly when your view is recycled.

RecyclerView, while efficient and customizable,

is not the only way to display a list of things on Androids.

Android also ships with a few other options for displaying lists.

The first are ListView and GridView

for displaying a scrolling list and grid respectively.

You can think of this as RecyclerView simpler,

but less powerful siblings.

Both of them work for displaying a small list of

items that aren't too complex, like 100 items.

They are not nearly as efficient as RecyclerView,

and they don't offer nearly as many options for customizing the display.

In general, the increased performance and flexibility

of RecyclerView makes it a better choice for your app.

The other option is LinearLayout.

You've already seen that earlier linear layout

can be used to display a small list of items,

for example three to five.

But using something as powerful as an RecyclerView is not needed.

However, if you aren't sure that you will ever need to display more than a few elements,

RecyclerView is a better choice.

In this lesson, you will take the sleep tracker app and update it to your RecyclerView.

Last lesson, we'll retrieve and display the scrollable text on-screen.

But wait a minute.

That doesn't look really nice.

The printed concatenated text is very hard to format.

We had to provide a whole pretty complex formatter for it,

and it's almost impossible to have a nice layout design.

For example, we have to show the qualities and number,

and it would look much better as an icon.

Finally, it definitely won't scale as our data grows and changes.

In this lesson, we'll use a recycler view to

show all the sleep data as a simple list like this.

You will implement each part of a RecyclerView,

and we will explain how it works as we go along.

Once you have a working app with a list,

we'll change gears and display the sleep data as a grid.

This is another way to represent the same data,

and we'll see how our RecyclerView architecture helps us easily make updates like this.

At the end of this lesson,

you'll be comfortable using RecyclerView for both lists and grids.

In addition, you will have an understanding of

the adapter pattern used by the RecyclerView.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.