Reputation: 7805
I'm trying to do a simple application that will load a local html file for my Android 3.1 tablet to give presentations on. I'm not a programmer, but I read some tutorials about creating a simple webview app with Eclipse + Android SDK. But before I get dirty I wanted to know if there was a simpler way of just getting a simple app on my tablet that will in reality just be a full screen web browser. Thanks a lot everyone :)
Upvotes: 0
Views: 3525
Reputation: 26991
All you need to do is create a xml file that has the layout with the webview widget in it, and inflate it on your onCreate() using setContentView().
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
Declare this at class level
WebView mWebView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl(String URL);
}
Upvotes: 0
Reputation: 36302
What's wrong with using a browser that that has a full screen mode? Dolphin has a full screen mode. Why bother creating an app, especially if you are not a programmer?
Upvotes: 3
Reputation: 2327
Simplest way would be using WebView class with default properties. You can read more about WebView class on - http://developer.android.com/reference/android/webkit/WebView.html
Upvotes: 0