Is it useful using WebView whole layout in native Android app?
Cons WebView
- Can't use full performance of device, Since web view form an extra layer.
- Web view can't listen all user event.
- You can't fully share or save data from your web view to app.
- Take more time to load. Other we get all things in a simple API and can be rendered.
- Changing a simple fields in page need to load full page again.
- Online required, can't extend offline features.
- Orientation changes and full screen make difficulties.
Pros of using Web view
- One page for both android and IOS.
- I think the main advantage is the ability to make changes without the need for each user to update the app on his device, because all the pages are on your server.
- No wait for app store approval for updation.
Some Techniques
- Native elements TOGETHER with WebView. I think it will be much better, as there are a lot of functions that can't be done with WebView only. The combination of the two is much more recommended.
- Rendering from locally, Create an assets directory for HTML files – Android internally maps it to file:///android_asset/ (note singular asset). So you can feed your web view form locally even if you are offline.
There is a very good presentation about this very topic.
Performance: You are adding an additional layer in between, A webkit engine cannot always match native (and sometimes hardware accelerated) rendering performance.
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.
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.