@Chesterfield25

Как в ScrollView сделать один элемент без прокручивания вниз?

У меня есть ScrollView я хочу добавить рекламный LiearLayout в низу экрана что бы он не скролися вниз со всеми элементами как это сделать?

Вот моё активити

<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity"
    android:layout_below="@+id/ads_line"
    android:background="@color/blue_dark">



        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/scrollView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="50dp"
                android:fontFamily="@font/poppinsbold"
                android:gravity="center"
                android:text="@string/app_title"
                android:textColor="@color/white"
                android:textSize="25sp"
                android:textStyle="bold"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/description"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fontFamily="@font/poppinsmedium"
                android:gravity="center"
                android:layout_marginHorizontal="8dp"
                android:text="@string/description"
                android:textColor="@color/white"
                android:textSize="15sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/title" />

            <Button
                android:id="@+id/one"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:backgroundTint="@color/blue_light"
                android:text="Bitcoin"
                android:textColor="@color/white"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/description" />

        </androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>
  • Вопрос задан
  • 9 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы