How can I get my Android Gallery to fit within my Relative Layout? -
i'm stuck on landscape layout. implementing gallery, , fit relative layout's height, , wrap content via width. tried scaletype centerinside, messing different types of layout_height/width.
here's relevant part of xml looks (i apologize lack of formatting):
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:layout_width="fill_parent" android:padding="10dip" android:orientation="vertical"> <relativelayout android:orientation="horizontal" android:layout_height="wrap_content" android:layout_width="fill_parent"> <gallery xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gallery" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignparentleft="true" android:scaletype="centerinside" />
here image of cutoff.
i don't believe can apply scaletype gallery: looking @ http://developer.android.com/reference/android/widget/gallery.html don't see scaletype 1 of supported attributes.
edit: should apply scaletype attribute on imageview putting in gallery.
Comments
Post a Comment