From ae5cf6844097d6e1d24e628149de3109eac5a120 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Sat, 20 May 2017 20:09:03 -0700 Subject: [PATCH] Add icons to the settings activity. Implements https://redmine.stoutner.com/issues/129. --- app/src/main/assets/de/about_licenses.html | 46 +++-- app/src/main/assets/en/about_licenses.html | 46 +++-- .../assets/en/images/ic_call_to_action.png | Bin 0 -> 775 bytes .../main/assets/en/images/ic_fullscreen.png | Bin 0 -> 482 bytes app/src/main/assets/en/images/ic_refresh.png | Bin 0 -> 1992 bytes .../main/assets/en/images/ic_smartphone.png | Bin 0 -> 864 bytes app/src/main/assets/es/about_licenses.html | 64 +++--- app/src/main/assets/it/about_licenses.html | 10 +- .../main/assets/zh-rTW/about_licenses.html | 46 +++-- .../activities/MainWebViewActivity.java | 2 +- .../fragments/SettingsFragment.java | 186 ++++++++++++++++-- .../res/drawable/full_screen_disabled.xml | 13 ++ .../main/res/drawable/full_screen_enabled.xml | 13 ++ .../drawable/hide_system_bars_disabled.xml | 13 ++ .../res/drawable/hide_system_bars_enabled.xml | 13 ++ .../res/drawable/hide_system_bars_ghosted.xml | 13 ++ .../drawable/{home.xml => home_enabled.xml} | 4 +- app/src/main/res/drawable/home_ghosted.xml | 13 ++ app/src/main/res/drawable/more_disabled.xml | 18 ++ app/src/main/res/drawable/more_enabled.xml | 18 ++ .../main/res/drawable/refresh_disabled.xml | 18 ++ app/src/main/res/drawable/refresh_enabled.xml | 18 ++ .../drawable/search_custom_url_disabled.xml | 18 ++ app/src/main/res/drawable/search_ghosted.xml | 18 ++ .../res/drawable/translucent_bar_disabled.xml | 13 ++ .../res/drawable/translucent_bar_enabled.xml | 13 ++ .../res/drawable/translucent_bar_ghosted.xml | 13 ++ .../main/res/drawable/user_agent_enabled.xml | 18 -- .../main/res/menu/webview_navigation_menu.xml | 2 +- app/src/main/res/values-es/strings.xml | 4 +- app/src/main/res/values-it/strings.xml | 4 +- app/src/main/res/values-zh-rTW/strings.xml | 4 +- app/src/main/res/values/strings.xml | 8 +- app/src/main/res/xml/preferences.xml | 9 +- 34 files changed, 531 insertions(+), 147 deletions(-) create mode 100644 app/src/main/assets/en/images/ic_call_to_action.png create mode 100644 app/src/main/assets/en/images/ic_fullscreen.png create mode 100644 app/src/main/assets/en/images/ic_refresh.png create mode 100644 app/src/main/assets/en/images/ic_smartphone.png create mode 100644 app/src/main/res/drawable/full_screen_disabled.xml create mode 100644 app/src/main/res/drawable/full_screen_enabled.xml create mode 100644 app/src/main/res/drawable/hide_system_bars_disabled.xml create mode 100644 app/src/main/res/drawable/hide_system_bars_enabled.xml create mode 100644 app/src/main/res/drawable/hide_system_bars_ghosted.xml rename app/src/main/res/drawable/{home.xml => home_enabled.xml} (65%) create mode 100644 app/src/main/res/drawable/home_ghosted.xml create mode 100644 app/src/main/res/drawable/more_disabled.xml create mode 100644 app/src/main/res/drawable/more_enabled.xml create mode 100644 app/src/main/res/drawable/refresh_disabled.xml create mode 100644 app/src/main/res/drawable/refresh_enabled.xml create mode 100644 app/src/main/res/drawable/search_custom_url_disabled.xml create mode 100644 app/src/main/res/drawable/search_ghosted.xml create mode 100644 app/src/main/res/drawable/translucent_bar_disabled.xml create mode 100644 app/src/main/res/drawable/translucent_bar_enabled.xml create mode 100644 app/src/main/res/drawable/translucent_bar_ghosted.xml delete mode 100644 app/src/main/res/drawable/user_agent_enabled.xml diff --git a/app/src/main/assets/de/about_licenses.html b/app/src/main/assets/de/about_licenses.html index 645c0c69..ddd730db 100644 --- a/app/src/main/assets/de/about_licenses.html +++ b/app/src/main/assets/de/about_licenses.html @@ -60,8 +60,8 @@ are derived from ic_security and ic_language, which are part of the Android Material icon set and are released under the Apache License 2.0. The full text of the license is below. Modifications copyright © 2016 Soren Stoutner. The resulting images are released under the GPLv3+ license.

orbot is a modified version of the status icon from the Orbot project, which is copyright - 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. - The resulting image is released under the GPLv3+ license.

+ 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. + The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. The resulting image is released under the GPLv3+ license.

cookie was created by Google. It is released under the Apache License 2.0 and can be downloaded from Material Design Icons. It is unchanged except for layout information like color and size.

@@ -72,6 +72,7 @@

ic_arrow_forward.

ic_bookmark_border.

ic_bug_report.

+

ic_call_to_action.

ic_chrome_reader_mode.

ic_close.

ic_create_new_folder.

@@ -86,6 +87,7 @@

ic_find_in_page.

ic_folder.

ic_folder_special.

+

ic_fullscreen.

ic_home.

ic_import_contacts.

ic_important_devices.

@@ -96,9 +98,11 @@

ic_location_off.

ic_more.

ic_question_answer.

+

ic_refresh.

ic_search.

ic_select_all.

ic_settings.

+

ic_smartphone.

ic_subtitles.

ic_text_fields.

ic_vertical_align_bottom.

