开发者

Android Web Prototype using Images

I'm trying to create a little demo website optimized for an Android phone using images (of the page) with hotspots (instead of coding the HTML) and have a few questions that I'm hoping someone could help me out with.

  1. If I have images that are always 480px wide but variable length how can I define the page to make the image take up 100% of the width (no horizontal scrolling) but allow for vertical scrolling. No resizing at all

  2. Is it possible to hide the URL bar and/or the top android bar with the carrier, service and batte开发者_高级运维ry information (not sure what this is called)


  1. Im not positive but I think if you use a WebView and turn of the zoom controls this is the behavior that you will get.

  2. Yes, using a plain WebView in your activities layout will make it so there is no address bar by default. And add the no title bar theme to your activity by putting it in your manifest like this:

< activity android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

Edit: Oh, in that case

  1. You can try this:

    < meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' /> < meta name="viewport" content="width=device-width" />

I found that in this answer. Fair warning though my knowledge of html is very limited. I don't really know that this will work.

  1. No the address bar is part of the (default)Browser Activities UI to my knowledge you can't really affect the way it displays itself from html(Note that there are other browsers available and it is up to them whether to, and how they display the address bar. Some that are out there have different ways of hiding it.) And no you won't be able to affect the behavior of the notification bar either.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