I like to setting Imageview like this.
(http://wemakeucc.com/4.jpg) <-Check image please
I only use imageview like this until now.
<ImageView
android:id="@+id/a_01_b"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/a_01_i" />
so I want to know code that can setting imageview like that image.
what should i do?
See the following xml below
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="40dip"
android:layout_marginTop="60dip" // give dip value according to where you want to place first image view from top
android:background="@color/black" // set image according to you
android:id="@+id/imageviewone" />
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="40dip"
android:layout_marginTop="60dip" // give dip value what you have given to first edit text
android:background="@color/black" // set image according to you
android:layout_below="@+id/imageviewone"
android:id="@+id/imageviewtwo" />
</RelativeLayout>
let me know if this helps you
here is the code as per your requirement :
xml file: and screenshots
<?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:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical"
android:paddingBottom="30dp"
android:paddingRight="20dp"
android:paddingTop="20dp" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/android" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical"
android:paddingBottom="30dp"
android:paddingRight="120dp"
android:paddingTop="20dp" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/android" />
</LinearLayout>
</LinearLayout>

now just set the padding as per ur need...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With