xml - Android ImageView causing whitespace at the bottom -


my code below causing whitespace @ bottom of image. wanted image cover entire screen, somehow isn't.

<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"         tools:context=".mainactivity">  <relativelayout android:layout_width="match_parent"                 android:layout_height="match_parent">      <imageview         android:src="@drawable/ohm"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:scaletype="centercrop"         android:adjustviewbounds="true"/>      <imageview         android:id="@+id/logo"         android:src="@drawable/test2"         android:layout_width="70dp"         android:layout_height="70dp"         android:layout_alignparenttop="true"         android:layout_centerhorizontal="true"         android:layout_margintop="20dp"/>      <imageview         android:id="@+id/night"         android:src="@drawable/night"         android:layout_width="340dp"         android:layout_height="250dp"         android:layout_below="@id/logo"         android:layout_centerhorizontal="true"         android:layout_margintop="10dp"/>      <edittext         android:id="@+id/username"         android:layout_width="340dp"         android:layout_height="50dp"         android:layout_centerhorizontal="true"         android:layout_below="@id/night"         android:layout_margintop="20dp"         android:alpha="0.2"         android:background="@drawable/rounded_edittext_states"         android:textcolor="#d69e29"         android:textstyle="bold"         android:paddingleft="15dp"         android:hint="username"         android:textcolorhint="#d69e29"/>      <edittext         android:id="@+id/password"         android:layout_width="340dp"         android:layout_height="50dp"         android:layout_centerhorizontal="true"         android:layout_below="@id/username"         android:layout_margintop="10dp"         android:alpha="0.2"         android:background="@drawable/rounded_edittext_states"         android:textcolor="#d69e29"         android:textstyle="bold"         android:paddingleft="15dp"         android:hint="password"         android:textcolorhint="#d69e29"/>  </relativelayout> </scrollview> 

i've tried changing different scaletype still same. then, if change adjustviewbounds false, image become double in height.

below images 2 issues facing.

http://i.imgur.com/bom5cfe.png http://i.imgur.com/fe5wmoq.png

i have met problem before, solution use image have same width:height ratio screen.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -