Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does android:isScrollContainer do?

Does anyone know what android:isScrollCOntainer = (boolean) or $(View).setScrollContainer(boolean) do?

At first I thought this would be the answer to set a View inside a ScrollView NOT to scroll with ScrollView, but it doesn't seem to be the case.

On Android Developers it says,

"Set this if the view will serve as a scrolling container, meaning that it can be resized to shrink its overall window so that there will be space for an input method. "

Can anyone kindly explain what this description means?
What is a scrolling container in this case?
What kind of input method is available?

like image 509
Some Noob Student Avatar asked Mar 15 '11 06:03

Some Noob Student


People also ask

What is scroll view in Android?

A view group that allows the view hierarchy placed within it to be scrolled. Scroll view may have only one direct child placed within it. To add multiple views within the scroll view, make the direct child you add a view group, for example LinearLayout , and place additional views within that LinearLayout.

What is a scroll container?

A scroll container is created by applying overflow: scroll to a container, or overflow: auto when there is enough content to cause overflow. The scroll container allows the user to scroll through parts of the overflow region that would otherwise be clipped and hidden from view.


2 Answers

A scrolling container is one where the size of the container is independent of it's content. For instance you can make a ScrollView or ListView of height 100 pixels, but you can fit as much content in as you want. Similarly regardless of the size of the content in the view, you can set the size the of the View to whatever you'd like.

If a container is scrollable, then Android knows it can shrink the size of the container without rendering parts of the content of the container inaccessible (since the user can just scroll down to see things not on screen). It uses this for when the SoftKeyboard is opened - if a container is scrollable it will shrink it as much as possible in an attempt to keep all of the elements on screen.

So ScrollView, ListView, GridView etc are all examples of scrolling containers.

like image 167
Joseph Earl Avatar answered Oct 02 '22 04:10

Joseph Earl


I am looking in to the same thing and I am not sure exactly what it means either. The input method is however the soft keyboard. Changing it affects how the views resize when an edittext is clicked and the keyboard pops up. Look in to android:windowSoftInputMode for more information.

I hope this was at least a little bit helpful!

like image 20
notBanana Avatar answered Oct 02 '22 04:10

notBanana