Last week I put my app on github. In the process Android Studio suggested some changes to address warnings some of which I made. I also added a couple of features. This week I noticed that some of the layouts don't display correctly even though I didn't modify them. I even copied the source from a previous version of one layout and it still doesn't display correctly either in Android preview or the app. It seems the list views don't expand to the constraints.
Here's the before and after
The xml source is pretty long so I'm only showing the source for the list views.
<ListView
android:id="@+id/CardBoxes"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="12dp"
android:fastScrollAlwaysVisible="true"
android:fastScrollEnabled="true"
android:paddingRight="8dp"
android:scrollbarStyle="outsideOverlay"
app:layout_constraintBottom_toTopOf="@id/mergeIntoBox"
app:layout_constraintEnd_toStartOf="@id/CardSchedule"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/positioner" >
</ListView>
<ListView
android:id="@+id/CardSchedule"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="12dp"
android:fastScrollAlwaysVisible="true"
android:fastScrollEnabled="true"
android:paddingRight="8dp"
android:scrollbarStyle="outsideOverlay"
app:layout_constraintBottom_toTopOf="@id/mergeIntoBox"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/CardBoxes"
app:layout_constraintTop_toBottomOf="@+id/positioner" />
Question one is what configuration setting would prevent constraint view from working?
Question two is if I have to go back to a previous version how do I fix the github repository to match?
Last week I put my app on github. In the process Android Studio suggested some changes to address warnings some of which I made. I also added a couple of features. This week I noticed that some of the layouts don't display correctly even though I didn't modify them. I even copied the source from a previous version of one layout and it still doesn't display correctly either in Android preview or the app. It seems the list views don't expand to the constraints.
Here's the before and after
The xml source is pretty long so I'm only showing the source for the list views.
<ListView
android:id="@+id/CardBoxes"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="12dp"
android:fastScrollAlwaysVisible="true"
android:fastScrollEnabled="true"
android:paddingRight="8dp"
android:scrollbarStyle="outsideOverlay"
app:layout_constraintBottom_toTopOf="@id/mergeIntoBox"
app:layout_constraintEnd_toStartOf="@id/CardSchedule"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/positioner" >
</ListView>
<ListView
android:id="@+id/CardSchedule"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="12dp"
android:fastScrollAlwaysVisible="true"
android:fastScrollEnabled="true"
android:paddingRight="8dp"
android:scrollbarStyle="outsideOverlay"
app:layout_constraintBottom_toTopOf="@id/mergeIntoBox"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/CardBoxes"
app:layout_constraintTop_toBottomOf="@+id/positioner" />
Question one is what configuration setting would prevent constraint view from working?
Question two is if I have to go back to a previous version how do I fix the github repository to match?
I think I found the solution. I rebuilt the layout copying each control to the new layout with a few adjustments. It looked better but not as before. Then I noticed the properties layoutConstrainedHeight, L.C.Width had been set on one listview. When I set it on the other it snapped into place.
I believe the reason was I changed the targetSDK when putting it on GitHub and apparently the new property is required now.