开发者

How do you create the Browser layout (search bar on top, webview on bottom)?

开发者 https://www.devze.com 2023-03-29 05:45 出处:网络
I\'m trying to mimic the default android Browser app layout, which has a \"search_bar\" on top and then a \"webview\" right below it. The user can scroll both items up, all the while the sc开发者_如何

I'm trying to mimic the default android Browser app layout, which has a "search_bar" on top and then a "webview" right below it. The user can scroll both items up, all the while the sc开发者_如何学Croll bar only appears to the right of the webview (not both the webview and the search bar).

I've tried putting both the webview and the searchbar into a scrollview, but this shows the scrollbar next to the search_bar.

How do you create the Browser layout (search bar on top, webview on bottom)?


If you need to mimic the exact layout of default browser have a look at it's source code:

Where can I find Android source code online?

If you need only browser source have a look here:

https://android.googlesource.com/platform/packages/apps/Browser

From what I can see (a quick look at it) it is more complicated layout, but you may start analysing it from:

Browser\res\layout\browser_subwindow.xml

which directly includes WebView. This file is directly loaded by Tab... Go ahaed and analyse it on your own it is pretty simple as it is a regular Android application.

Hope it helps.

0

精彩评论

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