android - ScrollView not working in Relative Layout -
i'm working on login page app . scrollview isn't working , i'm unable find out why. i've tried changing layout_height of scrollview wrap_content , arbitrary value 900dp , same relative layout inside still no luck. when soft keyboard appears , fill in details in 1st edittext view , want scroll down fill second 1 without closing soft keyboard. page isn't scrolling. here code
<?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:fillviewport="true"> <relativelayout android:layout_width="match_parent" android:layout_height="match_parent" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" > <textview android:id="@+id/register" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/textview4" android:layout_centerhorizontal="true" android:layout_marginbottom="14dp" android:linksclickable="true" android:text="new schedulawyer ? sign up" /> <button android:id="@+id/login" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/register" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_marginbottom="14dp" android:text="login" /> <textview android:id="@+id/textview4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_centerhorizontal="true" android:layout_marginbottom="28dp" android:linksclickable="true" android:text="forgot password" /> <imageview android:id="@+id/imageview123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:src="@drawable/schedulawyer" /> <linearlayout android:id="@+id/lll" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/login" android:layout_alignright="@+id/login" android:layout_below="@+id/imageview123" android:background="@drawable/rounded_corner" android:orientation="vertical" > <edittext android:id="@+id/edittext1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="email/phone" android:singleline="true" > <requestfocus /> </edittext> <edittext android:id="@+id/edittext2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="password" android:inputtype="textpassword" /> </linearlayout> </relativelayout> </scrollview>
okay solved myself. problem if background image added page won't scroll until image bigger device size
Comments
Post a Comment