This is my first question on stackoverflow and I tried to make some of the given answers work but failed.. So, without much adieu, here goes.. :>
I'm trying to make a section of an app about a saint telling his life story in a sequence of images and short text lines detailing the images - a sort of image slide show with text.
What I'm trying to do is an ImageView on top with a Textview at the bottom with the image filling the available screen size. On a user horizontal swipe, the next Image-Text slide loads up different content - replacing the previous content - Imageview filling the screensize completely again.
Basically, a Gallery-esque horizontal swipe/scroll implementation plus the textview (minus the gridview, the pinch-zoom functionality)
I'm a noobie with Java and I tried doing this in XML with HorizontalScrollView but the Imageview doesn't fill the total available screensize or exceeds the screensize making it very non-user-friendly. In Landscape, the textview is hidden completely and even after using weight in LinearLayout, I couldn't make them visible. :S
EDIT:
Current XML Layout
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/horizontalScrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/dbyouth000" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/dbyouth001"
android:text="@string/dbystring001"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/dbyouth001b" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/imageView3"
android:text="@string/dbystring001b"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
</LinearLayout>
</HorizontalScrollView>
Potrait Screenshots:
Landscape Screenshots:
- Thanks for reading and I would really appreciate any help :>