긴 TextViews가 포함 된 ScrollView를 스크롤 할 때 이상한 문제가 발생합니다. 여기 내 XML 코드입니다 :ScrollView에서 TextView가 잘못 표시됩니다.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:paddingTop="6dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Welcome to My Application" />
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="#ff106510"
android:layout_marginLeft="6dip"
android:layout_marginRight="6dip"
android:layout_marginTop="6dip"
android:layout_marginBottom="12dip" />
<TextView
android:id="@+id/longText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:paddingBottom="6dip"
android:text="@string/hello"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/bottom_bar"
android:gravity="center_vertical">
<Button
android:layout_width="0dip"
android:layout_weight="1.0"
android:layout_height="wrap_content"
android:text="Accept" />
<Button
android:layout_width="0dip"
android:layout_weight="1.0"
android:layout_height="wrap_content"
android:text="Refuse" />
</LinearLayout>
</LinearLayout>
다음
내가 원하는 걸 얻었 :
하지만 스크롤 할 때 문제가 발생합니다
이 이제까지 일이 있었나요 당신? 나는 HTC 2.2 프로토 타입 인 SDK2.3.3의 에뮬레이터에서 테스트했는데, 이것은 항상 발생합니다. 왜 이런 일이 일어 났는지 말해 줄 수 있습니까?