Ich habe eine vertikale LinearLayout
innerhalb einer ScrollView
. Alles war in Ordnung bis zur Einstellung der dritten TextView
in LinearLayout
selectable
.ScrollView automatisch scrollt auf wählbar TextView
Nach dieser Änderung scrollt es automatisch zum dritten TextView.
Was kann das Problem verursachen?
Vor und nach die Änderung:
das Layout
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/roota_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="right"
android:orientation="vertical" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.saliherikci.poemnotebook.ReadPoemActivity$PlaceholderFragment" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false"
android:orientation="vertical" >
<TextView
android:id="@+id/poemTitleTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Çanakkale Şehitlerine"
android:textColor="@color/poem_title"
android:textSize="24dp" />
<TextView
android:id="@+id/poemAuthorTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Mehmet Akif ERSOY"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="11dp" />
<TextView
android:id="@+id/poemContentTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Şu Boğaz harbi nedir? Var mı ki dünyâda eşi? "
android:textColor="@color/poem_content"
android:textIsSelectable="true"
android:textSize="10dp" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/fontSizeView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:background="@color/font_size_background"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingTop="5dp"
android:visibility="invisible" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:text="YAZI BOYUTU"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#1a1a1a"
android:textSize="8dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:layout_marginTop="5dp"
android:dividerPadding="5dp"
android:orientation="horizontal"
android:showDividers="middle" >
<ImageButton
android:id="@+id/font_size_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@null"
android:src="@drawable/ic_font_size_black_1_active" />
<ImageButton
android:id="@+id/font_size_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="20dp"
android:background="@null"
android:src="@drawable/ic_font_size_black_2_inactive" />
<ImageButton
android:id="@+id/font_size_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="20dp"
android:background="@null"
android:src="@drawable/ic_font_size_black_3_inactive" />
<ImageButton
android:id="@+id/font_size_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="20dp"
android:background="@null"
android:src="@drawable/ic_font_size_black_4_inactive" />
<ImageButton
android:id="@+id/font_size_5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:background="@null"
android:src="@drawable/ic_font_size_black_5_inactive" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
können Sie ausdrucken, was in Ihrem Layout XML-Datei ist? –
Ich habe in Ihrem Layout-XML keine ScrollView gesehen. Haben Sie die ScrollView programmgesteuert hinzugefügt? –
Hat den Code bearbeitet. –