开发者

Splitting a TextView into multiple TextViews relative to screen height

So I have what I consider a rather complex problem. I have this massive TextView that is several screen lengths long. What I want to do is split the TextView up into smaller TextViews, each the height of the visible screen (So no vertical scrolling), and place the smaller TextViews in a horizontal-scrolling Gallery. I can do the latter no problem, but I can't think of a good way to break up the TextViews.

It's also worth noting the TextView contains many differen开发者_JAVA百科t styled text within it (different sizes, spacing, etc).

I'm not necessarily looking for solutions, but suggestions would be helpful and appreciated.


You should take a look at AndroViews or android-viewflow. They provide the horizontal paging that you're talking about, with android-viewflow being backed by an adapter.

In terms of splitting up the TextView, you can subclass the onMeasure() and start figuring out sizes there. You could also look into seeing how FBReader does it, as it pretty much does exactly what you're talking about.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