i wish make view scrollable not working. have checked couldn't find problem. however, scrollview visible in portion of screen, last button never shown.
here's code:
<scrollview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="@dimen/margin_default" android:background="@color/themecolor" tools:context=".authactivityfragment" > <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:layout_margintop="32dp" android:layout_marginbottom="32dp" > <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:src="@mipmap/logo_large" /> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:background="@mipmap/login_form_bg" android:padding="20dp" android:gravity="center" android:layout_margin="10dp" > <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/heading_login" android:layout_gravity="center" android:textcolor="@color/black_shade" style="@android:style/textappearance.devicedefault.medium" android:textstyle="bold" /> <edittext android:hint="@string/hint_login_username" android:id="@+id/etemail" android:textcolorhint="@color/light_grey_hint" android:singleline="true" android:inputtype="textemailaddress" android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="48dp" android:layout_margin="@dimen/margin_default" android:background="@drawable/border_fields" style="@android:style/textappearance.devicedefault.medium" android:paddingbottom="@dimen/margin_default" android:paddingtop="@dimen/margin_default" android:paddingleft="@dimen/large_margins" android:paddingright="@dimen/large_margins" /> <edittext android:hint="@string/hint_login_password" android:id="@+id/etpassword" android:textcolorhint="@color/light_grey_hint" android:singleline="true" android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="48dp" android:background="@drawable/border_fields" style="@android:style/textappearance.devicedefault.medium" android:paddingbottom="@dimen/margin_default" android:paddingtop="@dimen/margin_default" android:paddingleft="@dimen/large_margins" android:paddingright="@dimen/large_margins" android:layout_margin="@dimen/margin_default" android:inputtype="textpassword" android:ems="10" /> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" > <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center" android:padding="@dimen/margin_default" > <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_small_cross" android:layout_gravity="center_vertical" android:padding="@dimen/large_margins" /> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_small_cross" android:layout_gravity="center_vertical" android:padding="@dimen/large_margins" /> <imagebutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/btnlogin" android:background="@mipmap/login" android:layout_marginright="@dimen/margin_default" android:layout_gravity="center_vertical" /> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_small_cross" android:padding="@dimen/large_margins" android:layout_gravity="center_vertical" /> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_small_cross" android:padding="@dimen/large_margins" android:layout_gravity="center_vertical" /> </linearlayout> </linearlayout> <imagebutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/btnsignup" android:background="@mipmap/signup" android:layout_marginright="@dimen/margin_default" android:layout_gravity="center_horizontal" /> </linearlayout> </scrollview>
everything scrollview fine.
android:layout_margintop="32dp" android:layout_marginbottom="32dp"<br> this piece of code evil. since have given margin first child, not showing full content.change to
android:paddingbottom="32dp" android:paddingtop="32dp"
Comments
Post a Comment