-1

Actually I have bunch of images and I am passing those images to my custom array adapter to be present in a list view, I am getting a wonderful presentation of images in list view. But what I want is to show one image to be appear in full screen in list at a time. Means I want show my one Row in (100%) full screen activity. I have wasted 2 days for that and still don't get solution.

When I am giving android:layout_height="wrap_content" in Relative layout (id = subparent) then It gets overlapped and not what I want, when I give android:layout_height="430dp" then it looks like what i want. But I cannot do that because I dont know on which device its gonna run?

My XML file is below:

  <?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"
     >

    <RelativeLayout
        android:id="@+id/subparent"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentTop="true" >

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:src="@drawable/img2" />

        <FrameLayout
            android:id="@+id/flbotom"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:background="@drawable/bottom_nav"
            android:layout_alignParentBottom="true">
        </FrameLayout>

    </RelativeLayout>

</RelativeLayout>
Sagar Shah
  • 4,272
  • 2
  • 25
  • 36
  • have you tried using "fill_parent" – KunalK Mar 14 '13 at 08:30
  • yes I have used fill_parent, wrap_content, match_parent all of these but gives overlapped presentation. – Sagar Shah Mar 14 '13 at 08:33
  • you need to give static height to the root `RelativeLayout` and set `match_parent` to child elements else it is difficult to have a single row in full screen – Naveen Mar 14 '13 at 08:44

1 Answers1

1

I found the solution for this by simply putting fake views.

Sagar Shah
  • 4,272
  • 2
  • 25
  • 36
  • See you have two ways to do that: 1) you can put fake views in a single list item In way that It fills the whole screen. 2) you can set fixed height to list item. In this way you have to set height values for each list-item from dimension folder with respect to device screen resolutions. 480x800, 540x960, 720x1280,..etc – Sagar Shah Jun 13 '14 at 11:30