I'm new to Android. On Click of a button I need to add Relative layout, further click the same button I want to attach same relative layout with different values to previous relative layout and so on, it should be done vertically. Later I will be reading values from the layout.
And on click of the clear inside layout, I should be able to remove the added layout as well.
What are the ways to do it?
Layout code,
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent">
<EditText
android:id="@+id/number"
style="@style/Edit_Text"
android:enabled="false"
android:tag="phone_number"
android:hint="Phone Number"
android:inputType="phone"
/>
<TextView
android:id="@+id/remove"
android:layout_width="30dip"
android:layout_height="30dip"
android:layout_alignParentRight="true"
android:text="x"
android:gravity="center"
android:layout_centerVertical="true"
android:layout_marginRight="2dip"/>