所以这就是交易。
我的应用程序的布局是使用视图翻转器设置的。视图翻转器包含七个线性布局子项(视图)。每个线性布局都包含一个列表视图。每个线性布局代表我的应用程序中的不同类别。
这就是我的困境。
目前,我的布局非常静态且平淡,因此我希望能够让用户能够选择任意数量的可用类别。这意味着我必须能够动态创建和删除线性布局,每个布局都有自己的列表视图。还有为我的列表视图创建和删除数组适配器的问题。
有什么建议吗?
So here's the deal.
My app's layout is set up with a View Flipper. The View Flipper contains seven Linear Layout children (views). Each Linear layout then contains a List View. Each linear layout represents a different category in my app.
And here is my dilemma.
Currently my layout is pretty static and bland, so I want to be able to give users the ability select any number of the available categories. This will mean I will have to be able to dynamically create and remove Linear Layouts, each with its own List View. There's also the question of creating and removing Array Adapters for my List Views.
Any suggestions?
发布评论
评论(1)
如何禁用布局内的所有视图?
通过此链接,您可以找到三种方法:禁用、删除和隐藏。
然后,如果您想在此之后添加一些内容,您可以在 java 代码中执行此操作:
How can I disable all views inside the layout?
With this link you can find three approaches : disabling, removing and hiding.
Then if you want to add something after this, you can do it in your java code :