Basic Layout Question

  • Replies:1
  • OpenNot stickiedAnswered

Apr 2, 2011 12:53:21 AM via Website

Hi! :lol:

I’m trying to create a layout using the basic Android layout manager but I’m having a little bit of trouble with getting a text view within a scrollable view.
Basically all I’m looking for is a text box within a scrollable window at the top of the screen. The scroll views height will be dependent on up to 4 buttons which I either show/hide depending on the option the user selects.

So far I have everything working apart from making the text view (story_text_view) scrollable.
Hope someone is able to help :grin:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:padding = "1dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<LinearLayout
android:orientation ="vertical"
android:layout_height = "fill_parent"
android:layout_width = "fill_parent"
android:layout_gravity ="top">
<TextView
android:id = "@+id/story_text_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom = "5dip"
android:textSize = "15sp"
android:layout_weight = "1" />
<Button
android:id = "@+id/story_button_1"
android:layout_width = "fill_parent"
android:layout_height = "wrap_content"/>

<Button
android:id = "@+id/story_button_2"
android:layout_width = "fill_parent"
android:layout_height = "wrap_content"/>

<Button
android:id = "@+id/story_button_3"
android:layout_width = "fill_parent"
android:layout_height = "wrap_content" />
<Button
android:id = "@+id/story_button_4"
android:layout_width = "fill_parent"
android:layout_height = "wrap_content" />
</LinearLayout>

</LinearLayout>
/*