How to make all the contents in the android page scoll up -
in android application page have use slider, textview , gridview display images. problem when scroll up, gridview images scrolls , rest of things stays static. please me how can make contents of page move scroll?
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >`enter code here` <viewflipper android:id="@+id/viewflipper1" android:layout_width="match_parent" android:layout_height="wrap_content" > <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/one" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/two" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/three" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/banner1" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/banner2" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/banner3" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/banner4" /> </viewflipper> <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="shop for" android:textappearance="?android:attr/textappearancemedium" android:layout_marginleft="100dp" /> <gridview android:id="@+id/gridview1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:columnwidth="150dp" android:gravity="center" android:horizontalspacing="1dp" android:numcolumns="2" android:padding="28dp" android:stretchmode="none" android:verticalspacing="1dp" android:visibility="visible" > </gridview> </linearlayout>
place code in scroll view use following code
<?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" > <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <viewflipper android:id="@+id/viewflipper1" android:layout_width="match_parent" android:layout_height="wrap_content" > <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/one" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/two" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/three" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/banner1" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/banner2" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/banner3" /> <imageview android:layout_width="fill_parent" android:layout_height="150dp" android:src="@drawable/banner4" /> </viewflipper> <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="shop for" android:textappearance="?android:attr/textappearancemedium" android:layout_marginleft="100dp" /> <gridview android:id="@+id/gridview1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:columnwidth="150dp" android:gravity="center" android:horizontalspacing="1dp" android:numcolumns="2" android:padding="28dp" android:stretchmode="none" android:verticalspacing="1dp" android:visibility="visible" /> </linearlayout> </scrollview>
if have issue feel free comment.
Comments
Post a Comment