Scrollview에서 하나의 하위 만 호스팅 할 수 있다는 오류가 표시됩니다. 내가하려는 것은 전체 인터페이스가 스크롤하여 맨 위의 광고를 빼도록하는 것입니다. 이제는 선형 레이아웃에서 광고를 볼 수 있습니다. 스크롤 레이아웃은 그 안에 있습니다. scrollview 내부에는 또 다른 선형 레이아웃이 있으며 그 외 모든 것은 그 안에 있습니다. 나는 무엇을 해야할지를 놓치고 있습니다. 스크롤해야하는 광고가 정말로 필요하지만 스크롤 코드 안에 광고 코드를 넣어야한다면 그렇게 할 것입니다. 나는 그것을 발견 할 수 없지만 내가 원하는 것을 할 수있는 방법이 있다는 것을 확신한다. 더 이상 도움이 필요한 경우상단에 광고가 스크롤되지 않는 스크롤보기
여기이 완벽하게 작동 나를 위해
<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:orientation="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:orientation="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:onClick="dialogPop"
android:text="@string/EnterButtonText" />
</LinearLayout>
</ScrollView>
</LinearLayout>
작동하지 않는 기능은 무엇입니까? – nhaarman
ScrollView에는 자식이 하나만 있습니다 ...이 파일을 다시 저장하고 프로젝트를 정리하는 중입니다. – Sam
나는 그것을 시도 할 것이다. 스크롤 뷰를 좋아하지 않는 이유를 알 수는 없지만 한 번만 청소 해 보겠습니다. (비록 내가 올바르게 기억한다면, 나는 이것에 대해 작업하는 동안 어제 몇 번 프로젝트를 정리했다.) 당신이 화면에 나타나는 행동은 무엇입니까? (지금 당신의 포스트에서와 같이) 레이아웃이있는 – fauxfire76