<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
tools:backgroundTint="#ff00ffff">
<View
android:id="@+id/spc_core_t"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#ff00ff00"
app:layout_constraintBottom_toTopOf="@+id/spc_core"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="1" />
<View
android:id="@+id/spc_core_b"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#ff0000ff"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spc_core"
app:layout_constraintVertical_weight="1" />
<View
android:id="@+id/spc_core"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:background="#ffff0000"
app:layout_constraintBottom_toTopOf="@+id/spc_core_b"
app:layout_constraintTop_toBottomOf="@+id/spc_core_t"
app:layout_constraintVertical_weight="6" />
</android.support.constraint.ConstraintLayout>
- This is my code, but it doesn't displayed.
- When I changed
app:layout_constraintVertical_weight
to other value, all is OK. - And I tried other combination, all 1:6:1, 2:12:2, and so on are didn't work, too.
- My present temporary solution is change 6 to 6.00001
But now I wonder know why this happened.