In my application i am adding the view dynamically to the linear layout. each view consists of one button if you click on that then view will be deleted. How to refresh the linear layout? because when i removed any view then the view's positions will be changed.
This constant is a layoutMode . This constant is a layoutMode . This constant was deprecated in API level 28.
You can set the layout_height="0dp" of your header, footer and ScrollView and define a layout_weight . Just play around with the values until you find out which works best. The resulting heights of header and footer would dynamically change with the screensize.
To remove any view you can use
ll.removeView(view)// to remove particular view
ll.removeViewAt(position);// to remove view from particular position
Use following logic to remove any view from layout
ll.post(new Runnable() {
public void run() {
ll.removeView(view);
}
});
You question is not that clear. But you could try setting the view as visibility = gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With