티스토리 뷰

반응형

상황 : ExtendedFloatingActionButton 을 적용하려고 하니, 다음과 같은 에러가 발생하였다.

 

발생 원인 : ExtendedFloatingActionButton은 MaterialComponent의 구성요소에 포함된다. 그렇기 때문에, ExtendedFloatingActionButton을 사용하려면, Theme 또한 MaterialComponent에서 가져와야 한다. 

그런데 내가 적용하고 있는 Theme는 AppCompact 이면서, MaterialComponent에 있는 요소를 사용하려니깐 안되는 것이었다. 

 

해결방법 : Theme.AppCompat ->Theme.MaterialComponents 로 변경한다.

 

[ Theme.MaterialComponents를 상속받는 것을 확인할 수 있는 부분 캡처 ]

 

* Material Design을 적용하기 위한 사이트

material.io/develop/android/components/floating-action-button

 

Material Design

Build beautiful, usable products faster. Material Design is an adaptable system—backed by open-source code—that helps teams build high quality digital experiences.

material.io

 

반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
글 보관함