Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrollable FrameLayout

Tags:

android

Alright, so I followed the Tab Widget tutorial to create some tabs for my application. In one of the tabs, I have a TextView with a lot of text that I'm debugging with. But, with all of the text, all of the info doesn't show up on the screen. I figured that I could scroll down to see the rest, but I cannot scroll. Any idea on how to make it so that I can scroll down my FrameLayout so I can see the rest of my text?

like image 523
Chiggins Avatar asked Jul 03 '10 20:07

Chiggins


People also ask

Is ViewPager scrollable?

Is ViewPager scrollable? ViewPager in Android is a class that allows the user to flip left and right through pages of data.

What is FrameLayout used for?

Android Framelayout is a ViewGroup subclass that is used to specify the position of multiple views placed on top of each other to represent a single view screen. Generally, we can say FrameLayout simply blocks a particular area on the screen to display a single view.

Why does FrameLayout hold one view?

Frame Layout is designed to block out an area on the screen to display a single item. Generally, FrameLayout should be used to hold a single child view, because it can be difficult to organize child views in a way that's scalable to different screen sizes without the children overlapping each other.

Is ListView scrollable by default?

scrollable Boolean|String (default: false) If set to true the listview will display a scrollbar when the content exceeds the listview height value. By default scrolling is disabled. It could be also set to endless in order to enable the endless scrolling functionality.


1 Answers

You can surround the view that you want to be scrollable with a ScrollView, as below:

<ScrollView android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="#ffffff">

// the views here that you want to make scrollable

</ScrollView>
like image 116
xil3 Avatar answered Oct 03 '22 01:10

xil3