Advanced Android: [Lesson 03.1][Step 2.1][ToptoBottom Constraint on Textview is wrong]
Opened this issue · 1 comments
Describe the problem
On Lesson 03.1(SensorListeners), step 2.1, we are asked to delete the previously added ScrollView and TextViews, and add a TextView in its place. One of the constraints on this new textView is:
app:layout_constraintTop_toBottomOf | "parent"
This causes the textView to align to the bottom of the Constraint Layout causing it to go off the layout screen.
Instead, this constraints should be:
app:layout_constraintTop_toTopOf="parent"
In which lesson and step of the codelab can this issue be found?
Lesson 03.1, Step 2.1
How to reproduce?
Just follow the steps of the exercise.
Versions
-
What version of Android Studio are you using?
Android Studio ChipMunk | 2021.2.1 Patch 2 -
What API level are you targeting?
minSdk 26
targetSdk 32
codelab: advanced-android
On further checking.. it seems the issue might be due to version mismatch. The solution code provided seems to be using an older form of constraint layout versus what I am using:
android.support.constraint.ConstraintLayout
v/s
androidx.constraintlayout.widget.ConstraintLayout