No widget shows after scrollView in android - android

My design is like this: "Linearlayout start" "scrollview start" "scrollview end" "LinearLayout start" "LinearLayout end" "LinearLayout end". But second linear layout does not show in the screen.
code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<ScrollView
android:fillViewport="false"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/title" />
<TextView
android:id="#+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/date" />
<ImageView
android:id="#+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/nasa" />
<TextView
android:id="#+id/description"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/description" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<Button android:id="#+id/refresh" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="#string/refresh">
</Button>
</LinearLayout>
</LinearLayout>
Thanks in advance

I found the solution. I need to add an extra attribute in ScrollView
<ScrollView android:layout_weight="1">
which prevent scroller to fill entire screen.

When your are using scrollView it needs to be as parent for the layout.
As per your code, follow the following code which was edited as per your requirement....
code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:fillViewport="false"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/title" />
<TextView
android:id="#+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/date" />
<ImageView
android:id="#+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/nasa" />
<TextView
android:id="#+id/description"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/description" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<Button android:id="#+id/refresh" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="#string/refresh">
</Button>
</LinearLayout>
</ScrollView>
Run the following code. It will execute...

Related

How to edit Layout to full length of screen?

i have an app which has a main RelativeLayout and some LinearLayout within it.
My problem is that the LinearLayout doesn't fit to the full lenght of the screen:
this is my xml file :
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/bgApp" >
<LinearLayout
android:id="#+id/mainView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="#dimen/topBarHeight"
android:background="#drawable/top"
android:gravity="center"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:orientation="horizontal"
android:background="#android:color/transparent" >
<ImageView
android:id="#+id/scoreLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/coin_icon"
android:contentDescription="#string/app_name"/>
<TextView
android:id="#+id/mainScreenTotalPoints"
style="#style/pointTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="#dimen/btnPaddingV"
android:text="#string/startPoint"
android:textSize="#dimen/buttonTextSize" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="#dimen/logPadding"
android:text="#string/app_name"
android:textColor="#d0105e"
android:textSize="27sp"
android:textStyle="bold"/>
<LinearLayout
android:id="#+id/root"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="#dimen/btnPadding"
android:paddingRight="#dimen/btnPadding" >
<Button
android:id="#+id/play"
android:layout_width="fill_parent"
android:layout_height="#dimen/buttonHeight"
android:background="#drawable/button_blue"
android:gravity="center"
android:onClick="onButtonClickPlay"
android:text="#string/play"
android:textColor="#color/btnMain"
android:textSize="#dimen/buttonTextSize" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:orientation="vertical"
android:paddingTop="#dimen/mainbox" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="#dimen/btnPadding" >
<Button
android:id="#+id/btn_how"
style="#style/btnCapital"
android:layout_width="fill_parent"
android:layout_height="#dimen/buttonHeight"
android:layout_marginRight="#dimen/btnPaddingV"
android:layout_weight="1.0"
android:background="#drawable/button_green_how"
android:onClick="onButtonClickHowToPlay"
android:text="#string/howInfo" />
<Button
android:id="#+id/btn_rate"
style="#style/btnCapital"
android:layout_width="fill_parent"
android:layout_height="#dimen/buttonHeight"
android:layout_marginLeft="#dimen/btnPaddingV"
android:layout_weight="1.0"
android:background="#drawable/button_rate"
android:onClick="onButtonClickRate"
android:text="#string/rateInfo" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="#dimen/btnPadding" >
<Button
android:id="#+id/sound"
style="#style/btnCapital"
android:layout_width="0dp"
android:layout_height="#dimen/buttonHeight"
android:layout_marginTop="1.0dip"
android:layout_weight="1.0"
android:background="#drawable/mute_01"
android:gravity="center"
android:onClick="onButtonClickSound"
android:text="#string/mute" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="#dimen/btnPadding" >
<Button
android:id="#+id/moreapp"
style="#style/btnCapital"
android:layout_width="0dp"
android:layout_height="#dimen/buttonHeight"
android:layout_marginTop="1.0dip"
android:layout_weight="1.0"
android:background="#drawable/button_blue"
android:gravity="center"
android:onClick="onButtonClickMoreApp"
android:text="#string/moreapp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="bottom"
android:gravity="center"
android:orientation="vertical" >
<com.google.android.gms.ads.AdView
android:id="#+id/adView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="bottom"
ads:adSize="BANNER"
ads:adUnitId="#string/admob_publisher_id"
android:gravity="bottom" />
</LinearLayout>
</LinearLayout>
</ScrollView>
here is a screenshot :
Screenshot after running app
and here a screenshot of layout before running app:
Screenshot before running app
Thank you in advance !
You need to use the ScrollView attribute called android:fillViewport="true". This attribute causes the scroll view’s child to expand to the height of the ScrollView if needed.
When the child is taller than the ScrollView, the attribute has no effect.
Check out this for detail explanation.
You have to use attribute android:fillViewport="true".in your scrollview.

