[英]How to remove all tablelayout inside scrollview in Android
I have created a dynamic tableLayout
inside scrollview1
. 我在
tableLayout
内创建了一个动态scrollview1
。 I have a function that needs to clear all the tablelayout
. 我有一个需要清除所有
tablelayout
。 And the tablelayout
has dynamic buttons too. 而且
tablelayout
也具有动态按钮。 How do I list all tablelayout
inside scrollview
and remove it? 如何在
scrollview
列出所有tablelayout
scrollview
并将其删除? Maybe by using a getchild
function? 也许通过使用
getchild
函数?
You can remove child views from an Android view by calling removeAllViews()
. 您可以通过调用
removeAllViews()
从Android视图中删除子视图。
For example, if you want to clear your scrollview1
: 例如,如果您想清除您的
scrollview1
:
scrollview1.removeAllViews();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.