0

In a half of my work on a widget development I just found how limited the options for updating widget's RemoteViews are. I have a set of measured values from barometric sensor and need somehow to graphically display those datas on widget. For example make a simple bar graph with few columns (made from ImageViews, LinearLayouts, etc.).

So I'd like to ask whats the good way to somehow create a simple column or View and programaticaly set height (or color) of this column according to given value.

Iriminage
  • 177
  • 2
  • 17

1 Answers1

0

Widgets cannot display custom views .

But there is a hack : you can put your view in the drawing cache and then cast your custom view as to a bitmap. Now, you have a bitmap that you can display on your widget. Solution found in stackoverflow

Community
  • 1
  • 1
Garytech
  • 328
  • 3
  • 6