Можно ли заблокировать прокрутку TextView на панели инструментов? - PullRequest
0 голосов
/ 15 апреля 2019

Я кодирую приложение для Android с простым видом. Я хотел бы, чтобы TextView оставался на вершине активности с прокруткой вверх. Поэтому я хотел бы скрыть ImageView, но с прокруткой вниз мой TextView должен оставаться на вершине.

ScrollView имеет внутри этого кода.

    <ImageView
        android:id="@+id/icon_single"
        android:layout_width="match_parent"
        android:layout_height="250sp"
        android:src="@drawable/icon"
        android:paddingTop="0dp"
        android:paddingBottom="0dp"
        android:cropToPadding="true"
        android:background="@color/colorPrimary"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:layout_gravity="center_vertical"
            android:padding="10sp">
            <TextView
                android:id="@+id/single_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
        </LinearLayout>
   </LinearLayout>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...