Reputation: 4595
Please have a look at these pictures.
As you can see there is no margin in the smaller one !!!
Please what am I doing wrong???
Here is a piece of the Layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/general_layout_margin"
android:gravity="center_vertical"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
other widgets...
I have defined the dimension general_layout_margin
in res/values/dimens.xml
I have another dimens.xml
in res/values-w820dp
BUT I HAVEN'T DEFINED IT THERE.
Please what am I dong wrong???
Thanks!
<resources>
<dimen name="general_layout_margin">16dp</dimen>
</resources>
Upvotes: 0
Views: 148
Reputation: 474
Put the android:layout_margin="@dimen/general_layout_margin"
into the inner, vertical layout.
It works and I have still no clue why. Welcome to layouting in Android.
Upvotes: 1