On Wednesday, 27 July 2011 19:08:51 UTC+5:30, aparna rani wrote: > hi > > how to set vertical and horizontal scroll bar in android > > please help me
<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbarStyle="insideInset" android:fadeScrollbars="true" android:scrollbarSize="10dip" android:fitsSystemWindows="true" > <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/tt" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Text one.." android:textColor="#000000" android:background="#ffffff" android:textSize="20dip"/> <HorizontalScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbarStyle="insideInset" android:fadeScrollbars="true" android:scrollbarSize="10dip" android:fitsSystemWindows="true" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > <ImageView android:src="@drawable/abc" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> <ImageView android:src="@drawable/fgj" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> <ImageView android:src="@drawable/ggcgh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> <ImageView android:src="@drawable/thhh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" /> <ImageView android:src="@drawable/fhg" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" /> <ImageView android:src="@drawable/jgeraej" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" /> <ImageView android:src="@drawable/jhdfdjh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> </LinearLayout> </HorizontalScrollView> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff" android:textColor="#000000" android:text="Text two.." android:textSize="20dip"/> <HorizontalScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbarStyle="insideInset" android:fadeScrollbars="true" android:scrollbarSize="10dip" android:fitsSystemWindows="true" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"> <ImageView android:src="@drawable/thhh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> <ImageView android:src="@drawable/abc" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> <ImageView android:src="@drawable/fgj" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> <ImageView android:src="@drawable/hghhgh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" /> <ImageView android:src="@drawable/jgeraej" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> <ImageView android:src="@drawable/fhg" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> <ImageView android:src="@drawable/thhh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/> </LinearLayout> </HorizontalScrollView> </LinearLayout> </ScrollView> The output will look like this: -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

