Я перепробовал много комбинаций, но как получить мой горизонтальный просмотрщик переработчиков внизу с помощью кнопки выше, используя компоновку ограничений.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".FirstFragment"
android:orientation="vertical">
<Button
android:id="@+id/btn_add_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="horizontal"
android:scrollbars="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/btn_add_note"
tools:listitem="@layout/recyclerview_note">
</androidx.recyclerview.widget.RecyclerView>
</androidx.constraintlayout.widget.ConstraintLayout>
После этого я получаю ошибку рендеринга, говоря: .
java .lang.NoSuchMethodError: androidx.constraintlayout.solver. 1242) в androidx.constraintlayout.widget.ConstraintLayout.onMeasure_Original (ConstraintLayout. java: 1572) в androidx.constraintlayout.widget.ConstraintLayout.onMeasure (ConstraintLayout. java: - 1) в * 1013. * 1013. * 1013. measure_Original (View. java: 24552) в android .view.View_Delegate.measure (View_Delegate. java: 80) в android .view.View.measure (Просмотреть. java: 24516) в android .view.ViewGroup.measureChildWithMargins (ViewGroup. java: 6828) в android .widget.FrameLayout.onMeasure (FrameLayout. java: 194) в android .view.View.measure_Original (View. java: 2455 2) в android .view.View_Delegate.measure (View_Delegate. java: 80) в android .view.View.measure (View. java: 24516) в android .widget.RelativeLayout.measureChildHorizontal (RelativeLayout. java: 735) в android .widget.RelativeLayout.onMeasure (RelativeLayout. java: 481) в android .view.View.measure_Original (Просмотреть. java: 24552) в android .view.View_Delegate.measure (View_Delegate. java: 80) в android .view.View.measure (View. java: 24516) в android .view.ViewGroup.measureChildWithMargins (ViewGroup. * 1040) *: 6828) в android .widget.FrameLayout.onMeasure (FrameLayout. java: 194) в android .view.View.measure_Original (Просмотреть. java: 24552) в android .view.View_Delegate .measure (View_Delegate. java: 80) в android .view.View.measure (View. java: 24516)