rleiman Well-Known Member Licensed User Longtime User Dec 21, 2013 #1 Hi Everyone, I have seen coding like this: B4X: Activity.RemoveViewAt(3) Is there a way to do something like this: B4X: Activity.RemoveViewAt(ReturnIndexNumber("MyView")) It would make the coding easier to read if I can use a view name instead of a number.
Hi Everyone, I have seen coding like this: B4X: Activity.RemoveViewAt(3) Is there a way to do something like this: B4X: Activity.RemoveViewAt(ReturnIndexNumber("MyView")) It would make the coding easier to read if I can use a view name instead of a number.
Beja Expert Licensed User Longtime User Dec 22, 2013 #2 Sorry I didn't come here to disappoint you, but I don't know. You can go around Cape Town though.. Assign a name to each index number as integer B4X: DIM MyView as integer MyView = 3 Activity.RemoveViewAt(MyView) Note: take away the string quotations from "MyView" since it is Integer variable. Hope that works for you Upvote 0
Sorry I didn't come here to disappoint you, but I don't know. You can go around Cape Town though.. Assign a name to each index number as integer B4X: DIM MyView as integer MyView = 3 Activity.RemoveViewAt(MyView) Note: take away the string quotations from "MyView" since it is Integer variable. Hope that works for you
Erel B4X founder Staff member Licensed User Longtime User Dec 22, 2013 #3 The simplest solution will be to call MyView.RemoveView. This call removes the view from its parent. Upvote 0
rleiman Well-Known Member Licensed User Longtime User Dec 22, 2013 #4 Hi Erel, Thanks for the help. Upvote 0