小编And*_*dre的帖子

添加 android:textIsSelectable 导致 TextView 自动滚动

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <HorizontalScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/solutions"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:lineSpacingMultiplier="1.2"
            android:textAppearance="@style/TextAppearance.AppCompat"
            android:textIsSelectable="true"
            android:textSize="18sp"
            tools:text="1.  1+2+3 = 6"/>
    </HorizontalScrollView>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)

android:textIsSelectable="true"添加后TextViewTextView会自动滚动到底部。但是我不想要这种行为。

android scrollview textview android-studio

5
推荐指数
1
解决办法
483
查看次数

标签 统计

android ×1

android-studio ×1

scrollview ×1

textview ×1