@@ -127,7 +131,7 @@

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to - share and change all versions of a program--to make sure it remains free + share and change all versions of a program—to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to @@ -155,16 +159,16 @@ (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

-

For the developers' and authors' protection, the GPL clearly explains - that there is no warranty for this free software. For both users' and - authors' sake, the GPL requires that modified versions be marked as +

For the developers’ and authors’ protection, the GPL clearly explains + that there is no warranty for this free software. For both users’ and + authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of - protecting users' freedom to change the software. The systematic + protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those @@ -248,7 +252,7 @@

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to - control those activities. However, it does not include the work's + control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source @@ -290,7 +294,7 @@ the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

-

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

+

3. Protecting Users’ Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article @@ -302,13 +306,13 @@ circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or - modification of the work as a means of enforcing, against the work's - users, your or third parties' legal rights to forbid circumvention of + modification of the work as a means of enforcing, against the work’s + users, your or third parties’ legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

-

You may convey verbatim copies of the Program's source code as you +

You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any @@ -353,7 +357,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not - used to limit the access or legal rights of the compilation's users + used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

@@ -575,7 +579,7 @@ organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever - licenses to the work the party's predecessor in interest had or could + licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

@@ -592,9 +596,9 @@

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The - work thus licensed is called the contributor's “contributor version”.

+ work thus licensed is called the contributor’s “contributor version”.

-

A contributor's “essential patent claims” are all patent claims +

A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, @@ -605,7 +609,7 @@ this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free - patent license under the contributor's essential patent claims, to + patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

@@ -626,7 +630,7 @@ consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the - covered work in a country, or your recipient's use of the covered work + covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

@@ -657,7 +661,7 @@ any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

-

12. No Surrender of Others' Freedom.

+

12. No Surrender of Others’ Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not @@ -697,7 +701,7 @@ by the Free Software Foundation.

If the Program specifies that a proxy can decide which future - versions of the GNU General Public License can be used, that proxy's + versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

@@ -790,7 +794,7 @@ certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate - parts of the General Public License. Of course, your program's commands + parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, diff --git a/app/src/main/assets/en/about_licenses.html b/app/src/main/assets/en/about_licenses.html index ed4aa4d5..c433ce37 100644 --- a/app/src/main/assets/en/about_licenses.html +++ b/app/src/main/assets/en/about_licenses.html @@ -55,8 +55,8 @@ are derived from ic_security and ic_language, which are part of the Android Material icon set and are released under the Apache License 2.0. The full text of the license is below. Modifications copyright © 2016 Soren Stoutner. The resulting images are released under the GPLv3+ license.

orbot is a modified version of the status icon from the Orbot project, which is copyright - 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. - The resulting image is released under the GPLv3+ license.

+ 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. + The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. The resulting image is released under the GPLv3+ license.

cookie was created by Google. It is released under the Apache License 2.0 and can be downloaded from Material Design Icons. It is unchanged except for layout information like color and size.

The following icons come from the Android Material icon set, which is released under the Apache License 2.0. They are unchanged except for layout @@ -66,6 +66,7 @@

ic_arrow_forward.

ic_bookmark_border.

ic_bug_report.

+

ic_call_to_action.

ic_chrome_reader_mode.

ic_close.

ic_create_new_folder.

@@ -80,6 +81,7 @@

ic_find_in_page.

ic_folder.

ic_folder_special.

+

ic_fullscreen.

ic_home.

ic_import_contacts.

ic_important_devices.

@@ -90,9 +92,11 @@

ic_location_off.

ic_more.

ic_question_answer.

+

ic_refresh.

ic_search.

ic_select_all.

ic_settings.

+

ic_smartphone.

ic_subtitles.

ic_text_fields.

ic_vertical_align_bottom.

@@ -119,7 +123,7 @@

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to - share and change all versions of a program--to make sure it remains free + share and change all versions of a program—to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to @@ -147,16 +151,16 @@ (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

-

For the developers' and authors' protection, the GPL clearly explains - that there is no warranty for this free software. For both users' and - authors' sake, the GPL requires that modified versions be marked as +

For the developers’ and authors’ protection, the GPL clearly explains + that there is no warranty for this free software. For both users’ and + authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of - protecting users' freedom to change the software. The systematic + protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those @@ -240,7 +244,7 @@

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to - control those activities. However, it does not include the work's + control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source @@ -282,7 +286,7 @@ the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

-

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

+

3. Protecting Users’ Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article @@ -294,13 +298,13 @@ circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or - modification of the work as a means of enforcing, against the work's - users, your or third parties' legal rights to forbid circumvention of + modification of the work as a means of enforcing, against the work’s + users, your or third parties’ legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

-

You may convey verbatim copies of the Program's source code as you +

You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any @@ -345,7 +349,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not - used to limit the access or legal rights of the compilation's users + used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

@@ -567,7 +571,7 @@ organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever - licenses to the work the party's predecessor in interest had or could + licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

@@ -584,9 +588,9 @@

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The - work thus licensed is called the contributor's “contributor version”.

+ work thus licensed is called the contributor’s “contributor version”.

-

A contributor's “essential patent claims” are all patent claims +

A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, @@ -597,7 +601,7 @@ this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free - patent license under the contributor's essential patent claims, to + patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

@@ -618,7 +622,7 @@ consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the - covered work in a country, or your recipient's use of the covered work + covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

@@ -649,7 +653,7 @@ any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

-

12. No Surrender of Others' Freedom.

+

12. No Surrender of Others’ Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not @@ -689,7 +693,7 @@ by the Free Software Foundation.

If the Program specifies that a proxy can decide which future - versions of the GNU General Public License can be used, that proxy's + versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

@@ -782,7 +786,7 @@ certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate - parts of the General Public License. Of course, your program's commands + parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, diff --git a/app/src/main/assets/en/images/ic_call_to_action.png b/app/src/main/assets/en/images/ic_call_to_action.png new file mode 100644 index 0000000000000000000000000000000000000000..84c2e372dd4e3c0264f08f45cda6669e0f732e4b GIT binary patch literal 775 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#Vf4nJ zsKU_vQ3YHM`H2IZjgXgrUFrVN!PgbvDGF4NYLSxchb4 zl@tC6{5M$RLO<_)Ex(D&hG8Eg`?(eA@;l<^Myg+HoGW-|#^s!Q49~OAZJro>V7K6% zp38a54%|Ak((FSHi}^zxGygQduM@VpZKzy6d#C5YJ^qZr4}Q%#zSTzUK<_SgFUB0E z_tm%i+BR_3{3!nz@$lsKUw6CNHiT}E;CfKhFMZJ<>--jx1FdrAixOkjMC-5?EIQts zA))?S%$rf8g|WrBp@2=`9K#_=2McD7bcTmK3UdZj@XklRb%o2DvsdhW-o0l>H$z-W z0Wa?ndqyH0HgzB0zq=2lxNGItDt}&`w^8K4bT;vQcWd;e4m{s=^wRu>e%m~k!z*kr zPdzkQe`?%4nJ zsKs+ z4Tpm_=WidVt_`{Rd_ncx)vs>-oK-!)zIgenUA$I)&;HN<9%!EA$HbxDP=H3XuVt@z zw0xBw@ALW9yhY__*SCG{5B+*Kb6Q>+?}MPw{n7k|&!aw{y>dodVGhF~PQ1j~U8ZkD zx4SL1w}-oGgHk+~toq-d;(zb`+i?H1e8#Eg+x77p0=DApulbJ0kA1!#;UB+g-hYqR z#&7RU`ugEoa_`qKd(Z!$5bj{X*dmNh?14b2(F!(Q!GsHHJ}2!putOGbFcFC|MUtCtZlu zQ7(%nUs)xqD7VzoB$`?!_sem z_%D?d*LDXf^4Xfem>yn%N^6s@#K>Fo$V5sA69CL2{v~96Zp;3)P%p(ZI3?gvYzjLv zIR;>}*;a802bj^3i7{4(lJ{Qt>Y@(-2v0Avd*I=VQM9@m4DbJRaP z(KE#2Ug{R@#QwOkkN8;EE=zy(hXm7KP7#o!aYY@(@L z1EU+^ULUi_nFR;kvdxUIc4Y3-tbB^CTt9KW7oBD~jC!kL?>ueiJh^3(1kndCfbWsU z^3XSsZqs>*^W;@oi!ZoQ7?h*Nzj+(dQ!sHL@M?Dp6^xZQEum%UgP9T=S%q6w^qC+w z@`Yk8J{?;+lt$0uJoIxN>-!VhfG@SZl0E*^x!9~Ml&l!j=Lxk3#26C2O{S5irjGAe z{Z#^loJYpP!r@lTJzp=2sPCL5N2TAB5b`ay@I9k1`s74LOOtBceQUSab+n`{i728P zPml-Bqo0W_p9`-y33}fEjZjUm8Oj^5=+igP>Kxic7}SL^?|OU+s?WK$p}xI0H^S<9nbD@m1ll;&L(9}sV@5E1oWCPr2|Y}6QnPUCuR zxPHmVj39s3t<+H{er@ZBeyB~3v&AjJTxXF)#BX~W0kd57^PtkPb}EN4c#LX1-|N@HD0HK*Z1LN2(h0`jxR+;*HyX8f(n-h!5)URqeV~u!6AHSn^G^BsTM#&C?KuE-du5RCs@5=J%4%R|K=hxFnO)TZ>~8Q zs@!SQh7ndrH0oKKpM2s0mBwgLOunB5hAr#v@f-pTKW>I(@|*6zE>-LVB9L^u)(c}n z?K`0>xYhb>B2i@&MuXDn)lMw>z_|8q;h3V z5}`Z9GoMdeN7`7_jio+*5T5#BWHJ_wg}Cirz4?sC2>`n9e15dqj4WH{7EhEF z-U(Y>@mD`PK^NppnDh6*AjTATHl|8`AzaLa(Jrt zOKytsk+J=DxoyZm@y@kTb>HtD|qH(Z3J`)@P(;SeJw z6UT#!n%^h`2@LA#v35UX6Jjy;VV2>^ZN!Wxk(6XcH|Fkq-T-w;^F^xPiNffQF51(< z2%=@i69*nT-n7DcL^w9#-J_Uv@|4qq(QwH2Yjq3iSHbc8e(CH$#?6`@^%x0jG$xY-;zDl`eUYBgKEf?2Sy>c+VtjAZjaB+Webra z-m&PKHw6~{+YEH4g2e_R7x!}?la<|hjB(`N5hFs_7FujGIwVlvnO+xfoyhIgzop=d zXv3$=ONJCBDqXCAE%p#Gb~)v<+t3h1;>C!+vO!9f8f3q4cer;?=oG%c>SUZ7>Bbya z4ylWAHTkGBlKu?O6}pUyTNn8!Z&g!WhWnKjz|EigA zhwsQelm0MU2>9+j~1?dUBJuJ Kmt5yT&-w?=EPWUN literal 0 HcmV?d00001 diff --git a/app/src/main/assets/en/images/ic_smartphone.png b/app/src/main/assets/en/images/ic_smartphone.png new file mode 100644 index 0000000000000000000000000000000000000000..9704accdcf363cc3f52e20705bbeef23c041674b GIT binary patch literal 864 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#Vf4nJ zsK;H}N}xph$K#vqy|zqJDh!Npyuzz-WuL2ezG8-? z-aA2=)iP{%bmv`Pd`UL+AD_YL7nbJ17MtCz56FC2oD}g?{eWoA=l{oa3U+2iq%wSN z-CPyEZS^UJb0X(n-MzWW@oGGisR5h7Ifg@$4i?ND=?o8f6y`9t7&jDLUaMcwVfrBX zwYSd=rVUqq3GJ88V(4#BU#oAJsLf-*AkPR_idFw$7hDz{|3Kh-{~FIEFMj^@#rpk=ryrR2{J`f&FS6ercLm1kX*p1=_V2s4 z?@r2><$kZ1@;}Xa|6b)(=>yrf)9?S - derivan de ic_security y de ic_language, which are part of the Android Material icon set and are released under the Apache License 2.0. - The full text of the license is below. Modifications copyright © 2016 Soren Stoutner. The resulting images are released under the GPLv3+ license.

-

orbot is a modified version of the status icon from the Orbot project, which is copyright - 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. - The resulting image is released under the GPLv3+ license.

+ derivan de ic_security y de ic_language, que son parte del conjunto de iconos Android Material y son liberados bajo la Licencia Apache 2.0. + El texto completo de la licencia se encuentra debajo. Copyright de modificaciones © 2016 Soren Stoutner. Las imágenes resultantes se liberan bajo la + licencia GPLv3+.

+

orbot es una versión modificada del icono de estado del proyecto Orbot, + que tiene copyright 2009-2010 por Nathan Freitas, The Guardian Project. Es liberado bajo la licencia BSD modificada (de 3 cláusulas). + El texto completo de la licencia se encuentra debajo. Copyright de modificaciones © 2017 Soren Stoutner. + La imagen resultante se libera bajo la licencia GPLv3+.

cookie fue creado por Google. Es liberado bajo la licencia Apache 2.0 y puede ser descargado desde Material Design Icons. Está sin cambios, excepto por la información de diseño como el color y el tamaño.

Los siguientes iconos proceden de Android Material icon set, el cual es liberado bajo la licencia Apache 2.0. - Están sin cambios, excepto por la información de diseño como el color y el tamaño. Algunos de ellos se han renombrado para que coincida con su uso en el código. Los iconos originales y los nombres se muestran a continuación.

+ Están sin cambios, excepto por la información de diseño como el color y el tamaño. Algunos de ellos se han renombrado para que coincida con su uso en el código. Los iconos y los nombres originales se muestran a continuación.

ic_add.

ic_arrow_back.

ic_arrow_forward.

ic_bookmark_border.

ic_bug_report.

+

ic_call_to_action.

ic_chrome_reader_mode.

ic_close.

ic_create_new_folder.

@@ -82,6 +85,7 @@

ic_find_in_page.

ic_folder.

ic_folder_special.

+

ic_fullscreen.

ic_home.

ic_import_contacts.

ic_important_devices.

@@ -92,9 +96,11 @@

ic_location_off.

ic_more.

ic_question_answer.

+

ic_refresh.

ic_search.

ic_select_all.

ic_settings.

+

ic_smartphone.

ic_subtitles.

ic_text_fields.

ic_vertical_align_bottom.

@@ -1015,36 +1021,34 @@ limitations under the License.
-

3-Clause BSD License

+

Licencia BSD modificada (de 3 cláusulas)

-

Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met:

+

La redistribución y el uso en las formas de código fuente y binario, con o sin + modificaciones, están permitidos siempre que se cumplan las siguientes condiciones:

-

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+

ESTE SOFTWARE SE SUMINISTRA POR LOS PROPIETARIOS DEL COPYRIGHT Y COLABORADORES + “COMO ESTÁ” Y CUALQUIER GARANTÍAS EXPRESA O IMPLÍCITA, INCLUYENDO, PERO NO + LIMITADO A, LAS GARANTÍAS IMPLÍCITAS DE COMERCIALIZACIÓN Y APTITUD PARA UN + PROPÓSITO PARTICULAR SON RECHAZADAS. EN NINGÚN CASO LOS PROPIETARIOS DEL COPYRIGHT + Y COLABORADORES SERÁN RESPONSABLES POR NINGÚN DAÑO DIRECTO, INDIRECTO, INCIDENTAL, + ESPECIAL, EJEMPLAR O COSECUENCIAL (INCLUYENDO, PERO NO LIMITADO A, LA ADQUISICIÓN + O SUSTITUCIÓN DE BIENES O SERVICIOS; LA PÉRDIDA DE USO, DE DATOS O DE BENEFICIOS; + O INTERRUPCIÓN DE LA ACTIVIDAD EMPRESARIAL) O POR CUALQUIER TEORÍA DE + RESPONSABILIDAD, YA SEA POR CONTRATO, RESPONSABILIDAD ESTRICTA O AGRAVIO + (INCLUYENDO NEGLIGENCIA O CUALQUIER OTRA CAUSA) QUE SURJA DE CUALQUIER MANERA DEL + USO DE ESTE SOFTWARE, INCLUSO SI SE HA ADVERTIDO DE LA POSIBILIDAD DE TALES DAÑOS.

\ No newline at end of file diff --git a/app/src/main/assets/it/about_licenses.html b/app/src/main/assets/it/about_licenses.html index 2c5c24c8..e960817c 100644 --- a/app/src/main/assets/it/about_licenses.html +++ b/app/src/main/assets/it/about_licenses.html @@ -61,9 +61,9 @@ are derived from ic_security and ic_language, which are part of the Android Material icon set and are released under the Apache License 2.0. The full text of the license is below. Modifications copyright © 2016 Soren Stoutner. The resulting images are released under the GPLv3+ license.

orbot is a modified version of the status icon from the Orbot project, which is copyright - 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. - The resulting image is released under the GPLv3+ license.

-

cookie was created by Google. It is released under the Apache License 2.0 + 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. + The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. The resulting image is released under the GPLv3+ license.

+

cookie was created by Google. It is released under the Apache License 2.0 and can be downloaded from Material Design Icons. It is unchanged except for layout information like color and size.

The following icons come from the Android Material icon set, which is released under the Apache License 2.0. They are unchanged except for layout information like color and size. Some of them have been renamed to match their use in the code. The original icons and names are shown below.

@@ -72,6 +72,7 @@

ic_arrow_forward.

ic_bookmark_border.

ic_bug_report.

+

ic_call_to_action.

ic_chrome_reader_mode.

ic_close.

ic_create_new_folder.

@@ -86,6 +87,7 @@

ic_find_in_page.

ic_folder.

ic_folder_special.

+

ic_fullscreen.

ic_home.

ic_import_contacts.

ic_important_devices.

@@ -96,9 +98,11 @@

ic_location_off.

ic_more.

ic_question_answer.

+

ic_refresh.

ic_search.

ic_select_all.

ic_settings.

+

ic_smartphone.

ic_subtitles.

ic_text_fields.

ic_vertical_align_bottom.

diff --git a/app/src/main/assets/zh-rTW/about_licenses.html b/app/src/main/assets/zh-rTW/about_licenses.html index d3fb878c..c206459d 100644 --- a/app/src/main/assets/zh-rTW/about_licenses.html +++ b/app/src/main/assets/zh-rTW/about_licenses.html @@ -55,8 +55,8 @@ are derived from ic_security and ic_language, which are part of the Android Material icon set and are released under the Apache License 2.0. The full text of the license is below. Modifications copyright © 2016 Soren Stoutner. The resulting images are released under the GPLv3+ license.

orbot is a modified version of the status icon from the Orbot project, which is copyright - 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. - The resulting image is released under the GPLv3+ license.

+ 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. + The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. The resulting image is released under the GPLv3+ license.

cookie was created by Google. It is released under the Apache License 2.0 and can be downloaded from Material Design Icons. It is unchanged except for layout information like color and size.

The following icons come from the Android Material icon set, which is released under the Apache License 2.0. They are unchanged except for layout @@ -66,6 +66,7 @@

ic_arrow_forward.

ic_bookmark_border.

ic_bug_report.

+

ic_call_to_action.

ic_chrome_reader_mode.

ic_close.

ic_create_new_folder.

@@ -80,6 +81,7 @@

ic_find_in_page.

ic_folder.

ic_folder_special.

+

ic_fullscreen.

ic_home.

ic_import_contacts.

ic_important_devices.

@@ -90,9 +92,11 @@

ic_location_off.

ic_more.

ic_question_answer.

+

ic_refresh.

ic_search.

ic_select_all.

ic_settings.

+

ic_smartphone.

ic_subtitles.

ic_text_fields.

ic_vertical_align_bottom.

@@ -119,7 +123,7 @@

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to - share and change all versions of a program--to make sure it remains free + share and change all versions of a program—to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to @@ -147,16 +151,16 @@ (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

-

For the developers' and authors' protection, the GPL clearly explains - that there is no warranty for this free software. For both users' and - authors' sake, the GPL requires that modified versions be marked as +

For the developers’ and authors’ protection, the GPL clearly explains + that there is no warranty for this free software. For both users’ and + authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of - protecting users' freedom to change the software. The systematic + protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those @@ -240,7 +244,7 @@

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to - control those activities. However, it does not include the work's + control those activities. However, it does not include the work’s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source @@ -282,7 +286,7 @@ the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

-

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

+

3. Protecting Users’ Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article @@ -294,13 +298,13 @@ circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or - modification of the work as a means of enforcing, against the work's - users, your or third parties' legal rights to forbid circumvention of + modification of the work as a means of enforcing, against the work’s + users, your or third parties’ legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

-

You may convey verbatim copies of the Program's source code as you +

You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any @@ -345,7 +349,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not - used to limit the access or legal rights of the compilation's users + used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

@@ -567,7 +571,7 @@ organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever - licenses to the work the party's predecessor in interest had or could + licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

@@ -584,9 +588,9 @@

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The - work thus licensed is called the contributor's “contributor version”.

+ work thus licensed is called the contributor’s “contributor version”.

-

A contributor's “essential patent claims” are all patent claims +

A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, @@ -597,7 +601,7 @@ this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free - patent license under the contributor's essential patent claims, to + patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

@@ -618,7 +622,7 @@ consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the - covered work in a country, or your recipient's use of the covered work + covered work in a country, or your recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

@@ -649,7 +653,7 @@ any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

-

12. No Surrender of Others' Freedom.

+

12. No Surrender of Others’ Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not @@ -689,7 +693,7 @@ by the Free Software Foundation.

If the Program specifies that a proxy can decide which future - versions of the GNU General Public License can be used, that proxy's + versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

@@ -782,7 +786,7 @@ certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate - parts of the General Public License. Of course, your program's commands + parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index 353a8d16..05625983 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -2154,7 +2154,7 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation incognitoModeEnabled = sharedPreferences.getBoolean("incognito_mode", false); boolean doNotTrackEnabled = sharedPreferences.getBoolean("do_not_track", false); boolean proxyThroughOrbot = sharedPreferences.getBoolean("proxy_through_orbot", false); - fullScreenBrowsingModeEnabled = sharedPreferences.getBoolean("enable_full_screen_browsing_mode", false); + fullScreenBrowsingModeEnabled = sharedPreferences.getBoolean("full_screen_browsing_mode", false); hideSystemBarsOnFullscreen = sharedPreferences.getBoolean("hide_system_bars", false); translucentNavigationBarOnFullscreen = sharedPreferences.getBoolean("translucent_navigation_bar", true); swipeToRefreshEnabled = sharedPreferences.getBoolean("swipe_to_refresh", false); diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java b/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java index f64a9b5d..dcc54893 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java +++ b/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java @@ -60,16 +60,19 @@ public class SettingsFragment extends PreferenceFragment { final Preference torSearchCustomURLPreference = findPreference("tor_search_custom_url"); final Preference searchPreference = findPreference("search"); final Preference searchCustomURLPreference = findPreference("search_custom_url"); + final Preference fullScreenBrowsingModePreference = findPreference("full_screen_browsing_mode"); final Preference hideSystemBarsPreference = findPreference("hide_system_bars"); final Preference translucentNavigationBarPreference = findPreference("translucent_navigation_bar"); final Preference homepagePreference = findPreference("homepage"); final Preference defaultFontSizePreference = findPreference("default_font_size"); + final Preference swipeToRefreshPreference = findPreference("swipe_to_refresh"); + final Preference displayAdditionalAppBarIconsPreference = findPreference("display_additional_app_bar_icons"); // Set dependencies. domStoragePreference.setDependency("javascript_enabled"); torHomepagePreference.setDependency("proxy_through_orbot"); torSearchPreference.setDependency("proxy_through_orbot"); - hideSystemBarsPreference.setDependency("enable_full_screen_browsing_mode"); + hideSystemBarsPreference.setDependency("full_screen_browsing_mode"); // Get strings from the preferences. String torSearchString = savedPreferences.getString("tor_search", "https://3g2upl4pq6kufc4m.onion/html/?q="); @@ -80,6 +83,8 @@ public class SettingsFragment extends PreferenceFragment { boolean firstPartyCookiesEnabledBoolean = savedPreferences.getBoolean("first_party_cookies_enabled", false); boolean thirdPartyCookiesEnabledBoolean = savedPreferences.getBoolean("third_party_cookies_enabled", false); boolean proxyThroughOrbotBoolean = savedPreferences.getBoolean("proxy_through_orbot", false); + boolean fullScreenBrowsingModeBoolean = savedPreferences.getBoolean("full_screen_browsing_mode", false); + boolean hideSystemBarsBoolean = savedPreferences.getBoolean("hide_system_bars", false); // Only enable `thirdPartyCookiesPreference` if `firstPartyCookiesEnabledBoolean` is `true` and API >= 21. thirdPartyCookiesPreference.setEnabled(firstPartyCookiesEnabledBoolean && (Build.VERSION.SDK_INT >= 21)); @@ -147,8 +152,8 @@ public class SettingsFragment extends PreferenceFragment { searchCustomURLPreference.setEnabled(searchString.equals("Custom URL")); - // Enable `transparent_navigation_bar` only if full screen browsing mode is enabled and `hide_system_bars` is disabled. - translucentNavigationBarPreference.setEnabled(savedPreferences.getBoolean("enable_full_screen_browsing_mode", false) && !savedPreferences.getBoolean("hide_system_bars", false)); + // Enable `translucentNavigationBarPreference` only if full screen browsing mode is enabled and `hide_system_bars` is disabled. + translucentNavigationBarPreference.setEnabled(fullScreenBrowsingModeBoolean && !hideSystemBarsBoolean); // Set the homepage URL as the summary text for the `Homepage` preference when the preference screen is loaded. The default is `https://duckduckgo.com`. @@ -236,6 +241,24 @@ public class SettingsFragment extends PreferenceFragment { proxyThroughOrbotPreference.setIcon(R.drawable.orbot_disabled); } + // Set the `torSearchPreference` and `torSearchCustomURLPreference` icons. + if (proxyThroughOrbotBoolean) { + // Set the `torHomepagePreference` and `torSearchPreference` icons. + torHomepagePreference.setIcon(R.drawable.home_enabled); + torSearchPreference.setIcon(R.drawable.search_enabled); + + // Set the `torSearchCustomURLPreference` icon. + if (torSearchCustomURLPreference.isEnabled()) { + torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled); + } else { + torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_disabled); + } + } else { // Proxy through Orbot is disabled. + torHomepagePreference.setIcon(R.drawable.home_ghosted); + torSearchPreference.setIcon(R.drawable.search_ghosted); + torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted); + } + // Set the `searchCustomURLPreference` icon. if (searchCustomURLPreference.isEnabled()) { searchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled); @@ -243,6 +266,47 @@ public class SettingsFragment extends PreferenceFragment { searchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted); } + // Set the full screen browsing mode icons. + if (fullScreenBrowsingModeBoolean) { + // Set the `fullScreenBrowsingModePreference` icon. + fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled); + + if (hideSystemBarsBoolean) { + // Set `hideSystemBarsPreference` to use the enabled icon. + hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled); + + // Set `translucentNavigationBarPreference` to use the ghosted icon. + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted); + } else { // `hideSystemBarsBoolean` is false. + // Set `hideSystemBarsPreference` to use the disabled icon. + hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled); + + // Set the correct icon for `translucentNavigationBarPreference`. + if (savedPreferences.getBoolean("translucent_navigation_bar", true)) { + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled); + } else { + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled); + } + } + } else { // `fullScreenBrwosingModeBoolean` is false. + fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled); + hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_ghosted); + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted); + } + + // Set the `swipeToRefreshPreference` icon. + if (savedPreferences.getBoolean("swipe_to_refresh", false)) { + swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled); + } else { + swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled); + } + + // Set the `displayAdditionalAppBarIconsPreference` icon. + if (savedPreferences.getBoolean("display_additional_app_bar_icons", false)) { + displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled); + } else { + displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled); + } // Listen for preference changes. preferencesListener = new SharedPreferences.OnSharedPreferenceChangeListener() { @@ -401,11 +465,24 @@ public class SettingsFragment extends PreferenceFragment { // Enable the Tor custom URL search option only if `currentProxyThroughOrbot` is true and the search is set to `Custom URL`. torSearchCustomURLPreference.setEnabled(currentProxyThroughOrbot && currentTorSearchString.equals("Custom URL")); - // Update the icon. + // Update the icons. if (currentProxyThroughOrbot) { + // Set the `proxyThroughOrbotPreference`, `torHomepagePreference`, and `torSearchPreference` icons. proxyThroughOrbotPreference.setIcon(R.drawable.orbot_enabled); - } else { + torHomepagePreference.setIcon(R.drawable.home_enabled); + torSearchPreference.setIcon(R.drawable.search_enabled); + + // Set the `torSearchCustomURLPreference` icon. + if (torSearchCustomURLPreference.isEnabled()) { + torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled); + } else { + torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_disabled); + } + } else { // Proxy through Orbot is disabled. proxyThroughOrbotPreference.setIcon(R.drawable.orbot_disabled); + torHomepagePreference.setIcon(R.drawable.home_ghosted); + torSearchPreference.setIcon(R.drawable.search_ghosted); + torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted); } break; @@ -418,17 +495,22 @@ public class SettingsFragment extends PreferenceFragment { // Get the present search string. String presentTorSearchString = sharedPreferences.getString("tor_search", "https://3g2upl4pq6kufc4m.onion/html/?q="); - // Set the summary text for `tor_search`. + // Update the preferences. if (presentTorSearchString.equals("Custom URL")) { - // Use R.string.custom_url, which is translated, instead of the array value, which isn't. + // Use `R.string.custom_url`, which is translated, as the summary instead of the array value, which isn't. torSearchPreference.setSummary(R.string.custom_url); + + // Update `torSearchCustomURLPreference`. + torSearchCustomURLPreference.setEnabled(true); + torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled); } else { // Set the array value as the summary text. torSearchPreference.setSummary(presentTorSearchString); - } - // Set the status of `torJavaScriptDisabledSearchCustomURLPreference`. - torSearchCustomURLPreference.setEnabled(presentTorSearchString.equals("Custom URL")); + // Update `torSearchCustomURLPreference`. + torSearchCustomURLPreference.setEnabled(false); + torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_disabled); + } break; case "tor_search_custom_url": @@ -463,14 +545,70 @@ public class SettingsFragment extends PreferenceFragment { searchCustomURLPreference.setSummary(sharedPreferences.getString("search_custom_url", "")); break; - case "enable_full_screen_browsing_mode": - // Enable `transparent_navigation_bar` only if full screen browsing mode is enabled and `hide_system_bars` is disabled. - translucentNavigationBarPreference.setEnabled(sharedPreferences.getBoolean("enable_full_screen_browsing_mode", false) && !sharedPreferences.getBoolean("hide_system_bars", false)); + case "full_screen_browsing_mode": + if (sharedPreferences.getBoolean("full_screen_browsing_mode", false)) { + // Set `fullScreenBrowsingModePreference` to use the enabled icon. + fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled); + + if (sharedPreferences.getBoolean("hide_system_bars", false)) { + // Set `hideSystemBarsPreference` to use the enabled icon. + hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled); + + // Update `translucentNavigationBarPreference`. + translucentNavigationBarPreference.setEnabled(false); + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted); + } else { // `hide_system_bars` is false. + // Set `hideSystemBarsPreference` to use the disabled icon. + hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled); + + // Update `translucentNavigationBarPreference`. + translucentNavigationBarPreference.setEnabled(true); + if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) { + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled); + } else { + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled); + } + } + } else { // `full_screen_browsing_mode` is false. + // Disable `translucentNavigationBarPreference`. + translucentNavigationBarPreference.setEnabled(false); + + // Update the icons. + fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled); + hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_ghosted); + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted); + } break; case "hide_system_bars": - // Enable `translucentNavigationBarPreference` if `hide_system_bars` is disabled. - translucentNavigationBarPreference.setEnabled(!sharedPreferences.getBoolean("hide_system_bars", false)); + if (sharedPreferences.getBoolean("hide_system_bars", false)) { + // Set `hideSystemBarsPreference` to use the enabled icon. + hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled); + + // Update `translucentNavigationBarPreference`. + translucentNavigationBarPreference.setEnabled(false); + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted); + } else { // `hide_system_bars` is false. + // Set `hideSystemBarsPreference` to use the disabled icon. + hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled); + + // Update `translucentNavigationBarPreference`. + translucentNavigationBarPreference.setEnabled(true); + if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) { + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled); + } else { + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled); + } + } + break; + + case "translucent_navigation_bar": + // Update the icon. + if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) { + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled); + } else { + translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled); + } break; case "homepage": @@ -483,6 +621,24 @@ public class SettingsFragment extends PreferenceFragment { defaultFontSizePreference.setSummary(sharedPreferences.getString("default_font_size", "100") + "%%"); break; + case "swipe_to_refresh": + // Update the icon. + if (sharedPreferences.getBoolean("swipe_to_refresh", false)) { + swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled); + } else { + swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled); + } + break; + + case "display_additional_app_bar_icons": + // Update the icon. + if (sharedPreferences.getBoolean("display_additional_app_bar_icons", false)) { + displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled); + } else { + displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled); + } + break; + default: // If no match, do nothing. break; diff --git a/app/src/main/res/drawable/full_screen_disabled.xml b/app/src/main/res/drawable/full_screen_disabled.xml new file mode 100644 index 00000000..d7d02a37 --- /dev/null +++ b/app/src/main/res/drawable/full_screen_disabled.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/app/src/main/res/drawable/full_screen_enabled.xml b/app/src/main/res/drawable/full_screen_enabled.xml new file mode 100644 index 00000000..533a5eb2 --- /dev/null +++ b/app/src/main/res/drawable/full_screen_enabled.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/app/src/main/res/drawable/hide_system_bars_disabled.xml b/app/src/main/res/drawable/hide_system_bars_disabled.xml new file mode 100644 index 00000000..82f5ba16 --- /dev/null +++ b/app/src/main/res/drawable/hide_system_bars_disabled.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/app/src/main/res/drawable/hide_system_bars_enabled.xml b/app/src/main/res/drawable/hide_system_bars_enabled.xml new file mode 100644 index 00000000..36fb7a61 --- /dev/null +++ b/app/src/main/res/drawable/hide_system_bars_enabled.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/app/src/main/res/drawable/hide_system_bars_ghosted.xml b/app/src/main/res/drawable/hide_system_bars_ghosted.xml new file mode 100644 index 00000000..59a673b6 --- /dev/null +++ b/app/src/main/res/drawable/hide_system_bars_ghosted.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/app/src/main/res/drawable/home.xml b/app/src/main/res/drawable/home_enabled.xml similarity index 65% rename from app/src/main/res/drawable/home.xml rename to app/src/main/res/drawable/home_enabled.xml index a87c3b75..349e6099 100644 --- a/app/src/main/res/drawable/home.xml +++ b/app/src/main/res/drawable/home_enabled.xml @@ -1,4 +1,4 @@ - + = 21. Then we can use `@color`. --> \ No newline at end of file diff --git a/app/src/main/res/drawable/home_ghosted.xml b/app/src/main/res/drawable/home_ghosted.xml new file mode 100644 index 00000000..44c366c8 --- /dev/null +++ b/app/src/main/res/drawable/home_ghosted.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/more_disabled.xml b/app/src/main/res/drawable/more_disabled.xml new file mode 100644 index 00000000..2484a22d --- /dev/null +++ b/app/src/main/res/drawable/more_disabled.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/more_enabled.xml b/app/src/main/res/drawable/more_enabled.xml new file mode 100644 index 00000000..458c8d29 --- /dev/null +++ b/app/src/main/res/drawable/more_enabled.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/refresh_disabled.xml b/app/src/main/res/drawable/refresh_disabled.xml new file mode 100644 index 00000000..b0a3e7b4 --- /dev/null +++ b/app/src/main/res/drawable/refresh_disabled.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/refresh_enabled.xml b/app/src/main/res/drawable/refresh_enabled.xml new file mode 100644 index 00000000..9d1b023e --- /dev/null +++ b/app/src/main/res/drawable/refresh_enabled.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/search_custom_url_disabled.xml b/app/src/main/res/drawable/search_custom_url_disabled.xml new file mode 100644 index 00000000..ff0969b9 --- /dev/null +++ b/app/src/main/res/drawable/search_custom_url_disabled.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/search_ghosted.xml b/app/src/main/res/drawable/search_ghosted.xml new file mode 100644 index 00000000..e078033b --- /dev/null +++ b/app/src/main/res/drawable/search_ghosted.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/translucent_bar_disabled.xml b/app/src/main/res/drawable/translucent_bar_disabled.xml new file mode 100644 index 00000000..395dea04 --- /dev/null +++ b/app/src/main/res/drawable/translucent_bar_disabled.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/app/src/main/res/drawable/translucent_bar_enabled.xml b/app/src/main/res/drawable/translucent_bar_enabled.xml new file mode 100644 index 00000000..d7b10efc --- /dev/null +++ b/app/src/main/res/drawable/translucent_bar_enabled.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/app/src/main/res/drawable/translucent_bar_ghosted.xml b/app/src/main/res/drawable/translucent_bar_ghosted.xml new file mode 100644 index 00000000..efa1137d --- /dev/null +++ b/app/src/main/res/drawable/translucent_bar_ghosted.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/app/src/main/res/drawable/user_agent_enabled.xml b/app/src/main/res/drawable/user_agent_enabled.xml deleted file mode 100644 index 35fba81a..00000000 --- a/app/src/main/res/drawable/user_agent_enabled.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/menu/webview_navigation_menu.xml b/app/src/main/res/menu/webview_navigation_menu.xml index 8cac40c3..06599268 100644 --- a/app/src/main/res/menu/webview_navigation_menu.xml +++ b/app/src/main/res/menu/webview_navigation_menu.xml @@ -23,7 +23,7 @@ URL personalizado de búsqueda URL personalizado Pantalla Completa - Habilitar pantalla completa - Doble toque para alternar a modo de navegación de pantalla completa. + Navegación de pantalla completa + Doble toque para alternar a modo de navegación de pantalla completa. Esconder barras del systema Esconder las barras de estado y de navegación en el modo de navegación a pantalla completa. Esto no funciona bien si el teclado es mostrado durante el modo de navegación a pantalla completa. Barra de navegación translúcida diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 3d6e76fc..2a811071 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -262,8 +262,8 @@ Ricerca personalizzata URL Personalizzata Schermo intero - Abilita la navigazione a schermo intero - Toccare due volte per avviare la navigazione a schermo intero. + Navigazione a schermo intero + Toccare due volte per avviare la navigazione a schermo intero. Nascondi le barre di sistema Nasconde la barra di stato e la barra di navigazione durante la navigazione a schermo intero. Questa opzione non funziona perfettamente se si visualizza la tastiera durante la navigazione a schermo intero. Barra di navigazione trasparente diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 02f96f0d..aed97ad5 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -264,8 +264,8 @@ Search custom URL Custom URL Full Screen - Enable full screen browsing mode - Double-tap to toggle full screen browsing mode. + Full screen browsing mode + Double-tap to toggle full screen browsing mode. Hide system bars Hide the status and navigation bars in full screen browsing mode. This doesn\'t work well if the keyboard is displayed during full screen browsing mode. Translucent navigation bar diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3552849b..dfff1a27 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -298,10 +298,10 @@ Search custom URL Custom URL Full Screen - Enable full screen browsing mode - Double-tap to toggle full screen browsing mode. + Full screen browsing mode + Double-tap to toggle full screen browsing mode. Hide system bars - Hide the status and navigation bars in full screen browsing mode. This doesn\'t work well if the keyboard is displayed during full screen browsing mode. + Hide the status and navigation bars in full screen browsing mode. This doesn’t work well if the keyboard is displayed during full screen browsing mode. Translucent navigation bar Make the navigation bar translucent in full screen browsing mode. General @@ -328,7 +328,7 @@ 200 Swipe to refresh - Some websites don\'t work well if swipe to refresh is enabled. + Some websites don’t work well if swipe to refresh is enabled. Display additional app bar icons Display icons for toggling cookies, DOM storage, and form data in the app bar if there is room. diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 2263b0c4..194aa4d3 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -141,9 +141,9 @@ android:title="@string/full_screen"> + android:inputType="textUri" + android:icon="@drawable/home_enabled" />