Android: TextView not appearing below ListView

I checked out a similar question to this but it didn't solve my problem.
From top to bottom, I'm try to display:
a TextView (header)
a ListView with an index strip to the right of it (I use horizontal LinearLayout for this pair)
a TextView (footer)
Everything appears except my footer TextView.
Can somebody please tell me what is wrong with my XML?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:layout_height="fill_parent" >
<TextView
android:id="#+id/tvHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TextView"
android:background="#00F"
android:textColor="#android:color/white"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="wrap_content" >
<ListView
android:id="#android:id/list"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fastScrollEnabled="true" />
<LinearLayout
android:id="#+id/sideIndex"
android:layout_width="40dip"
android:layout_height="wrap_content"
android:background="#FFF"
android:gravity="center_horizontal"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/tvFooter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TextView"
android:background="#0F0"
android:textColor="#F00"
android:textStyle="bold" />
</LinearLayout>
Try this..
change android:layout_height="wrap_content" to android:layout_height="0dp" and add android:layout_weight = "1" for the middle LinearLayout
Change this..
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="wrap_content" >
to
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_weight = "1"
android:layout_height="0dp" >
LinearLayout
1) http://developer.android.com/reference/android/widget/LinearLayout.html
2) http://developer.android.com/guide/topics/ui/layout/linear.html
RelativeLayout
1) http://developer.android.com/reference/android/widget/RelativeLayout.html
2) http://developer.android.com/guide/topics/ui/layout/relative.html
Better you try RelativeLayout. Check this
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="#+id/tvHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#00F"
android:text="TextView"
android:textColor="#android:color/white"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/tvFooter"
android:layout_below="#+id/tvHeader"
android:orientation="horizontal" >
<ListView
android:id="#android:id/list"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fastScrollEnabled="true" />
<LinearLayout
android:id="#+id/sideIndex"
android:layout_width="40dip"
android:layout_height="wrap_content"
android:background="#FFF"
android:gravity="center_horizontal"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/tvFooter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#0F0"
android:text="TextView"
android:textColor="#F00"
android:textStyle="bold" />
</RelativeLayout>
add this attribute to your 2nd Linear layout.
android:layout_weight = "1"
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:layout_height="fill_parent" >
<TextView
android:id="#+id/tvHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TextView"
android:background="#00F"
android:textColor="#android:color/white"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_weight = "1" <!-- here -->
>
.......
You could use a RelativeLayout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="#+id/tvHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TextView"
android:background="#00F"
android:textColor="#android:color/white"
android:textStyle="bold" />
<TextView
android:id="#+id/tvFooter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#0F0"
android:text="TextView"
android:textColor="#F00"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_below="#+id/tvHeader"
android:layout_above="#+id/tvFooter"
android:orientation="horizontal"
android:layout_height="wrap_content" >
<ListView
android:id="#android:id/list"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fastScrollEnabled="true" />
<LinearLayout
android:id="#+id/sideIndex"
android:layout_width="40dip"
android:layout_height="wrap_content"
android:background="#FFF"
android:gravity="center_horizontal"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Use RelativeLayout, it will be easier to show or reposition other items.

XML Layout overlap

I am trying to create a certain layout, that consists of 2 parts a scrollview and a "footer" at the bottom, but always on top of the scrollview. Everything inside the scrollview must be visible (by scrolling).
This is my current code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/banner" />
<TextView
android:layout_width="fill_parent"
android:paddingTop="1dp"
android:layout_height="3px"
android:background="#DADADA" />
<RelativeLayout
android:id="#+id/InnerRelativeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="#+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="Start Connecting" />
<Button
android:id="#+id/button01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/button1"
android:layout_alignParentLeft="true"
android:text="First use" />
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Welcome to ADB Wireless!"
android:textSize="25sp" />
</RelativeLayout>
</LinearLayout>
But it gives an overlap on small screens & landscape mode. I would only like to have the 2 buttons to be inside the 'footer'. Thank you!
<?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:orientation="vertical" >
<LinearLayout
android:id="#+id/button_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical" >
<Button
android:id="#+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Next" />
<Button
android:id="#+id/button01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Previous" />
</LinearLayout>
<ScrollView
android:id="#+id/scrollView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="#+id/button_layout" >
</ScrollView>
</RelativeLayout>

