Android 显示底部卡片卡片堆栈视图
我目前正在实现此库: 我想归档的是在单击卡片时显示底部的卡片,就像页面上的预览一样 这是代码。我不明白他们为什么不出现 XMLAndroid 显示底部卡片卡片堆栈视图,android,kotlin,Android,Kotlin,我目前正在实现此库: 我想归档的是在单击卡片时显示底部的卡片,就像页面上的预览一样 这是代码。我不明白他们为什么不出现 XML <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/background">
<include
android:id="@+id/topbar"
layout="@layout/topbar"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/no_history_message"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
style="@style/Title"
android:visibility="gone"
android:layout_margin="@dimen/view_default_big_space"
android:text="@string/no_history_message"/>
<com.loopeer.cardstack.CardStackView
android:id="@+id/history_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="100dp"
app:stackNumBottomShow="4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/topbar"
tools:listitem="@layout/item_estimation"/>
</androidx.constraintlayout.widget.ConstraintLayout>
在你的代码中,我看到你制作了
android:layout\u height=0
<com.loopeer.cardstack.CardStackView
android:id="@+id/history_list"
android:layout_width="match_parent"
**android:layout_height="0dp"**
android:layout_marginBottom="100dp"
app:stackNumBottomShow="4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/topbar"
tools:listitem="@layout/item_estimation"/>
但根据你的消息来源,我看到了这一点
<com.loopeer.cardstack.CardStackView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
我想这可能是问题所在,试着检查一下,看看
<com.loopeer.cardstack.CardStackView
android:layout_width="match_parent"
android:layout_height="match_parent"/>