android - my layout won't layout right -



android - my layout won't layout right -

i have tablelayout won't behave , i'm not sure i'm doing wrong or not doing right

here layout file

<tablelayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/wall_paper" xmlns:android="http://schemas.android.com/apk/res/android"> <tablerow android:layout_weight="1" android:paddingtop="25dp"> <linearlayout android:orientation="horizontal"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/name" android:textcolor="@color/nb_text" android:layout_marginleft="20dip"/> <edittext android:id="@+id/name" android:layout_width="150dp" android:layout_height="wrap_content" /> </linearlayout> </tablerow> <tablerow android:layout_weight="1"> <linearlayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:orientation="horizontal"> <button android:id="@+id/chgphoto" android:text="@string/newphoto" android:background="@drawable/camera" android:layout_height="40dp" android:layout_width="60dp" android:layout_marginleft="20dip" android:layout_gravity="left" android:gravity="left" ></button> <imageview android:id="@+id/stuphoto" android:src="@drawable/person_icon" android:layout_width="100dip" android:layout_height="80dp" android:layout_marginleft="25dip" ></imageview> </linearlayout> </tablerow> </tablelayout>

i want person icon , resulting photo much bigger , shifted farther right nil seems help. in fact, when increment layout_width/height of photo, shifts icon space so:

any ideas on how create behave? kind - readily admit layouts have me confused.

try adding stretchcolumns="*" tablelayout , why don't set layout_gravity image you're trying move right?

android

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -