Created
May 15, 2016 21:34
-
-
Save stevesohcot/6f9551f1c38c81badb8cf82107038995 to your computer and use it in GitHub Desktop.
Andoird WebView sample - MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stevesohcot.com/tech-lessons-learned/2016/05/15/android-webview-sample-code/ | |
package com.diamondium.hashtagsaver; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class MainActivity extends Activity { | |
private WebView webview ; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
webview =(WebView)findViewById(R.id.webView); | |
webview.setWebViewClient(new WebViewClient()); | |
webview.getSettings().setJavaScriptEnabled(true); | |
webview.getSettings().setDomStorageEnabled(true); | |
webview.setOverScrollMode(WebView.OVER_SCROLL_NEVER); | |
webview.loadUrl("http://hashtagsaver.herokuapp.com/signup"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment