1.
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
android:theme="@style/Theme.MaterialComponents.Light"
app:cardElevation="8dp">
2.
AndroidManifest.xml 이동
해당 View를 사용하는 Activity의 theme가 MaterialComponents를 사용하는 지 체크
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
변경 ->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
'안드로이드' 카테고리의 다른 글
[안드로이드] 화면 사이즈 구하기 (0) | 2021.04.12 |
---|---|
[안드로이드] 자동 백업 막기 (0) | 2021.03.18 |
안드로이드 Error msg : java.lang.IllegalStateException: commit already called (0) | 2021.01.11 |
안드로이드 Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 에러 해결 (0) | 2020.08.21 |
EditText 키보드 완료 버튼 이벤트 - Kotlin (0) | 2020.06.30 |