Hi folks, i just started developing Android apps and i got a first question while designing the screen.
What i want to do is do build a login screen. So i arranged my Labels and Editfields with a TableLayout in Rows. Below the fields, i want to place a Login Button and a below that, an image with a logo. So my idea was to place a TableLayout into a Relative Layout. so i can arrange my fields using a TableLayout and the Button and Image with the Relative Layout, but when i want to place my Button below the table, it appears in the topright corner. Here is my approach: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10px" > <TableLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:id="@+id/tableLay" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableRow android:minHeight="50px"> <TextView android:text="@string/login_user" android:paddingRight="20px" android:layout_gravity="center_vertical"/> <EditText android:id="@+id/user" android:layout_height="wrap_content" android:background="@android:drawable/ editbox_background" android:layout_width="200sp" android:lines="1" android:maxLength="15" android:inputType="text" android:layout_gravity="center_vertical" android:focusable="true"/> </TableRow> <TableRow android:minHeight="50px"> <TextView android:text="@string/login_pass" android:paddingRight="20px" android:layout_gravity="center_vertical"/> <EditText android:id="@+id/password" android:layout_height="wrap_content" android:background="@android:drawable/ editbox_background" android:layout_width="200sp" android:lines="1" android:maxLength="15" android:inputType="textPassword" android:layout_gravity="center_vertical"/> </TableRow> <TableRow android:minHeight="50px"> <TextView android:text="@string/login_licPlate" android:paddingRight="20px" android:layout_gravity="center_vertical"/> <EditText android:id="@+id/licPlate" android:layout_height="wrap_content" android:background="@android:drawable/ editbox_background" android:lines="1" android:maxLength="15" android:inputType="text" android:layout_gravity="center_vertical" android:layout_width="wrap_content"/> </TableRow> </TableLayout> <Button android:id="@+id/login" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/licPlate" android:layout_alignParentRight="true" android:layout_marginLeft="10px" android:text="Login" /> </RelativeLayout> Maybe someone can help me with that. Regards, Grinarn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---