I am making an application in which i have to use two images in one XML file. ( one is for logo and another is some login pattern) . On the pattern image, I have to set two EditText. How can i do this???
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
.
.
.
.
./>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/some image"
android:layout_marginLeft="200dp"
android:layout_marginBottom="300dp"
android:layout_marginTop="80dp">
<LinearLayout
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
</RelativeLayout>
</relativeLayout>
If I am understanding this correctly, you essentially want to have a background with two EditTexts in the foreground.
The best way to do this is via a relative layout. Something like this would work (Note, this is pseudo-code, so it won’t work directly)