
I have created a pagecontroller application and added it on my page in its own linear layout.
However, I can not get the layout width to fill the entire parent page..
This is my code:
pagecontrol = new LinearLayout(this.context);
pagecontrol.setOrientation(LinearLayout.HORIZONTAL);
pagecontrol.setGravity(Gravity.CENTER_HORIZONTAL);
params = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.FILL_PARENT);
pagecontrol.addView(btn,params);
public LinearLayout getView() {
return pagecontrol;
}
I have attached the screenshot of the page. Could anyone please advise?
Thanks in advance.
1 Answer