Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.33 KB

README.md

File metadata and controls

27 lines (20 loc) · 1.33 KB

キャプチャ ピクセル 3a API 29 (OS version 10)

light theme dark

Button color customize (light and dark theme)

手順1:自分の好きな色を定義する

color.xmlに以下のような感じでカラーコードを定義する
https://github.com/LeoAndo/AndroidM2ButtonJavaDemo/blob/master/app/src/main/res/values/colors.xml#L11-L12

手順2:アプリで使うボタンの色を一括で変更する方法

light theme
https://github.com/LeoAndo/AndroidM2ButtonJavaDemo/blob/master/app/src/main/res/values/themes.xml#L5
dark theme
https://github.com/LeoAndo/AndroidM2ButtonJavaDemo/blob/master/app/src/main/res/values-night/themes.xml#L5

手順3:部分的にボタンの色を変える方法