Reputation: 724
I have an array of Pages, each Page contains content and a specific layout. I have a Horizontal Pager that can switch between pages when scrolling through them.
My question is, how do I set the width and height of the LinearLayout at runtime so the Page is set properly??
Atm the LinearLayout is set to 1024px width 768px height for landscape mode. This should be changed.
Upvotes: 0
Views: 1750
Reputation: 724
I found out how to do it. Should've read the docs better.
fl.setLayoutParams(new FrameLayout.LayoutParams(width, height));
Upvotes: 1