Fill RelativeLayout parent with LinearLayout child

This seems simple but I've exhausted my Google search patience.
I have a RelativeLayout that has two sub LinearLayouts side-by-side and I want them both to vertically fill the parent, no matter the height of the two LinearLayouts. This is being used as a ListView row and the content under #id/item_left is generally shorter than the one on the right.
The background drawable doesn't fill the entire row.
Any ideas on making both sides fill?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="#+id/item_left"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:paddingRight="2dp"
android:paddingLeft="2dp"
android:background="#drawable/item_left"
android:orientation="vertical">
<TextView android:id="#+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/item_left_text"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#color/item_right_background"
android:layout_toRightOf="#id/item_left">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/item_right_text"
android:text="Row1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/item_right_text"
android:text="Row2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/item_right_text"
android:text="Row3" />
</LinearLayout>
</RelativeLayout>
try this code .... sorry but I changed the color to so the impact when you will change the text of first TextView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="fill_parent"
android:background="#ffffffff" android:weightSum="1">
<LinearLayout android:id="#+id/item_left"
android:layout_width="wrap_content" android:layout_height="fill_parent"
android:paddingRight="2dp" android:paddingLeft="2dp"
android:background="#ff0000ff" android:orientation="vertical" >
<TextView android:id="#+id/time" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textColor="#ff555555"
android:text="sdfdsf s ada d a asd sad sad" />
</LinearLayout>
<LinearLayout android:layout_width="wrap_content"
android:layout_height="match_parent" android:orientation="vertical"
android:background="#ffff0000"
android:layout_weight="1" >
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textColor="#ff555555"
android:text="Row1" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textColor="#ff00ff00"
android:text="Row2" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textColor="#ff00ff00"
android:text="Row3" />
</LinearLayout>
</LinearLayout>
<?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" >
<LinearLayout
android:id="#+id/layout1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#FF0000">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="helloooooooooooooo" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toRightOf="#id/layout1"
android:background="#0000FF"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Row1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Row2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Row3" />
</LinearLayout>
</RelativeLayout>

Problem with View on change of device orientation

When I go to landscape mode, the bottom two buttons for my activity are not visible.The screen should have automatically converted into scrollable.Do I have to add something to my xml or manifest file?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Text in Hindi->"
/>
<TextView
style="#style/PassageStyle"
android:id="#+id/hindi"
android:textSize="30sp"
android:gravity="center"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Corresponding Text in English->"
/>
<TextView
style="#style/PassageStyle"
android:id="#+id/english"
android:textSize="30dip"
android:gravity="center"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="#+id/listen_Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="60dip"
android:text="#string/listen"
/>
<Button
android:id="#+id/slow_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Slow"
android:layout_marginLeft="30dip"
android:layout_toRightOf="#id/listen_Button"
android:layout_alignTop="#id/listen_Button"
/>
<Button
android:id="#+id/voice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/voice"
android:layout_alignLeft="#id/listen_Button"
android:layout_below="#id/listen_Button"
/>
<Button
android:id="#+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
android:layout_below="#id/slow_button"
android:layout_alignLeft="#id/slow_button"
/>
</RelativeLayout>
</LinearLayout>
Where do you define your ScrollView?
Try it like this:
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
... other stuff ...
</LinearLayout>
</ScrollView>
I have yet to use one, but this should work okay if you wrap the entire xml in a ScrollView.
http://developer.android.com/reference/android/widget/ScrollView.html
if you want that your screen scrollable , you should add a ScrollView as a root layout like this :
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_heigth="fill_parent"
android:layout_width="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Text in Hindi->"
/>
<TextView
style="#style/PassageStyle"
android:id="#+id/hindi"
android:textSize="30sp"
android:gravity="center"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Corresponding Text in English->"
/>
<TextView
style="#style/PassageStyle"
android:id="#+id/english"
android:textSize="30dip"
android:gravity="center"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="#+id/listen_Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="60dip"
android:text="#string/listen"
/>
<Button
android:id="#+id/slow_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Slow"
android:layout_marginLeft="30dip"
android:layout_toRightOf="#id/listen_Button"
android:layout_alignTop="#id/listen_Button"
/>
<Button
android:id="#+id/voice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/voice"
android:layout_alignLeft="#id/listen_Button"
android:layout_below="#id/listen_Button"
/>
<Button
android:id="#+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
android:layout_below="#id/slow_button"
android:layout_alignLeft="#id/slow_button"
/>
</RelativeLayout>
</LinearLayout>
</ScrollView>

Categories

Resources