3

How I can add scrollbar in android xml file??? Can anyone prtovide me the simple way to add it in relative layout. I tried many times to add it in relative and linear layout. But,It doesn't work. Please give me solution.

Thanks.

2 Answers 2

3

Reference to above answer:

HOW TO USE RELATIVE LAYOUT W.R.T. SCROLLVIEW

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scrollView1" android:layout_width="fill_parent" android:layout_height="wrap_content" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" > ... ... ... </RelativeLayout> </ScrollView> 
Sign up to request clarification or add additional context in comments.

Comments

3

Wrap your relative or linear layout in a ScrollView. For example:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <!-- contents of linear layout go here --> </LinearLayout> </ScrollView> 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.