google-developer-training/android-basics-kotlin-tip-calculator-app-solution

Android Basics: xml-layouts

peekul opened this issue · 0 comments

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-xml-layouts?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-development-with-kotlin-5%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-xml-layouts#7

In which task and step of the codelab can this issue be found?
When it was time to build and review the emulator, I could not build because of two layout errors related to "wrap_content"

Describe the problem
I couldn't use "wrap_content" and had to specify a width to overcome a layout error.
<EditText
android:id="@+id/cost_of_service"
android:layout_width="160dp"
android:layout_height="50dp" <THIS WAS "wrap_content">
android:hint="@string/cost_of_service"
android:inputType="numberDecimal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.