Я работаю над приложением android, и у меня есть корзина, в которой есть несколько строк товаров, а затем общая корзина и кнопка для продолжения.
У этого макета есть верхняя и нижняя панели, а затем Scrollview. иметь linearLayout в качестве дочернего элемента ...
Этот дочерний элемент содержит:
- Recyclerview
- Текстовые поля
- Кнопка
Моя проблема: я не могу прокрутить до последнего элемента в моем макете (Кнопка).
Это мой xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_alignParentTop="true">
<ImageView
android:id="@+id/ProgressBar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:src="@drawable/progress_rec"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/overview_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/backgroudn"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/tt"
>
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "70dp"
android:elevation="12dp"
android:padding="8dp"
android:background="@drawable/white_action_bar"
android:id="@+id/first"
android:orientation="horizontal"
android:weightSum="1">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:elevation="12dp"
android:id="@+id/btnActionBar11"
android:drawableStart="@drawable/ic_arrow_back_black_24dp"
android:drawableLeft="@drawable/ic_arrow_back_black_24dp"
android:drawablePadding="8dp"
android:drawableTint="@color/colorPrimaryDark"
android:padding="8dp"
android:background="@android:color/transparent"
android:layout_weight="0.2" />
<TextView
android:layout_width = "0dp"
android:layout_height = "wrap_content"
android:gravity="center"
android:textSize="14sp"
android:padding="8dp"
android:text="@string/cart"
android:layout_marginTop="8dp"
android:id="@+id/tvActionBar"
android:textColor="@color/colorPrimaryDark"
android:layout_weight="0.5"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:id="@+id/btnActionBarEnd11"
android:padding="8dp"
android:drawableEnd="@drawable/ic_shopping_cart_black_24dp"
android:drawableRight="@drawable/ic_shopping_cart_black_24dp"
android:drawablePadding="8dp"
android:drawableTint="@color/colorPrimaryDark"
android:textColor="@color/colorPrimaryDark"
android:background="@android:color/transparent"
android:layout_weight="0.3"
android:textSize="12sp"
android:visibility="gone"/>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:layout_below="@+id/first">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/no_data"
android:text="@string/no_data"
android:textSize="24sp"
android:textAlignment="center"
android:gravity="center"
android:textColor="@color/colorPrimary"
android:visibility="gone"/>
<ProgressBar
android:foregroundGravity="center"
android:id="@+id/progress"
android:layout_below="@+id/no_data"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@android:color/transparent"
android:layout_gravity="center"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/cartContentList"
android:layoutAnimation="@anim/layout_animation"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp"
android:weightSum="1"
android:id="@+id/totalLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="1"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:text="@string/total"
android:textSize="@dimen/medium"
android:textColor="@color/colorPrimaryDark"
android:gravity="center"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:text="@string/zero_dollar"
android:textSize="@dimen/medium"
android:textColor="@color/colorPrimaryDark"
android:gravity="center"
android:id="@+id/tvTotal"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@drawable/round_button"
android:text="@string/continue_"
android:textColor="@color/white"
android:textSize="@dimen/medium"
android:layout_margin="8dp"
android:padding="8dp"
android:gravity="center"
android:id="@+id/btnContinue" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:paddingTop="8dp"
android:id="@+id/any"
android:background="@drawable/white_menu_bar"
android:layout_alignParentBottom="true"
android:elevation="24dp">
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "40dp"
android:elevation="12dp"
android:padding="2dp"
android:id="@+id/end"
android:orientation="horizontal"
android:weightSum="1"
android:gravity="center_horizontal">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@android:color/transparent"
android:drawableTop="@drawable/home_1"
android:layout_margin="8dp"
android:gravity="center"
android:layout_gravity="center"
android:textColor="@color/colorPrimaryDark"
android:paddingEnd="15dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@android:color/transparent"
android:textColor="@color/colorPrimaryDark"
android:gravity="center"
android:layout_gravity="center"
android:id="@+id/btnMyOrder"
android:drawableTop="@drawable/my_orders_1"
android:layout_margin="8dp"
android:paddingEnd="15dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@android:color/transparent"
android:textColor="@color/colorPrimaryDark"
android:gravity="center"
android:layout_gravity="center"
android:drawableTop="@drawable/notifications_1"
android:layout_margin="8dp"
android:paddingEnd="18dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="@android:color/transparent"
android:drawableTop="@drawable/side_menu_1"
android:layout_marginTop="8dp"
android:drawableTint="@color/colorPrimaryDark"
android:layout_gravity="center"
android:paddingEnd="15dp"/>
</LinearLayout>
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "20dp"
android:elevation="12dp"
android:id="@+id/end1"
android:orientation="horizontal"
android:weightSum="1"
android:gravity="center_horizontal">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="@+id/gr1Home1"
android:drawableTop="@drawable/component1"
android:background="@android:color/transparent"
android:layout_weight="0.25"
android:paddingTop="8dp"
android:drawablePadding="15dp"
android:visibility="visible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="@+id/gr2Notification1"
android:drawableTop="@drawable/component1"
android:background="@android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="@+id/gr3Message1"
android:drawableTop="@drawable/component1"
android:background="@android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="@+id/gr4Calender1"
android:drawableTop="@drawable/component1"
android:background="@android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
.