Question

I have 2 questions to ask here. I am refering http://www.broculos.net/en/article/android-101-how-create-stackview-widget to create a stackview widget.

  1. The default stackview displays 4 items stacked behind each other. Can we change this count ? For example, in attached image http://www.broculos.net/sites/default/files/resize/content/honeybuzz_widget_preview-200x125.png , HoneyBuzz widget shows 4 items, but the Map widget shows 3. How to achieve this ?

  2. Also i wish to know can we add Listview & Gridview inside stackview. Means, as we can can display text/images in a single stack item, can we display a list/grid & scroll through it ?

Was it helpful?

Solution

  1. No you cant.

  2. I think scrolling in a stack list view would prevent users from changing "card" in stack, so that would not be possible

From android developers website:

Creating the App Widget layout is simple if you're familiar with XML Layouts. However, you must be aware that App Widget layouts are based on RemoteViews, which do not support every kind of layout or view widget.

A RemoteViews object (and, consequently, an App Widget) can support the following layout classes:

  • FrameLayout LinearLayout RelativeLayout And the following widget classes:
  • AnalogClock
  • Button
  • Chronometer
  • ImageButton
  • ImageView
  • TextView
  • ViewFlipper
  • ListView
  • GridView
  • StackView
  • AdapterViewFlipper

Descendants of these classes are not supported.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top