Android 12부터 위젯은 버튼, 배경, 기타 구성요소에 기기 테마 색상을 사용할 수 있습니다. 이렇게 하면 다양한 위젯, 홈 화면 아이콘, 배경화면에서 시각적 일관성이 유지되어 Android 사용자에게 더 일관된 사용자 환경을 제공할 수 있습니다. 제공된 색상 토큰을 사용하면 다양한 기기 제조업체에서 제공하는 기기 테마와 사용자가 설정한 동적 테마에서 위젯이 통합된 것처럼 보입니다.
그림 1: 색상 토큰이 표시된 위젯 이미지
밝은 모드 및 어두운 모드
어두운 모드는 대부분 어두운 노출 영역 색상을 표시하는 기기 UI의 저조도 버전입니다. 배터리 수명과 눈의 편안함을 위해 어두운 모드로 전환하는 사용자가 점점 늘어나고 있습니다. 위젯이 어두운 모드에 맞게 조정되지 않으면 위젯이 제자리에 있지 않아 사용자에게 불편을 줄 수 있습니다.
그림 2: 왼쪽 화면의 위젯은 밝은 모드이고 오른쪽 화면의 위젯은 어두운 모드입니다.
서체
서체는 글을 읽기 쉽고 아름답게 만드는 데 도움이 됩니다. 글꼴 크기와 두께를 활용하여 명확한 계층 구조를 설정하여 사용자의 눈길을 가장 중요한 요소로 유도합니다. 특히 위젯의 제한된 공간 내에서 더 작은 텍스트를 표시할 때는 가독성을 높이기 위해 줄 간격과 글자 간격 (커닝)에 주의하세요.
계층 구조
계층 구조는 글꼴 두께, 크기, 선 높이, 문자 간격의 차이를 통해 커뮤니케이션됩니다. 업데이트된 서체 스케일은 텍스트 스타일을 5가지 역할로 구분하는데, 각 역할은 용도를 설명하는 이름을 갖습니다. 5가지 텍스트 스타일은 디스플레이, 헤드라인, 제목, 자막, 본문입니다. 새로운 역할은 기기 제약이 없기 때문에 다양한 사용 사례에 손쉽게 적용할 수 있습니다.
그림 3: 다양한 유형 눈금의 사용을 보여주는 위젯입니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Style\n\nStyling widgets effectively is crucial for achieving a visually appealing and\nconsistent user experience. This section delves into the key concepts and\ntechniques for defining the color and typography to create the most helpful\nand engaging Android widgets.\n\nColor\n-----\n\nUse color to express style and communicate meaning. Setting appropriate colors\nfor your widget colors are crucial for legibility, personalization, and of\ncourse expressing your app's brand identity.\n\nUse Material color roles and tokens to fulfill accessibility contrast guidelines\nand support dynamic color features, such as user-generated color and dark or\nlight themes.\n\nFor more information see the [Material Design Color guidance](https://m3.material.io/styles/color/system/overview).\n\nShape\n-----\n\nThe shape of your widget sets the mood of your widget. For rectangular widgets,\nuse the [system corner radius property](/reference/android/R.dimen#system_app_widget_background_radius). This property creates consistency\nacross different devices and helps prevent widget content from being clipped.\n\nFor more details, see [Implement rounded corners](/develop/ui/views/appwidgets#rounded-corner).\n\nDynamic themes\n--------------\n\nStarting in Android 12, a widget can use the device theme colors for buttons,\nbackgrounds, and other components. This provides visual consistency across\ndifferent widgets, home screen icons, and wallpapers, offering Android users a\nmore cohesive user experience. Using the provided color tokens ensures your\nwidget will look integrated across device themes provided by different device\nmanufacturers and the dynamic themes set by the user.\n**Figure 1:** Image of a widget with color tokens called out.\n\nLight and dark mode\n-------------------\n\nA dark mode is a low-light version of the device UI that displays mostly dark\nsurface colors. Users are increasingly switching to dark mode for better\nbattery life and eye comfort. If your widget doesn't adapt to dark mode, it\nwill appear out of place and could potentially frustrate users.\n**Figure 2:** A widget in light mode on the left screen and dark on the right.\n\nTypography\n----------\n\nTypography helps make writing legible and beautiful. Utilize font sizes and\nweights to establish a clear hierarchy, guiding the user's eye to the most\nimportant elements. Pay attention to line spacing and letter spacing (kerning)\nto improve readability, especially for smaller text displays within the\nrestricted space of a widget.\n\n### Hierarchy\n\nHierarchy is communicated through differences in font weight, size, line height,\nand letter spacing. The updated type scale organizes text styles into five roles\nthat are named to describe their purposes. The five text styles are display,\nheadline, title, subtitle and body. The new roles are device-agnostic, allowing\neasier application across a variety of use cases.\n**Figure 3:** A widget showing the use of different type scales."]]