Is it useful using WebView whole layout in native Android app?

后端 未结 3 1339
[愿得一人]
[愿得一人] 2021-02-04 04:05

I am currently developing a native android app. My app has a lot of activities. I want to develop native android app. But in some case, I want to use a webvie

3条回答
  •  孤独总比滥情好
    2021-02-04 04:37

    There is a very good presentation about this very topic.

    1. Performance: You are adding an additional layer in between, A webkit engine cannot always match native (and sometimes hardware accelerated) rendering performance.

    2. Disadvantages: One is that the API use is limited, you can bind a page's JavaScript to Native code, but not all functionality is available.Though you might want to have a look at capabilities of Cordova project. Another is that emulating complex widgets via JavaScript will slow down the page.

    3. Portability: Indeed is a great advantage, that's why PhoneGap and Cordova are popular. Though many like Facebook App etc have switched to native App for better performance.

    The approach you require actually depends on your requirements. This may be my personal rant but IMHO: a markup can be only twisted so far, it can't out-perform industrial grade GUI programming setups as of yet.

提交回复
热议问题