Scrollview with an ad on top that doesn't scroll

cian1500ww

New Member
I'm getting an error saying that Scrollview can only host one child. What I'm trying to do is make it so that the entire interface scrolls minus the ad at the top. So as it stands now I've got the ad showing up in a linear layout, with the scrollview inside that. Inside the scrollview is another linear layout and everything else is inside that one. I'm at a loss as to what to do. I really need the ad to not scroll but if I have to put the ad code inside the scrollview I will. I'm just pretty certain there's a way to do what I want though I can't find it.Here's my xml layout...\[code\]<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"android:id="@+id/AdLinearLayout"android:layout_width="fill_parent"android:layout_height="fill_parent"android:eek:rientation="vertical" ><!-- Ad Placeholder --><com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adSize="BANNER" ads:adUnitId="a15138b1a7adad2" ads:loadAdOnCreate="true" /><ScrollView android:id="@+id/BaseScrollView" android:layout_width="match_parent" android:layout_height="wrap_content" > <LinearLayout android:id="@+id/baseVerticalLinearLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:eek:rientation="vertical" > <LinearLayout android:id="@+id/LinearLayoutH1" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView1" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="left" android:text="@string/Sad" /> <TextView android:id="@+id/textView2" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="@string/Happy" /> </LinearLayout> <SeekBar android:id="@+id/happinessBarID" android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="@integer/SliderMax" android:progress="@integer/SliderDefault" /> <LinearLayout android:id="@+id/LinearLayoutH2" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView3" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="left" android:text="@string/Tired" /> <TextView android:id="@+id/textView4" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="@string/Awake" /> </LinearLayout> <SeekBar android:id="@+id/energyBarID" android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="@integer/SliderMax" android:progress="@integer/SliderDefault" /> <LinearLayout android:id="@+id/LinearLayoutH3" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView5" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="left" android:text="@string/Calm" /> <TextView android:id="@+id/textView6" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="@string/Anxious" /> </LinearLayout> <SeekBar android:id="@+id/anxietyBarID" android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="@integer/SliderMax" android:progress="@integer/SliderDefault" /> <LinearLayout android:id="@+id/LinearLayoutH4" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:id="@+id/textView7" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="left" android:text="@string/No_Pain" /> <TextView android:id="@+id/textView8" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="right" android:text="@string/Max_Pain" /> </LinearLayout> <SeekBar android:id="@+id/painBarID" android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="@integer/SliderMax" android:progress="@integer/SliderDefault" /> <DatePicker android:id="@+id/datePicker1" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TimePicker android:id="@+id/timePicker1" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <EditText android:id="@+id/noteTextFieldID" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="@string/Note_Hint" android:inputType="textMultiLine" android:maxLength="@integer/NoteLimit" /> <Button android:id="@+id/enterButtonID" android:layout_width="132dp" android:layout_height="wrap_content" android:gravity="center" android:eek:nClick="dialogPop" android:text="@string/EnterButtonText" /> </LinearLayout></ScrollView></LinearLayout>\[/code\]
 
Top