android - Relative layout repeatedly multiple views in same location -


in relative layout containing 1 edit text, 1 spinner 1 image in add new contact form. same layout repeatedly in same position when click add button android. here attached code in xml. help

<relativelayout     android:id="@+id/addcontact_relative2"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_centervertical="true"     android:layout_below="@+id/addcontact_relative1">      <edittext         android:id="@+id/addcontact_edit_mail"         android:layout_width="180dp"         android:layout_height="40dp"         android:hint="mail"         android:background="@drawable/edit_rounded"         android:padding="7dp"         android:inputtype="textemailaddress"         android:layout_centervertical="true"         android:layout_alignparentleft="true"         android:layout_marginleft="7dp"         android:layout_margintop="10dp"         android:layout_marginbottom="10dp"         android:layout_marginright="3dp"         />     <spinner         android:id="@+id/addcontact_mail_spin"         android:layout_width="120dp"         android:layout_height="40dp"         android:layout_centerhorizontal="true"         android:background="@drawable/edit_rounded"         android:layout_torightof="@+id/addcontact_edit_mail"         android:layout_marginleft="5dp"         android:spinnermode="dropdown"         android:layout_margintop="10dp"         android:layout_marginbottom="10dp"         android:scrollbars="none"         android:layout_marginright="3dp"         android:layout_centervertical="true"         android:entries="@array/types"         />     <imageview         android:id="@+id/addcontact_add_email_image"         android:layout_width="30dp"         android:layout_height="30dp"         android:layout_centervertical="true"         android:layout_alignparentright="true"         android:layout_marginright="5dp"         android:scaletype="fitxy"         android:adjustviewbounds="true"         android:src="@drawable/peopleadd"         />  </relativelayout> 

that's point of relativelayout. either change linearlayout orientation of vertical(if want 1 under other) or horizontal. or can add verious things layout.xml in relativelayout, such various android:layout_align modes.


Comments