From: Soren Stoutner Date: Fri, 10 Jun 2016 05:04:45 +0000 (-0700) Subject: Fix the styling of the About tabs and AppBar. X-Git-Tag: v1.7~4 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=44014ce1673cb4cbfcdaeceac59c067a5074b35c;p=PrivacyBrowserAndroid.git Fix the styling of the About tabs and AppBar. --- diff --git a/.idea/dictionaries/soren.xml b/.idea/dictionaries/soren.xml index 783d740d..e7d27c91 100644 --- a/.idea/dictionaries/soren.xml +++ b/.idea/dictionaries/soren.xml @@ -3,12 +3,14 @@ androidversion anonymized + appbarlayout aren bebdb buildapi buildversion chromeversion commitdiff + coordinatorlayout eadd exynos intl @@ -23,6 +25,7 @@ securitypatch snackbar snackbars + tablayout techrepublic textview webkitversion diff --git a/app/src/free/assets/about_privacy_policy.html b/app/src/free/assets/about_privacy_policy.html index 3b61cfe5..4d88a0ff 100644 --- a/app/src/free/assets/about_privacy_policy.html +++ b/app/src/free/assets/about_privacy_policy.html @@ -17,65 +17,82 @@ along with Privacy Browser. If not, see . --> + + + + -

Privacy Browser Free

+

Privacy Browser Free

Privacy Browser Free does not collect any user information.


-

Advertisements

+

Advertisements

Privacy Browser Free displays a banner add across the bottom of the screen using the Google's AdMob network, which has its own privacy policy. Note that unless you have opted out of interest-based ads, the advertiser will receive a copy of your unique device advertising ID, which allows them to track your device across apps. AdMob reports anonymized summaries of the following information. Stoutner may use this information for any purpose.

    -
  • Total impressions
  • -
  • Total clicks
  • -
  • Platforms (eg. high-end mobile devices, tablets)
  • -
  • Activity by country
  • +
  • Total impressions
  • +
  • Total clicks
  • +
  • Platforms (eg. high-end mobile devices, tablets)
  • +
  • Activity by country

-

Google Play Ratings

+

Google Play Ratings

