Can someone please help, I cant get this simple scolling feature

Posted by localgamer on Stack Overflow See other posts from Stack Overflow or by localgamer
Published on 2010-04-22T00:04:34Z Indexed on 2010/04/22 7:03 UTC
Read the original article Hit count: 505

Filed under:

I want to be able to have many button and objects in my project but they all wont fit on the screen at once so i would like the user to be able to scroll down and have more appear but i cant get it to work. I tried using ScrollView but it always throws me errors. Here is what I have so far. Please, any help would be great.

<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout


android:id="@+id/widget0"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

xmlns:android="http://schemas.android.com/apk/res/android"
>

<TextView

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="Hello World, tipcalc"
/>
<TextView

android:id="@+id/widget28"

android:layout_width="99px"

android:layout_height="17px"

android:text="Monthly Income"

android:layout_x="40px"

android:layout_y="32px"

>

</TextView>

<TextView

android:id="@+id/widget29"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Cable"

android:layout_x="40px"

android:layout_y="82px"

>

</TextView>

<TextView

android:id="@+id/widget30"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Internet"

android:layout_x="40px"

android:layout_y="132px"

>

</TextView>





<TextView

android:id="@+id/widget33"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Total To Pay"

android:layout_x="40px"

android:layout_y="302px"

>

</TextView>

<Button

android:id="@+id/btncalculate"

android:layout_width="87px"

android:layout_height="wrap_content"

android:text="Calculate"

android:layout_x="40px"

android:layout_y="182px"

>

</Button>

<Button

android:id="@+id/btnreset"

android:layout_width="86px"

android:layout_height="wrap_content"

android:text="Reset"

android:layout_x="140px"

android:layout_y="182px"

>

</Button>

<EditText

android:id="@+id/Monthly"

android:layout_width="wrap_content"

android:layout_height="35px"

android:text="100"

android:textSize="18sp"

android:layout_x="200px"

android:layout_y="22px"

>

</EditText>

<EditText

android:id="@+id/Internet"

android:layout_width="51px"

android:layout_height="36px"

android:text="10"

android:textSize="18sp"

android:layout_x="200px"

android:layout_y="72px"

>

</EditText>

<EditText

android:id="@+id/Cable"

android:layout_width="wrap_content"

android:layout_height="39px"

android:text="1"

android:textSize="18sp"

android:layout_x="200px"

android:layout_y="122px"

>

</EditText>


<TextView

android:id="@+id/txttotal"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text=""

android:layout_x="200px"

android:layout_y="302px"

>
</TextView>


</AbsoluteLayout>

© Stack Overflow or respective owner

Related posts about android