Slide 1

Slide 1 text

Sansan Androidʹ ͓͚Δ৭ͷ؅ཧ 2019/03/05 (Tue) Mobile Engineer Meetup by Sansan Keisuke Yamaguchi (@phicdy)

Slide 2

Slide 2 text

ࣗݾ঺հ ɾKeisuke Yamaguchi ɾ phicdy ɾSansan, Inc. ɾAndroid application engineer for Sansan ɾCoffee / Cat

Slide 3

Slide 3 text

৭ͷ؅ཧͲ͏ͯ͠·͔͢ʁ

Slide 4

Slide 4 text

AndroidΞϓϦʹ͓͚Δ৭ͷ؅ཧ ɾcolors.xml ɾstyles.xml ɾthemes.xml ɾlayout/*.xml ɾdrawable/*.xml

Slide 5

Slide 5 text

ҎલͷSansan Androidͷ৭؅ཧ colors.xml styles.xml themes.xml layout/*.xml color A color B color C text color A component color A style A theme A View A color A View B ɾɾ ɾɾ ɾɾ ɾɾ ɾɾ ɾɾ

Slide 6

Slide 6 text

ҎલͷSansan Androidͷ৭؅ཧ colors.xml styles.xml themes.xml layout/*.xml color A color B style A theme A View A color A View B ɾɾ ɾɾ ɾɾ color C text color A component color A ɾɾ ɾɾ ಉ৭ͷఆ͕ٛ͋ΓɺͲΕΛ ࢖͑͹͍͍͔ෆ໌ ఆ͕ٛͳ͍ͱ͖ Ͳ͏௥Ճ͢Ε͹͍͍͔ෆ໌ ɾɾ

Slide 7

Slide 7 text

ҎલͷSansan Androidͷ৭؅ཧ colors.xml styles.xml themes.xml layout/*.xml color A color B color C text color A component color A style A theme A View A ɾɾ ɾɾ ɾɾ ɾɾ ɾɾ color A View B ɾɾ ৭Λ௚ࢦఆ͍ͯͯ͠ มߋ࣌ʹ࿙ΕΔ

Slide 8

Slide 8 text

ҎલͷSansan Androidͷ৭؅ཧ colors.xml styles.xml themes.xml layout/*.xml color A color B color C text color A component color A style A theme A View A color A View B ɾɾ ɾɾ ɾɾ ɾɾ ɾɾ ɾɾ σβΠφʔͷࢦఆʢΧϥʔίʔυɺঢ়ଶͳͲʣ ͔ΒDPMPSTYNMͷOBNFΛ૝૾Ͱ͖ͳ͍

Slide 9

Slide 9 text

ཧ૝ ɾcolors.xmlʹಉ৭ͷఆ͕ٛͳ͘ɺͲΕΛ࢖͑͹ ͍͍͔໌֬ ɾ৽͍͠৭ΛͲ͏௥Ճ͢Δ͔໌֬ ɾcolors.xmlҎ֎ͷ৭͕ͳ͘มߋ࣌ʹ࿙Ε͕ͳ͍ ɾσβΠφʔͷࢦఆʢΧϥʔίʔυɺঢ়ଶͳͲʣ ͔Βcolors.xmlͷname͕Θ͔Δ

Slide 10

Slide 10 text

৽ํ਑ΛܾΊΔ ɾcolors.xmlΛ୯ͳΔΧϥʔύϨοτͱ͢Δ ɾΞϓϦશମʹؔ͢Δ৭ΛthemeͰࢦఆ ɾ֤ը໘Ͱ৭Λ࢖͏ͱ͖͸layout͔Βstyleܦ༝Ͱ ࢦఆ ɾtheme/style/layout͔Βͷ৭ͷ௚ࢦఆΛېࢭ ɾ৭Λ௥Ճ͢Δͱ໋໊͖نଇʹै͏

Slide 11

Slide 11 text

໋໊نଇ ෼ྨ ໋໊نଇ ྫ ୯৭ <৭> black Sansanݻ༗ͷ৭ sansan_<৭> sansan_blue sansan_passion_red ෳ਺ͷೱ͕͋͞Δ৭ <৭>_<Χϥʔίʔυ> gray_757575 gray_bdbdbd ಛఆͷঢ়ଶͷΈͰ ࢖ΘΕΔ৭ <৭>_state_<ঢ়ଶ> gray_state_disabled ಛఆͷՕॴͷΈͰ ࢖ΘΕΔ৭ <৭>_<࢖༻Օॴ> green_company_news blue_tag_background

Slide 12

Slide 12 text

վળޙͷSansan Androidͷ৭؅ཧ colors.xml styles.xml themes.xml layout/*.xml color A color B color C color Z style A theme A View A View B ɾɾ ɾɾ ɾɾ ɾɾ

Slide 13

Slide 13 text

ͦͷଞͷվળ ɾΞΠίϯͷvector drawableԽ ɾෳ਺ը໘Ͱڞ௨ͷ෦෼ͷstyleԽ ɾRipple effectͷڞ௨Խ ɾந৅తͳڞ௨ϨΠΞ΢τͷ෼཭ ɾConstraintLayoutԽ

Slide 14

Slide 14 text

·ͩ·ͩվળ఺͕͋Δ ɾಛఆͷঢ়ଶ/ՕॴͷΈͰ࢖ΘΕΔ৭΋ <৭>_<Χϥʔίʔυ>Ͱྑ͍ͷͰ͸ʁ ɾ1ը໘1ViewͰ͔͠࢖ΘΕͳ͍΋ͷ΋styleʹ ੾Γग़͢ʁ ɾstyleϑΝΠϧ෼͚Δʁ ɾtheme/styleͷ໋໊نଇʁ