android - how to add multiple frames in xml -
hi in below xml using drawable added frame.now,for single 1 displaying personal information in same way how display multiple title should different.
how 1 1 can me.
updated
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <framelayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/frame1"> <relativelayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:color/white"> <!-- main content --> <relativelayout android:layout_width="fill_parent" android:layout_height="280dp" android:layout_margin="15dp" android:background="@drawable/frame1" android:orientation="vertical" android:padding="20dp" > <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center|center_vertical" android:background="#dfeceb" android:orientation="vertical" > <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" > <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="2dp" android:layout_margintop="20dp" android:padding="5dp" android:text="first name:" android:textappearance="?android:attr/textappearancesmall" android:textsize="15sp" android:textstyle="bold" /> <edittext android:id="@+id/first_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:layout_margintop="20dp" android:background="@drawable/rounded" android:cursorvisible="true" android:padding="5dp" android:singleline="true" android:textcolor="#000000" > </edittext> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <textview android:id="@+id/textview2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="2dp" android:layout_margintop="10dp" android:padding="5dp" android:text="last name:" android:textappearance="?android:attr/textappearancelarge" android:textsize="15sp" android:textstyle="bold" /> <edittext android:id="@+id/last_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:layout_margintop="20dp" android:background="@drawable/rounded" android:cursorvisible="true" android:inputtype="textpassword" android:padding="5dp" android:singleline="true" android:textcolor="#000000" > </edittext> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <textview android:id="@+id/textview3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="2dp" android:layout_margintop="10dp" android:padding="5dp" android:text="email:" android:textappearance="?android:attr/textappearancelarge" android:textsize="15sp" android:textstyle="bold" /> <edittext android:id="@+id/email" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:layout_margintop="20dp" android:background="@drawable/rounded" android:cursorvisible="true" android:inputtype="textpassword" android:padding="5dp" android:singleline="true" android:textcolor="#000000" > </edittext> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <textview android:id="@+id/textview4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="2dp" android:layout_margintop="10dp" android:padding="5dp" android:text="mobile no." android:textappearance="?android:attr/textappearancelarge" android:textsize="15sp" android:textstyle="bold" /> <edittext android:id="@+id/mobile_no" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:layout_margintop="20dp" android:background="@drawable/rounded" android:cursorvisible="true" android:inputtype="textpassword" android:padding="5dp" android:singleline="true" android:textcolor="#000000" > </edittext> </linearlayout> </linearlayout> </relativelayout> <!-- title label --> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/white" android:padding="5dp" android:text="personal information" android:layout_marginleft="30dp" android:textcolor="@android:color/black" /> </relativelayout> </framelayout> </linearlayout>
am not 100% sure , asking. if understanding correct, want wrap frame . if so, try editing relative layouts height wrapcontent.
<relativelayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:background="@drawable/frame1" android:orientation="vertical" android:padding="5dp">
Comments
Post a Comment