July 26, 2011 8:07 PM
Stranded in office late night due to heavy rain, I got bored and wrote a new layout for Readefine. Multiple articles show up in a grid, but there are articles that drop vertically to span across and articles that grow wide to two columns or more. Articles that are small may take up only the necessary space. Empty space should be minimal. This layout was not very hard to do, but getting the right performance was not easy. But it was gratifying to see the same app up and running on a tablet with no code changes.
I finished the layout that night, but took around four days to tune performance. The good thing about this is that I know more1 about TextLine and Flash Text Engine now. The bad thing is that I went home at midnight that day.
Try it out by downloading Readefine Desktop 2.0.
Mark these as Read
There's a very nifty feature in the Android Google Reader app. If you scroll through headings of your articles, a "Mark these as Read" button appears allowing you to mark all articles till the current one read.
I loved this feature. But as usual, scrolling is not my thing, so implemented the same concept in Readefine but with pagination. A page with multiple articles is shown. If interested, you can read an article in depth. Or you can "Mark these articles" as read and move to the next set. Just tap Space.
I re-packaged the SWF as is for Android and tried it out on a Motorola Xoom tablet. Magazine layout took around 30 - 50 seconds to lay out.
I tweaked with the amount of data I pre-fetch, process and cache. Layout time came down to 10 seconds. This is for around 8 - 10 articles being displayed with a total of 15 articles processed and ready for layout all in Actionscript.
That was impressive. Minimal code changes (constants in my singleton class) and I'm up and running on an Android tablet.
Of course, I need to make a lot of design changes for the Tablet form factor, but this was very encouraging for about an hour of effort.
I'm not releasing the tablet version till I add some touch functionality and get the experience right.
Future of magazine layout
Tablet. Performance. And better elimination of empty space. Since this is a hobby, expect random infrequent updates.
 Caching TextFlow objects when you have custom text containers is not very straight-forward. Neither is TextLine recycling.