bogmix
bogmix

Reputation: 120

How to adjust child view height after resizing its parent ViewGroup?

I have custom view which extends RelativeLayout and has child element with height set to "fill_parent". The problem is that adjusting parents height doesn't affect its child height. How can I force child to fit its parent?

Upvotes: 3

Views: 1279

Answers (1)

dilix
dilix

Reputation: 3893

You can programatically change height\width with LayoutParams, check this: How to create a RelativeLayout programmatically with two buttons one on top of the other?

Upvotes: 1

Related Questions