for example ... I want to inflate a layout with a certain class, it removes unnecessary views and only uses the necessary ones ... Is there a method to remove views?
for example ... I want to inflate a layout with a certain class, it removes unnecessary views and only uses the necessary ones ... Is there a method to remove views?
I can see two ways of doing this. The first is that you can hide the view you want through the suaView.setVisibility(View.GONE)
method. It will remain there, but it will not be visible. The second is that every layout (LinearLayout, RelativeLayout and etc) inherits from the ViewGroup, and that class has the [removeView(suaView)][1]
method.
You can set the view visibility to GONE, this parameter 'removes' the item from the screen.
view.setVisibility(View.GONE);