Scrollable TextView in Android Widget

╄→尐↘猪︶ㄣ 提交于 2019-12-01 11:28:46

I solved this problem by putting the text view inside ListView with single node, which is supported in App widget.

http://developer.android.com/guide/topics/appwidgets/index.html#collections

thomasd

It looks like this is not possible.

More on this can be found here: http://code.google.com/p/android/issues/detail?id=9580

and here: How to make a scrollable app widget?

So, probably it is possible to do make appwidgets scrollable in the HTC sense environment but not for normal android environments.

A way around this is to add buttons that go up and down in a list.

I have been working on this with two buttons which increment and decrement through an array. Just having trouble accessing the global variables. Did you make any headway on this?

Hamed Gohari

In mainactivity.java:

after code text view:

TextView txt = (TextView) findViewById(R.id.textView id);

Enter this code:

txt.setMovementMethod(new ScrollingMovementMethod());

and you will be ok.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!