- xml RemoteViews 방식의 위젯 구성 중에 컴포넌트를 통해 구분선을 만들려고 하는데, 빌드하고 나니 '위젯을 표시할 수 없습니다'라는 오류가 발생했다. - 이것은 같은 ViewGroup 계층이어도 RemoteViews에서 지원 가능한 View 종류가 한정되어 있기 때문이다. A class that describes a view hierarchy that can be displayed in another process. The hierarchy is inflated from a layout resource file, and this class provides some basic operations for modifying the content of the inflated hierarchy.R..
remoteviews

- 자사 서비스에서 신규 위젯을 추가하기로 했는데, 기존의 RemoteViews 방식이 아닌 Compose Glance 기반으로 위젯 구현을 진행해 봤다. - RemoteViews의 경우에는 XML 레이아웃을 조작해서 화면에 표시하는 방식이다. 클릭 이벤트는 PendingIntent로 처리 - Glance의 경우에는 Compose 기반인데, 백그라운드에서는 RemoteViews 기반이지만 개발자가 직접 코드로 다룰 필요가 없음. 가독성도 좋고 onClick 처리도 GlanceModifier를 통해 간단하지만 역시 위젯 특유의 제한 사항은 존재한다. - 먼저 아래 설정을 Gradle에 추가해 준다.implementation("androidx.glance:glance:1.1.1")implementation(..