layout_marginLeftコードから左マージンを使用または設定すると、 として機能しlayout_marginRightます。この動作は、Android API < 11 のレイアウトのルートまたはルート に配置Viewしlayout_marginLeftたときに見られました。FrameLayout
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:background="#77cc99"
>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:background="#eebbaa">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World, MyActivity"
/>
</FrameLayout>
</FrameLayout>