How to make a scrollable app widget?

2019-01-25 22:58发布

问题:

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

回答1:

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.



回答2:

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.



回答3:

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



回答4:

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