开发者

How do I scroll my Palm webOS application?

This feels like a dumb newbie question. I'm attempting to follow the Palm's online tutorial for developing a webOS app. I ran palm-generate and tried updating the generated index.html file to have a body with a bunch of content (th开发者_如何学JAVAe word "HELLO" repeated 400 times).

When I attempt to load that document in the emulator, I find that I'm unable to scroll the screen to read the rest of the text. I drag the screen, but nothing happens. The page scrolls just fine in the Palm web browser.

Is there a setting to allow users to drag my app to scroll it? I see documentation for a Mojo.Widget.Scroller, but that seems like it shouldn't be necessary for a simple web page with a bunch of text on it.


Thanks to arthurthornton:

You can take anything that would normally be inside the tags and put that inside the scene HTML file.

OR you could just make a basic scene with a webview widget inside it that has your site as the source.


Unfortunately, the Scroller widget is needed for scrolling. The standard WebKit view that's shown in a card has no native scrolling ability, so the Mojo scroller widget implements the logic for displaying more content that can fit.

You can try this out by making a new project in the Ares IDE. Just add a Scroller and use the Maximize button to make it fill the scene. Then, add a HTML object to it, and add your HTML content to that object. You'll then have a nice scene which allows you to scroll through a lot of content.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