Trouble understanding Relaive Layout
I do not seem to be able to figure out how to do something simple with
Android Relative Layout. The html equivalent would be something like this
...
<table>
<tr><td colspan=3><input type="text"></td></tr>
<tr><td><input type="text" size=2></td><td><input type="text"
size=2></td><td><input type="text" size=2></td></tr>
</table>
... have tried this in my layout xml file ...
<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="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".CreateBookmarksActivity" >
<EditText
android:id="@+id/editTextBookmarkTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="36dp"
android:ems="10" >
</EditText>
<EditText
android:id="@+id/editTextHH"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editTextBookmarkTitle"
android:layout_toLeftOf="@+id/editTextMM"
android:ems="10"
android:inputType="number" >
</EditText>
<EditText
android:id="@+id/editTextMM"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editTextBookmarkTitle"
android:layout_toRightOf="@+id/editTextHH"
android:inputType="number" />
</RelativeLayout>
... but it just looks like a jumble of garbage.
No comments:
Post a Comment