java - The space between objects are more than given amount -
i trying setup xml layout reason there lot of space in between.
it looks like:
my xml looks like:
<?xml version="1.0" encoding="utf-8"?> <relativelayout 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:paddingbottom="5dp" android:paddingleft="5dp" android:paddingright="5dp" android:paddingtop="5dp" tools:context=".mainactivity" android:background="@drawable/bginset4" > <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingleft="6dp" android:paddingright="6dp" > <textview android:id="@+id/txtthefilename" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:layout_marginbottom="0dp" android:layout_margintop="8dp" android:textsize="14dp" android:textstyle="bold" android:textcolor="#0093dd" android:layout_marginleft="7dp" android:background="#ff0000" /> <textview android:id="@+id/tvsavedtotaltoll" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:layout_margintop="8dp" android:textsize="14dp" android:textstyle="bold" android:textcolor="#0093dd" android:layout_marginleft="7dp" android:background="#00ff00" /> <edittext android:id="@+id/etfilecontents" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginbottom="0dp" android:layout_marginleft="0dp" android:layout_marginright="0dp" android:layout_margintop="0dp" android:ems="10" android:gravity="top" android:inputtype="textmultiline|textnosuggestions" android:lines="18" android:paddingleft="6dp" android:scrollbars="vertical" android:singleline="false" android:textcolor="#999999" android:textsize="14dp" android:textstyle="normal" > <requestfocus /> </edittext> <button android:id="@+id/btnclose" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginbottom="0dp" android:layout_marginleft="0dp" android:text="close window" android:textstyle="bold" android:textcolor="#ffffff" android:shadowcolor="#000000" android:shadowdx="1" android:shadowdy="1" android:shadowradius="2" android:background="@drawable/closebutton" /> </linearlayout> </relativelayout>
i added background color differentiate. not sure why object red , green background has space below them. idea how fix issue?
i looking put trip name , small space , total toll amount , button way on bottom , space left in between store multiline edittext.
please help.
remove android:layout_margintop="8dp"
both textview's
: txtthefilename
, tvsavedtotaltoll
. reason more space.
Comments
Post a Comment