Controls is showing above to one another.


Last Updated:

  1. nitinverma274

    nitinverma274 Member This Topic's Starter

    Joined:
    Sep 3, 2010
    Messages:
    17
    Likes Received:
    0
    Helllo Guys, I have two EditText and two Button.
    But on the emulator.second controls show the above of first one. so first one is now showing on the screen.
    What should i do.
    that is my main.xml file.

    <?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">

    <EditText
    android:id="@+id/text1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:paddingTop="10px"/>

    <Button
    android:id="@+id/b1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/text1"
    android:layout_alignParentRight="true" android:layout_marginLeft="40px"
    android:text="Click"/>
    <EditText
    android:id="@+id/text2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:paddingBottom="0px"/>

    <Button
    android:id="@+id/b2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/text2"
    android:layout_alignParentRight="true" android:layout_marginLeft="40px"
    android:text="Click"/>
    </RelativeLayout>
     

    Advertisement

Share This Page

Loading...