static ProgressBar progressBar;
static EditText urlTextBox;
static ImageView favoriteIcon;
- static final String homepage = "https://www.google.com/";
+ static final String homepage = "https://www.duckduckgo.com/";
// Remove Android Studio's warning about the dangers of using SetJavaScriptEnabled.
@SuppressLint("SetJavaScriptEnabled")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
- // FEATURE_ACTION_BAR_OVERLAY is required to scroll the actionBar.
- supportRequestWindowFeature(AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR_OVERLAY);
-
setContentView(R.layout.activity_webview);
mainWebView = (WebView) findViewById(R.id.mainWebView);
favoriteIcon = (ImageView) actionBar.getCustomView().findViewById(R.id.favoriteIcon);
urlTextBox = (EditText) actionBar.getCustomView().findViewById(R.id.urlTextBox);
progressBar = (ProgressBar) actionBar.getCustomView().findViewById(R.id.progressBar);
-
- // Scroll the actionBar.
- actionBar.setHideOnContentScrollEnabled(true);
}
mainWebView.setWebViewClient(new WebViewClient() {