在Android上的应用程序运行在布局控件处理

问题描述:

我需要重置布局,或根据一定的情况下,配置一些控制上的布局。但我无法找到一个方法来做到这一点。你有关于如何做一个想法?

I need to reset a layout or dispose some of the controls on that layout according to some certain cases. But I couldn't find a way to do so. Do you have an idea about how to do?

先谢谢了。

也许你可以只隐藏的组件,例如 findViewById(R.id.the_id_of_the_view_to_hide).setVisibility(View.GONE);

Maybe you can just the hide the components, e.g. findViewById(R.id.the_id_of_the_view_to_hide).setVisibility(View.GONE);

有用于能见度不同的参数。 GONE 隐藏的观点,也腾出了空间,就好像是完全去除之前使用的视图。

There are different parameters for the visibility. GONE hides the view and also frees up the space, the view used before, as if it was removed completely.