Android Styling: Themes vs Styles

Android Styling: common theme attributes

Android Styling: prefer theme attributes

Android Styling: themes overlay

Developing themes with style (Android Dev Summit '19)

Android Styling: Themes vs Styles

Theme ≠ Style

둘다 <style> 로 정의되지만 다른 목적으로 사용된다.

둘다 key-value map으로 생각할 수 있다.

Style?

Map<View Attribute, Resource>로 생각할 수 있다.

View Attribute: Widget이 정의했거나, 레이아웃 파일에서 set할 수 있는 속성

단일 Widget에게 적용된다. (다른 Widget은 다른 View Attrs를 지원하기에)

<aside> 💡 Styles are a collection of view attributes; specific to a single type of widget

</aside>

<aside> 💡 Views can only apply a single style

</aside>

자식에게 전달되지 않는다.

Theme?

다양한 곳에서 참조되어 사용될 수 있는 Named Resource 모임 → Theme Attribute