You can use android:layout_marginLeft="20dp"
. You can set margin as per requirement.
Or you can also create one blank View
and one ImageView
in xml and give it weight.
Example:
1)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/expandable"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="horizontal" >
<View android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:background="@drawable/ic_launcher" />
OR 2)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/expandable"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="horizontal" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="20dp"
android:background="@drawable/ic_launcher" />
</LinearLayout>