Reputation: 4547
I am trying to implement scroll type gallery for my app.(Just like the full size image browser we get on default android gallery.)
What I am getting
instead I want the gallery image to be displayed on the entire screen.
main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical" >
<ImageView
android:id="@+id/left_arrow_imageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dip"
android:src="@drawable/arrow_left_disabled" />
<Gallery
android:id="@+id/gallery"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_toLeftOf="@+id/right_arrow_imageview"
android:layout_toRightOf="@+id/left_arrow_imageview"
android:scaleType="fitXY"
android:spacing="20dip" />
<ImageView
android:id="@+id/right_arrow_imageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dip"
android:src="@drawable/arrow_right_enabled" />
</RelativeLayout>
Upvotes: 2
Views: 152
Reputation: 830
Try to set the main relative layout to fill_parent
and the ImageView to match_parent
.
Upvotes: 2