Cześć.
Chciałem stworzyć pole editTekst za pomocą Material Design. Gdy zgodnie z dokumentacja dodaje fragment kodu
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/outlinedTextField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/label"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
to kompilacja kończy się błędem i nie uruchamia się program. Metodą prób i błędów doszedłem do wniosku, że problem robi wiersz:
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
który powoduje zmianę stylu pola TextInputLayput z Filled text field na Outlined text field. Jeśli usunę w/w wiersz kodu to wszystko działa lecz zależy mi na design Outlined text field. Moja wielka prośba do was jak mam sobie poradzić z błędem. Dodam tylko, że apka pisana jest w Kotlinie a w dependencies dodaje
implementation 'com.google.android.material:material:1.2.1'