1. Check out our app, Forums for Android! Download and leave feedback here!

Controls is showing above to one another.

Discussion in 'Application Development' started by nitinverma274, Sep 6, 2010.

  1. nitinverma274

    nitinverma274 Member
    Thread Starter
    35

    Sep 3, 2010
    17
    0
    35
    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...