Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Advanced Android: [Lesson 03.1][Step 2.1][ToptoBottom Constraint on Textview is wrong] #43

Open
RAdhyapak opened this issue Oct 13, 2022 · 1 comment

Comments

@RAdhyapak
Copy link

RAdhyapak commented Oct 13, 2022

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

  1. What version of Android Studio are you using?
    Android Studio ChipMunk | 2021.2.1 Patch 2

  2. What API level are you targeting?
    minSdk 26
    targetSdk 32

codelab: advanced-android

@RAdhyapak
Copy link
Author

RAdhyapak commented Oct 13, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant