Reputation: 4699
Is it possible to force a layout to have a fixed size in dip?
Either a View directly or using a layout forced to have a fixed size in dip and put the view inside the layout?
And how?
Upvotes: 3
Views: 5307
Reputation: 2716
You can set specific width to the Layout you want using
android:layout_width="100dp"
You can do it in both way. directly to the View as well as put the View inside a Layout
Upvotes: 3
Reputation: 19492
Yes its possible, You just need to declare the required height and width of the view or layout in xml file as below
android:layout_width="200dip" <!--use this instead of wrap_content or fill_parent-->
android:layout_height="200dip"
Upvotes: 2