<words>
<w>duckduckgo</w>
<w>privacybrowser</w>
+ <w>recents</w>
<w>rehide</w>
<w>rehides</w>
<w>soren</w>
</facet>
<facet type="android" name="Android">
<configuration>
- <option name="SELECTED_BUILD_VARIANT" value="debug" />
+ <option name="SELECTED_BUILD_VARIANT" value="freeRelease" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
- <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
- <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
- <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
- <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
+ <option name="ASSEMBLE_TASK_NAME" value="assembleFreeRelease" />
+ <option name="COMPILE_JAVA_TASK_NAME" value="compileFreeReleaseSources" />
<afterSyncTasks>
- <task>generateDebugAndroidTestSources</task>
- <task>generateDebugSources</task>
+ <task>generateFreeReleaseSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
- <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
+ <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/src/free/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
- <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
- <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
+ <output url="file://$MODULE_DIR$/build/intermediates/classes/free/release" />
+ <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/free/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/free/release" isTestSource="false" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/free/release" isTestSource="false" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/free/release" isTestSource="false" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/free/release" isTestSource="false" generated="true" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/free/release" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/free/release" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/freeRelease/res" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/freeRelease/resources" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/freeRelease/assets" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/freeRelease/aidl" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/freeRelease/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/freeRelease/jni" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/freeRelease/rs" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/free/res" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/free/resources" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/free/assets" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/free/aidl" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/free/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/free/jni" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/free/rs" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestFree/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestFree/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestFree/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestFree/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestFree/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestFree/jni" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/androidTestFree/rs" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/release/res" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/release/resources" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/release/assets" type="java-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/release/aidl" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/release/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/release/jni" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/release/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/8.4.0/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/8.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
+ <orderEntry type="library" exported="" name="play-services-basement-8.4.0" level="project" />
<orderEntry type="library" exported="" name="design-23.1.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
+ <orderEntry type="library" exported="" name="play-services-ads-8.4.0" level="project" />
</component>
</module>
\ No newline at end of file
+/**
+ * Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser.
+ *
+ * Privacy Browser is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>.
+ */
+
apply plugin: 'com.android.application'
android {
+ signingConfigs {
+ }
compileSdkVersion 23
buildToolsVersion "23.0.2"
-
defaultConfig {
applicationId "com.stoutner.privacybrowser"
minSdkVersion 10
versionCode 1
versionName "1.0"
}
-
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
+ productFlavors {
+ standard {
+ applicationId "com.stoutner.privacybrowser.standard"
+ versionName "1.0-standard"
+ }
+
+ free {
+ applicationId "com.stoutner.privacybrowser.free"
+ versionName "1.0-free"
+ }
+ }
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
+ compile 'com.google.android.gms:play-services-ads:8.4.0'
}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- android:layout_martinTop="?attr/actionBarSize" moves adRelativeLayout below the appBarLayout, which otherwise would cover the top of mainWebView. -->
+<RelativeLayout
+ android:id="@+id/adRelativeLayout"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:ads="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="?attr/actionBarSize"
+ tools:context="com.stoutner.privacybrowser.MainWebViewActivity"
+ tools:showIn="@layout/activity_webview">
+
+ <!-- Set to visibility="gone" in the standard flavor. -->
+ <com.google.android.gms.ads.AdView
+ android:id="@+id/adView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_alignParentBottom="true"
+ ads:adSize="BANNER"
+ ads:adUnitId="@string/ad_id">
+ </com.google.android.gms.ads.AdView>
+
+ <android.support.v4.widget.SwipeRefreshLayout
+ android:id="@+id/swipeRefreshLayout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_above="@id/adView">
+
+ <!-- Google does not currently want to support hiding the AppBar on scroll for a WebView child with the Support Toolbar. https://code.google.com/p/android/issues/detail?id=200394 -->
+ <WebView
+ android:id="@+id/mainWebView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:focusableInTouchMode="true"/>
+ </android.support.v4.widget.SwipeRefreshLayout>
+</RelativeLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<resources>
+ <!-- Activities. -->
+ <string name="privacy_browser">Privacy Browser Free</string>
+
+ <!-- Ad control strings. -->
+ <string name="free_flavor">true</string>
+ <string name="ad_id">ca-app-pub-5962503714887045/2738552414</string>
+</resources>
\ No newline at end of file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stoutner.privacybrowser" >
+ <!-- Required to load websites. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Required to create homescreen shortcuts. -->
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
+ <!-- Required to upload files to websites. -->
+ <!-- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> -->
+
<!-- on API >= 23, app data is automatically backed up to Google cloud servers unless android:allowBackup="false" and android:fullBackupContent="false" is set. -->
<application
- android:allowBackup="false"
- android:fullBackupContent="false"
- android:icon="@mipmap/ic_launcher"
android:label="@string/privacy_browser"
- android:theme="@style/AppTheme" >
+ android:icon="@mipmap/ic_launcher"
+ android:theme="@style/AppTheme"
+ android:allowBackup="false"
+ android:fullBackupContent="false" >
<!-- android:configChanges="orientation|screenSize" makes the app not reload when the orientation changes, which preserves scroll location in the WebView. -->
<!-- android:launchMode="singleTask" makes the app launch in a new task instead of inside the task of the program that sends it an intent.
It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one. -->
+ <!-- android:persistableMode="persistNever" removes Privacy Browser from the recents screen on a device reboot. -->
<activity
android:name=".MainWebViewActivity"
- android:configChanges="orientation|screenSize"
android:label="@string/privacy_browser"
+ android:theme="@style/AppTheme.NoActionBar"
+ android:configChanges="orientation|screenSize"
android:launchMode="singleTask"
- android:theme="@style/AppTheme.NoActionBar">
+ android:persistableMode="persistNever" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
+ <!-- android:persistableMode="persistNever" removes Privacy Browser from the recents screen on a device reboot. -->
<activity
android:name=".SettingsActivity"
android:label="@string/privacy_browser_settings"
- android:parentActivityName=".MainWebViewActivity" >
+ android:parentActivityName=".MainWebViewActivity"
+ android:persistableMode="persistNever" >
<!-- android.support.PARENT_ACTIVITY is necessary for API <= 15. -->
<meta-data
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.Toast;
+
+import com.google.android.gms.ads.AdRequest;
+import com.google.android.gms.ads.AdView;
+
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
// We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21.
final ActionBar appBar = getSupportActionBar();
+ // Setup the AdView for the free flavor.
+ final AdView adView = (AdView) findViewById(R.id.adView);
+
// Implement swipe to refresh
final SwipeRefreshLayout swipeToRefresh = (SwipeRefreshLayout) findViewById(R.id.swipeRefreshLayout);
swipeToRefresh.setColorSchemeResources(R.color.blue);
appBar.hide();
}
+ // Show the fullScreenVideoFrameLayout.
fullScreenVideoFrameLayout.addView(view);
fullScreenVideoFrameLayout.setVisibility(View.VISIBLE);
+ // Hide the mainWebView.
mainWebView.setVisibility(View.GONE);
+ // Hide the add if this is the free flavor.
+ if (getString(R.string.free_flavor).equals("true")) {
+ adView.setVisibility(View.GONE);
+ }
+
/* SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bars on the bottom or right of the screen.
** SYSTEM_UI_FLAG_FULLSCREEN hides the status bar across the top of the screen.
** SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the navigation and status bars ghosted overlays and automatically rehides them.
appBar.show();
}
+ // Show the mainWebView.
mainWebView.setVisibility(View.VISIBLE);
+ // Show the adView if this is the free flavor.
+ if (getString(R.string.free_flavor).equals("true")) {
+ adView.setVisibility(View.VISIBLE);
+ }
+
+ // Hide the fullScreenVideoFrameLayout.
fullScreenVideoFrameLayout.removeAllViews();
fullScreenVideoFrameLayout.setVisibility(View.GONE);
}
// Load the initial website.
mainWebView.loadUrl(formattedUrlString);
+
+ // Load the ad if this is the free flavor.
+ if (getString(R.string.free_flavor).equals("true")) {
+ AdRequest adRequest = new AdRequest.Builder().build();
+ adView.loadAd(adRequest);
+ }
}
@Override
}
} else {
menuItem.setIcon(R.drawable.privacy_mode);
- Toast.makeText(getApplicationContext(), "Privacy Mode", Toast.LENGTH_SHORT).show();
+ Toast.makeText(getApplicationContext(), R.string.privacy_mode, Toast.LENGTH_SHORT).show();
}
} else {
javaScriptEnabled = true;
// Update the toggleJavaScript icon and display a toast message if appropriate.
if (!javaScriptEnabled && !cookiesEnabled) {
toggleJavaScript.setIcon(R.drawable.privacy_mode);
- Toast.makeText(getApplicationContext(), "Privacy Mode", Toast.LENGTH_SHORT).show();
+ Toast.makeText(getApplicationContext(), R.string.privacy_mode, Toast.LENGTH_SHORT).show();
} else {
if (cookiesEnabled) {
toggleJavaScript.setIcon(R.drawable.warning);
// Update the toggleJavaScript icon and display a toast message if appropriate.
if (!javaScriptEnabled && !domStorageEnabled) {
toggleJavaScript.setIcon(R.drawable.privacy_mode);
- Toast.makeText(getApplicationContext(), "Privacy Mode", Toast.LENGTH_SHORT).show();
+ Toast.makeText(getApplicationContext(), R.string.privacy_mode, Toast.LENGTH_SHORT).show();
} else {
if (domStorageEnabled) {
toggleJavaScript.setIcon(R.drawable.warning);
import android.os.Bundle;
import android.preference.PreferenceActivity;
-import android.support.v7.widget.Toolbar;
// Once the minimum API is >= 11 we can switch from the deprecated PreferenceActivity to using a PreferenceFragment.
public class SettingsActivity extends PreferenceActivity {
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
- <!-- android:layout_martinTop="?attr/actionBarSize" moves the SwipeRefreshLayout below the AppBarLayout, which otherwise would cover the top of the WebView. -->
- <android.support.v4.widget.SwipeRefreshLayout
- android:id="@+id/swipeRefreshLayout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="?attr/actionBarSize">
-
- <!-- Google does not currently want to support hiding the AppBar on scroll for a WebView child with the Support Toolbar. https://code.google.com/p/android/issues/detail?id=200394 -->
- <WebView
- android:id="@+id/mainWebView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:focusable="true"
- android:focusableInTouchMode="true"/>
-
- </android.support.v4.widget.SwipeRefreshLayout>
+ <include layout="@layout/ad_view" />
<!-- fullScreenVideoFrameLayout is used to display full screen videos. It is initially android:visibility="gone" to hide it from view. -->
<FrameLayout
<string name="privacy_browser">Privacy Browser</string>
<string name="privacy_browser_settings">Privacy Browser Settings</string>
+ <!-- Ad control strings. -->
+ <string name="free_flavor">false</string>
+
+ <!-- MainWebViewActivity. -->
+ <string name="privacy_mode">Privacy Mode</string>
+
<!-- Custom App Bar. -->
<string name="favorite_icon">Favorite Icon</string>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- android:layout_martinTop="?attr/actionBarSize" moves adRelativeLayout below the appBarLayout, which otherwise would cover the top of mainWebView. -->
+<RelativeLayout
+ android:id="@+id/adRelativeLayout"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="?attr/actionBarSize"
+ tools:context="com.stoutner.privacybrowser.MainWebViewActivity"
+ tools:showIn="@layout/activity_webview" >
+
+ <!-- Set to visibility="gone" in the standard flavor. -->
+ <com.google.android.gms.ads.AdView
+ android:id="@+id/adView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_alignParentBottom="true"
+ android:visibility="gone">
+ </com.google.android.gms.ads.AdView>
+
+ <android.support.v4.widget.SwipeRefreshLayout
+ android:id="@+id/swipeRefreshLayout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_above="@id/adView">
+
+ <!-- Google does not currently want to support hiding the AppBar on scroll for a WebView child with the Support Toolbar. https://code.google.com/p/android/issues/detail?id=200394 -->
+ <WebView
+ android:id="@+id/mainWebView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:focusableInTouchMode="true"/>
+ </android.support.v4.widget.SwipeRefreshLayout>
+</RelativeLayout>
\ No newline at end of file