Hi All,
I want to remove dynamically created views on Button_click event, I am adding two EditText and one button for each BtnAdd_Click(Edit texts for name and phone No., BtnRemove for remove these EditText ).
Now i want to delete corresponding EditTexts and Button on BtnRemove_Click. How can i perform this action on BtnRemove_Click..
I want to remove dynamically created views on Button_click event, I am adding two EditText and one button for each BtnAdd_Click(Edit texts for name and phone No., BtnRemove for remove these EditText ).
Now i want to delete corresponding EditTexts and Button on BtnRemove_Click. How can i perform this action on BtnRemove_Click..
B4X:
Sub BtnAdd_Click
etxtName.Initialize("etxtName")
etxtPhon.Initialize("etxtPhon")
btnRmv.Initialize("btnRmv")
etxtName.TextSize=14
etxtPhon.TextSize=14
etxtName.Hint="Name"
etxtPhon.Hint="Phone"
SVNewCase.Panel.AddView(etxtName,10,(ItemSizeScroll*i),100,ItemSizeScroll/1.3)
SVNewCase.Panel.AddView(etxtPhon,80,(ItemSizeScroll*i),100,ItemSizeScroll/1.3)
SVNewCase.Panel.AddView(btnRmv,180,(ItemSizeScroll*i),40,ItemSizeScroll/1.3)
SVNewCase.Panel.AddView(BtnSubmit,100,ItemSizeScroll*(i+1),60,ItemSizeScroll/1.3)
editlist.add(etxtName)
i=i+1
End Sub
'btnRmv is the button created by dynamically
Sub btnRmv_Click
'Activity.RemoveViewAt() here i want remove corresponding edittexts
End Sub