본문 바로가기
Android

Android Widget 만들기

by kkong93 2023. 5. 27.
반응형

https://developer.android.com/develop/ui/views/appwidgets/overview

 

App widgets overview  |  Android Developers

App widgets overview Stay organized with collections Save and categorize content based on your preferences. Widgets are an essential aspect of home screen customization. You can think of them as "at-a-glance" views of an app's most important data and funct

developer.android.com

 

  • Layout considerations

It's tempting to lay out your widgets according to the dimensions of the placement grid of a device that you develop with. This can be a useful initial approximation, but keep the following points in mind:

  • Planning your widget resizing strategy across "size buckets" rather than variable grid dimensions gives you the most reliable results.
  • The number, size, and spacing of cells can vary widely from device to device. Hence, it is very important that your widget is flexible and can accommodate more or less space than anticipated.
  • As the user resizes a widget, the system responds with a dp size range in which your widget can redraw itself.
  • Starting in Android 12, you can provide more refined size attributes and more flexible layouts. This includes:

 

반응형

댓글