This makes no sense. I have some code that has a simple LinearLayout and inside it there is a TextView and a ScrollView and inside the ScrollView there is a button. Well when I add the second button I get an error saying that ScrollView can only have one child. Is a Button considered a different child??? I’m sorry for my stupidity if this is really simple. If anyone can help THANKS!
<?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:duplicateParentState="false"
android:fadeScrollbars="true"
android:gravity="center"
android:isScrollContainer="true"
android:orientation="vertical"
android:scrollbars="vertical">
<TextView
android:text="Select category:"
android:textStyle="italic"
android:textColor="#000000"
android:textSize="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ScrollView
android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fadingEdgeLength="100dp">
<Button
android:id="@+id/Food"
android:layout_width="175dp"
android:layout_height="65dp"
android:layout_gravity="center"
android:gravity="center"
android:background="@drawable/blackbutton"
android:text="Food"
android:textColor="#ffffff" />
<Button
android:id="@+id/Clothing"
android:layout_width="175dp"
android:layout_height="65dp"
android:layout_gravity="center"
android:gravity="center"
android:background="@drawable/blackbutton"
android:text="Clothing"
android:textColor="#ffffff" />
</ScrollView>
</LinearLayout>
ScrollView must have 1 child. So put the two buttons inside a layout.