🖥 Programming/📱 Android (Kotlin)
[Android] Button 그림자 제거 방법
MinChan-Youn
2023. 2. 14. 20:00
안녕하세요~ 챠니입니다! :)
이번에는 Button에서 그림자를 제거하는 방법에 대해서 알아보도록 하겠습니다.
Button 그림자 제거 방법
방법 1) Style 수정
Button에 style을 추가하여 그림자를 제거하는 방법이 있습니다.
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="버튼 그림자 제거"
style="?android:attr/borderlessButtonStyle" />
방법 2) android 코드 추가
이번에는 android 코드를 추가하여 수정하는 방법입니다.
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="버튼 그림자 제거"
android:stateListAnimator="@null" />
참고문서
https://developer.android.com/guide/topics/ui/controls/button?hl=ko
버튼 | Android 개발자 | Android Developers
버튼 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요. 버튼은 사용자가 터치할 때 어떤 작업이 발생하는지 알려주는 텍스트나 아이콘, 또는 텍스트와 아이콘
developer.android.com
다음 Android Developer 홈페이지에 자세한 내용이 나와있으므로 참고하시면 되겠습니다.
질문 또는 궁굼한 부분은 댓글을 남겨주세요! 친절하게 답변드리겠습니다!
응원의 댓글은 저에게 큰 힘이 된답니다! :)
즐거운 하루되세요!
깃허브 보러 놀러오세요 👇 (맞팔환영)
https://github.com/younminchan
younminchan - Overview
안드로이드 2년차 개발자 •⚽️/🎤/🥁/🖥/🏃♂️/🚴♂️/🤟 TechBlog⬇️ minchanyoun.tistory.com - younminchan
github.com