Closed asker517 closed 1 year ago
<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" > <FrameLayout android:id="@+id/layoutTest" android:layout_width="match_parent" android:layout_height="0dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="show content" android:textColor="@color/cardview_dark_background" /> </FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>
如上指定显示state区域contentView 为layoutTest,如果android:layout_height="0dp"调用showContentView(),实际内容并不能被正确显示出来,此时最终的layoutTest...height就为0了... @DylanCaiCoding
layoutTest
android:layout_height="0dp"
showContentView()
抱歉,之前处理过这个问题了,没想到上个版本优化代码时有个地方敲错。你改成下面的快照依赖看下还有没问题,没问题的话我就发个正式版。
implementation 'com.github.DylanCaiCoding.LoadingStateView:loadingstateview:master-SNAPSHOT'
已发 4.0.2 版本修复该问题。
如上指定显示state区域contentView 为
layoutTest
,如果android:layout_height="0dp"
调用showContentView()
,实际内容并不能被正确显示出来,此时最终的layoutTest...height就为0了... @DylanCaiCoding