4

As far as I have read in the Internet and official documentation, it isn't possible to make a scrollable app widget. Also all my tries failed. I even tried to subclass TextView to implement my own scroll method, but nothing worked.

Are there any ways to achieve that?

Btw.... there are solutions if you use for example htc sense or home desktop ++, but i want to make it available to other users which don't use this

Marmoy
  • 8,009
  • 7
  • 46
  • 74
  • 2
    Please be careful in your terminology. A widget is a `View`. An "app widget" is a thing that goes on the home screen. – CommonsWare May 27 '10 at 15:14
  • [http://stackoverflow.com/questions/8815572/scrollable-app-widgets](http://stackoverflow.com/questions/8815572/scrollable-app-widgets) Here i got my answer but this is only possible over api 13 I have not tried in honeycomb...but for ics it works perfect – Amit Chaudhary Jan 11 '12 at 10:53

4 Answers4

7

Are there any ways to achieve that?

Not directly. You can always add buttons to rotate you through various options. But true scrolling is not possible.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • do you know why it isn't possible? – RoflcoptrException May 27 '10 at 16:46
  • 4
    It is not possible because of the delicate interaction between Launcher apps and scrolling widgets. Adding vertically scrolling widgets would for instance prevent Launcher app to use vertical swipes themselves and the Android team is not ready to add such a limitation to the platform. – Romain Guy May 27 '10 at 18:12
  • 1
    Also, the only way you can change appearance in App-widget is thru the RemoteViews, and the only interaction you can set on remoteviews is onclick. It is the api that makes this impossible. – xandy Jun 19 '10 at 15:03
  • 1
    Looking at my Honeycomb tablet, it appears that scrollable widgets are supported now on Honeycomb – emmby May 16 '11 at 17:08
  • 2
    @emmby: You can use `ListView` and `GridView` on API Level 11 and higher. Both of those scroll. – CommonsWare May 16 '11 at 17:13
  • @CommonsWare - 7 years later - is there any update? Thanks :) – Ronen Rabinovici Jun 05 '18 at 22:17
  • 1
    @RonenRabinovici: No change from [the last comment](https://stackoverflow.com/questions/2922114/how-to-make-a-scrollable-app-widget/2922373?noredirect=1#comment6959828_2922373). It would not surprise me if Google started pushing home screens to support the new slice system as an app widget replacement, but that will be quite a while to roll out to significant numbers of people. – CommonsWare Jun 05 '18 at 22:50
5

HTC provides scrollable app widgets because these are built-in. Only their Launcher can create and display them. Regular app widgets do not support scrolling.

Sayed Abolfazl Fatemi
  • 3,678
  • 3
  • 36
  • 48
Romain Guy
  • 97,993
  • 18
  • 219
  • 200
1

As far as I have observed, app widgets are scrollable, but only in the vertical direction. For Eg. The calendar widget is a scrollable widget which comes with mostly all android phones.

Only the vertical scrolling is allowed for the fact that horizontal scrollings are required to change the screens in the home page.

It is said only 2 gestures are allowed for a widget, 1.Touch 2.Vertical scrolling.

Source : Developer's Page

Legendary Genius
  • 310
  • 3
  • 20
1

Now you can make a scrollable widget, but you'll have the problems with images within it. Workaround is described here.

anil
  • 2,083
  • 21
  • 37