hey what's going on guys welcome back to
another android studio tutorial and
today i will be showing you guys that
how to use a scrollview in the android studio
so the scrollview is nothing but
it's scrolling your application from the
top to bottom or bottom to top
so where you have to actually use
the scroll view is that suppose you want
to add multiple items into a android app
and you may notice that the screen is
not enough to fit the items and some of
the items that have gone out of the
screen so in this case in that cases you
can use the scroll view which is highly
helpful to add multiple and more than
more than two or three items and you can
scroll it from top to bottom and see and
entire thing in the app so the first step
that you can do to introduce the
scrollview is that just go to the text
and change the relative layout or linear layout
into scrollview and after that
you can add a layout into the
scrollview because the scrollview can
only afford a single child which means
if you want to add multiple buttons
no it's not possible you can only add a
single item into the score of you
so in that case is you how to use the
linear layout or relative layout to add
multiple items so just drag the linear layout
into the scrollview and now here
is your it linear layout and now let's
go and add a button into it and check it
out
so here is a bottom let's go to the tags
and removing the ID and and just copying
the same button, pasting it more than
once and now as you can see it is more
than enough for the screen now let's go
and run it in a live device and check
it out whether the screen is enough now
to fit the buttons
ok guys now I'm in the application and
as you see it shows the buttons
completely on the screen now let's go
and tries scrolling
and as you can see now we can able to scroll
from top to bottom and bottom to top
which means that now we can add more
than the item that fit on the screen so
i hope you guys how good the idea if so
like this video and subscribe to my
channel for later android updates.
Thanks for watching this video,
Peace Out !!