Google Play has its own privacy policy. Google provides developers with anonymized summaries of the following information related to user ratings. Stoutner may use this information for any purpose.

    -
  • Country
  • -
  • Language
  • -
  • App version
  • -
  • Android version
  • -
  • Device (eg. Google Nexus 5X, Samsung Galaxy Note3)
  • -
  • Tablets (eg. Tablets 10" and above)
  • +
  • Country
  • +
  • Language
  • +
  • App version
  • +
  • Android version
  • +
  • Device (eg. Google Nexus 5X, Samsung Galaxy Note3)
  • +
  • Tablets (eg. Tablets 10" and above)

-

Google Play Reviews

+

Google Play Reviews

Google Play has it own privacy policy. In addition to the name of the reviewer, the rating, and the text of the review (which are all available publicly), Google provides some or all of the following information to the developer. Stoutner may use this information for any purpose.

    -
  • Version code (eg. 7)
  • -
  • Version name (eg. 1.6)
  • -
  • Android version (eg. Android 5.1)
  • -
  • Device (eg. Galaxy S6 Edge+ [zenlte])
  • -
  • Manufacturer (eg. Samsung)
  • -
  • Device type (eg. Phone)
  • -
  • CPU make (eg. Samsung)
  • -
  • CPU model (eg. Exynos 7420)
  • -
  • Screen density (eg. 560 dpi)
  • -
  • Screen size (eg. 2560 x 1440)
  • -
  • RAM (eg. 4096 MB)
  • -
  • Native platform (eg. armeabi-v7a,armeabi,arm64v8a)
  • -
  • OpenGL ES version (eg. 3.1)
  • -
  • Device language (eg. English)
  • +
  • Version code (eg. 7)
  • +
  • Version name (eg. 1.6)
  • +
  • Android version (eg. Android 5.1)
  • +
  • Device (eg. Galaxy S6 Edge+ [zenlte])
  • +
  • Manufacturer (eg. Samsung)
  • +
  • Device type (eg. Phone)
  • +
  • CPU make (eg. Samsung)
  • +
  • CPU model (eg. Exynos 7420)
  • +
  • Screen density (eg. 560 dpi)
  • +
  • Screen size (eg. 2560 x 1440)
  • +
  • RAM (eg. 4096 MB)
  • +
  • Native platform (eg. armeabi-v7a,armeabi,arm64v8a)
  • +
  • OpenGL ES version (eg. 3.1)
  • +
  • Device language (eg. English)

-

Revision 1.2, 3 June 2016

+

Revision 1.2, 3 June 2016

\ No newline at end of file diff --git a/app/src/free/res/layout/main_webview.xml b/app/src/free/res/layout/main_webview.xml index 1c05c00f..17d02060 100644 --- a/app/src/free/res/layout/main_webview.xml +++ b/app/src/free/res/layout/main_webview.xml @@ -18,15 +18,16 @@ You should have received a copy of the GNU General Public License along with Privacy Browser. If not, see . --> - + @@ -52,6 +53,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" - android:focusableInTouchMode="true"/> + android:focusableInTouchMode="true" /> \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 33ae421b..6c83697d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,7 +31,7 @@ @@ -42,7 +42,7 @@ @@ -67,6 +67,7 @@ @@ -82,6 +83,7 @@ diff --git a/app/src/main/assets/about_changelog.html b/app/src/main/assets/about_changelog.html index 2d90a7e7..c927cd9b 100644 --- a/app/src/main/assets/about_changelog.html +++ b/app/src/main/assets/about_changelog.html @@ -17,8 +17,17 @@ along with Privacy Browser. If not, see . --> + + + + -

1.6 - minimum API 15, target API 23 - released 11 May 2016

+

1.6

+

11 May 2016 - minimum API 15, target API 23

  • Add a setting to customize the search URLs.
  • Add a setting to customize the browser’s user agent.
  • @@ -26,14 +35,16 @@
    -

    1.5 - minimum API 15, target API 23 - released 5 May 2016

    +

    1.5

    +

    5 May 2016 - minimum API 15, target API 23

    • Add the option to disable swipe to refresh so that certain websites, like Google Maps, will function correctly.

    -

    1.4 - minimum API 15, target API 23 - released 28 April 2016

    +

    1.4

    +

    28 April 2016 - minimum API 15, target API 23

    • Add controls for third-party cookies.
    • Fix full screen video playback.
    • @@ -41,14 +52,16 @@
      -

      1.3 - minimum API 15, target API 23 - released 7 April 2016

      +

      1.3

      +

      7 April 2016 - minimum API 15, target API 23


      -

      1.2 - minimum API 15, target API 23 - released 23 March 2016

      +

      1.2

      +

      23 March 2016 - minimum API 15, target API 23

      • Update launcher icon to make it bigger.
      • Replace all toast messages with snackbars.
      • @@ -58,14 +71,16 @@
        -

        1.1 - minimum API 10, target API 23 - released 9 March 2016

        +

        1.1

        +

        9 March 2016 - minimum API 10, target API 23

        • Separate the standard and the free flavors so that Privacy Browser builds correctly on F-Droid.

        -

        1.0 - minimum API 10, target API 23 - released 24 Feb 2016

        +

        1.0

        +

        24 Feb 2016 - minimum API 10, target API 23

        • Toggle JavaScript, DOM storage, and cookies.
        • Set default enabled status for JavaScript, DOM storage, and cookies.
        • diff --git a/app/src/main/assets/about_contributors.html b/app/src/main/assets/about_contributors.html index 68fbfaca..0c13f6d8 100644 --- a/app/src/main/assets/about_contributors.html +++ b/app/src/main/assets/about_contributors.html @@ -17,9 +17,21 @@ along with Privacy Browser. If not, see . --> + + + + +

          Principle Developers

          Privacy Browser is primarily developed by Soren Stoutner.

          +
          + +

          Contributors

          Contributors are welcome to submit both code and translations.

          \ No newline at end of file diff --git a/app/src/main/assets/about_license.html b/app/src/main/assets/about_license.html index 2322c4ef..8663c613 100644 --- a/app/src/main/assets/about_license.html +++ b/app/src/main/assets/about_license.html @@ -18,32 +18,39 @@ - + -

          Copyright

          +

          Copyright

          Privacy Browser is copyright © 2015-2016 by Soren Stoutner.


          -

          License

          +

          License

          Privacy Browser is released under the GPLv3+ license. The full text of the license is at the bottom of this document.


          -

          Attributions

          - +

          Attributions

          The icons in Privacy Browser come from the Android Material icon set, which is released under the CC-BY license.

          -

          - - - +

          + + + are derived from ic_security and ic_language. Modifications were made by Soren Stoutner in 2016.

          ic_language.

          @@ -66,7 +73,7 @@ img.center {
          -

          GNU General Public License

          +

          GNU General Public License

          Version 3, 29 June 2007

          Copyright © 2007 Free Software Foundation, Inc. diff --git a/app/src/main/assets/about_links.html b/app/src/main/assets/about_links.html index a02225b4..856bf4cd 100644 --- a/app/src/main/assets/about_links.html +++ b/app/src/main/assets/about_links.html @@ -17,13 +17,21 @@ along with Privacy Browser. If not, see . --> + + + + -

          More information related to Privacy Browser is available on the website.

          +

          Websites

          \ No newline at end of file diff --git a/app/src/main/assets/about_permissions.html b/app/src/main/assets/about_permissions.html index 92af0dd7..7e8d921b 100644 --- a/app/src/main/assets/about_permissions.html +++ b/app/src/main/assets/about_permissions.html @@ -17,13 +17,23 @@ along with Privacy Browser. If not, see . --> - -

          Privacy Browser uses the following permissions.

          + + + -

          Have full network access (android.permission.INTERNET)

          + +

          Have full network access

          +

          android.permission.INTERNET

          Required for the WebView to access the internet. Without this permission, Privacy Browser would be “No Browser: Protecting Your Privacy by Staying Completely Off the Internet”.

          -

          Install shortcuts (com.android.launcher.permission.INSTALL_SHORTCUT)

          +
          + +

          Install shortcuts

          +

          com.android.launcher.permission.INSTALL_SHORTCUT

          Required to add shortcuts for websites to the launcher desktop.

          \ No newline at end of file diff --git a/app/src/main/assets/about_privacy_policy.html b/app/src/main/assets/about_privacy_policy.html index 352c1638..e4e1e106 100644 --- a/app/src/main/assets/about_privacy_policy.html +++ b/app/src/main/assets/about_privacy_policy.html @@ -17,50 +17,67 @@ along with Privacy Browser. If not, see . --> + + + + -

          Privacy Browser

          +

          Privacy Browser

          Privacy Browser does not collect any user information.


          -

          Google Play Ratings

          +

          Google Play Ratings

          Google Play has its own privacy policy. Google provides developers with anonymized summaries of the following information related to user ratings. Stoutner may use this information for any purpose.

            -
          • Country
          • -
          • Language
          • -
          • App version
          • -
          • Android version
          • -
          • Device (eg. Google Nexus 5X, Samsung Galaxy Note3)
          • -
          • Tablets (eg. Tablets 10" and above)
          • +
          • Country
          • +
          • Language
          • +
          • App version
          • +
          • Android version
          • +
          • Device (eg. Google Nexus 5X, Samsung Galaxy Note3)
          • +
          • Tablets (eg. Tablets 10" and above)

          -

          Google Play Reviews

          +

          Google Play Reviews

          Google Play has it own privacy policy. In addition to the name of the reviewer, the rating, and the text of the review (which are all available publicly), Google provides some or all of the following information to the developer. Stoutner may use this information for any purpose.

            -
          • Version code (eg. 7)
          • -
          • Version name (eg. 1.6)
          • -
          • Android version (eg. Android 5.1)
          • -
          • Device (eg. Galaxy S6 Edge+ [zenlte])
          • -
          • Manufacturer (eg. Samsung)
          • -
          • Device type (eg. Phone)
          • -
          • CPU make (eg. Samsung)
          • -
          • CPU model (eg. Exynos 7420)
          • -
          • Screen density (eg. 560 dpi)
          • -
          • Screen size (eg. 2560 x 1440)
          • -
          • RAM (eg. 4096 MB)
          • -
          • Native platform (eg. armeabi-v7a,armeabi,arm64v8a)
          • -
          • OpenGL ES version (eg. 3.1)
          • -
          • Device language (eg. English)
          • +
          • Version code (eg. 7)
          • +
          • Version name (eg. 1.6)
          • +
          • Android version (eg. Android 5.1)
          • +
          • Device (eg. Galaxy S6 Edge+ [zenlte])
          • +
          • Manufacturer (eg. Samsung)
          • +
          • Device type (eg. Phone)
          • +
          • CPU make (eg. Samsung)
          • +
          • CPU model (eg. Exynos 7420)
          • +
          • Screen density (eg. 560 dpi)
          • +
          • Screen size (eg. 2560 x 1440)
          • +
          • RAM (eg. 4096 MB)
          • +
          • Native platform (eg. armeabi-v7a,armeabi,arm64v8a)
          • +
          • OpenGL ES version (eg. 3.1)
          • +
          • Device language (eg. English)

          -

          Revision 1.2, 3 June 2016

          +

          Revision 1.2, 3 June 2016

          \ No newline at end of file diff --git a/app/src/main/java/com/stoutner/privacybrowser/AboutActivity.java b/app/src/main/java/com/stoutner/privacybrowser/AboutActivity.java index 1df13872..5b6da8cb 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/AboutActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/AboutActivity.java @@ -25,13 +25,24 @@ import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; +import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.about_linearlayout); + setContentView(R.layout.about_coordinatorlayout); + + // We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21. + Toolbar supportAppBar = (Toolbar) findViewById(R.id.about_toolbar); + setSupportActionBar(supportAppBar); + + // Display the home arrow on supportAppBar. + final ActionBar appBar = getSupportActionBar(); + assert appBar != null;// This assert removes the incorrect warning on the following line that appBar might be null. + appBar.setDisplayHomeAsUpEnabled(true); // Setup the ViewPager. ViewPager aboutViewPager = (ViewPager) findViewById(R.id.about_viewpager); diff --git a/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java index 8b60b9d3..de910d50 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java @@ -111,16 +111,42 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation @SuppressLint("SetJavaScriptEnabled") protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.coordinator_layout); + setContentView(R.layout.main_coordinatorlayout); // We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21. Toolbar supportAppBar = (Toolbar) findViewById(R.id.appBar); setSupportActionBar(supportAppBar); + final ActionBar appBar = getSupportActionBar(); - final FrameLayout fullScreenVideoFrameLayout = (FrameLayout) findViewById(R.id.fullScreenVideoFrameLayout); + // This is needed to get rid of the Android Studio warning that appBar might be null. + assert appBar != null; + + // Add the custom url_bar layout, which shows the favoriteIcon, urlTextBar, and progressBar. + appBar.setCustomView(R.layout.url_bar); + appBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); + + // Set the "go" button on the keyboard to load the URL in urlTextBox. + urlTextBox = (EditText) appBar.getCustomView().findViewById(R.id.urlTextBox); + urlTextBox.setOnKeyListener(new View.OnKeyListener() { + public boolean onKey(View v, int keyCode, KeyEvent event) { + // If the event is a key-down event on the "enter" button, load the URL. + if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { + // Load the URL into the mainWebView and consume the event. + try { + loadUrlFromTextBox(); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + // If the enter key was pressed, consume the event. + return true; + } else { + // If any other key was pressed, do not consume the event. + return false; + } + } + }); - // We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21. - final ActionBar appBar = getSupportActionBar(); + final FrameLayout fullScreenVideoFrameLayout = (FrameLayout) findViewById(R.id.fullScreenVideoFrameLayout); // Implement swipe to refresh swipeToRefresh = (SwipeRefreshLayout) findViewById(R.id.swipeRefreshLayout); @@ -135,33 +161,6 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation mainWebView = (WebView) findViewById(R.id.mainWebView); - if (appBar != null) { - // Add the custom url_bar layout, which shows the favoriteIcon, urlTextBar, and progressBar. - appBar.setCustomView(R.layout.url_bar); - appBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); - - // Set the "go" button on the keyboard to load the URL in urlTextBox. - urlTextBox = (EditText) appBar.getCustomView().findViewById(R.id.urlTextBox); - urlTextBox.setOnKeyListener(new View.OnKeyListener() { - public boolean onKey(View v, int keyCode, KeyEvent event) { - // If the event is a key-down event on the "enter" button, load the URL. - if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { - // Load the URL into the mainWebView and consume the event. - try { - loadUrlFromTextBox(); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - // If the enter key was pressed, consume the event. - return true; - } else { - // If any other key was pressed, do not consume the event. - return false; - } - } - }); - } - // Create the navigation drawer. drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout); // The DrawerTitle identifies the drawer in accessibility mode. diff --git a/app/src/main/res/layout/about_coordinatorlayout.xml b/app/src/main/res/layout/about_coordinatorlayout.xml new file mode 100644 index 00000000..94556343 --- /dev/null +++ b/app/src/main/res/layout/about_coordinatorlayout.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/about_linearlayout.xml b/app/src/main/res/layout/about_linearlayout.xml deleted file mode 100644 index 84f63f15..00000000 --- a/app/src/main/res/layout/about_linearlayout.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/about_tab_version.xml b/app/src/main/res/layout/about_tab_version.xml index c01998f6..7aa3b794 100644 --- a/app/src/main/res/layout/about_tab_version.xml +++ b/app/src/main/res/layout/about_tab_version.xml @@ -40,7 +40,7 @@ xmlns:tools="http://schemas.android.com/tools"> + which isn't needed in this case because the ImageView is only decorative. --> - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/main_coordinatorlayout.xml b/app/src/main/res/layout/main_coordinatorlayout.xml new file mode 100644 index 00000000..07a5874f --- /dev/null +++ b/app/src/main/res/layout/main_coordinatorlayout.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/main_webview.xml b/app/src/main/res/layout/main_webview.xml index ed8bcc68..b792066d 100644 --- a/app/src/main/res/layout/main_webview.xml +++ b/app/src/main/res/layout/main_webview.xml @@ -18,24 +18,26 @@ You should have received a copy of the GNU General Public License along with Privacy Browser. If not, see . --> - - + + tools:showIn="@layout/main_coordinatorlayout" > - + . --> - - - - - - - + + + - - + + +