-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
<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
Metadata
Metadata
Assignees
Labels
No labels