Skip to content

Commit

Permalink
Implement privacy policy and Transifex links (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
patzly committed Dec 26, 2023
1 parent b4cc178 commit 6c62aaf
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public void onViewCreated(@Nullable View view, @Nullable Bundle savedInstanceSta
R.id.linear_changelog,
R.id.linear_developers,
R.id.linear_github,
R.id.linear_translation,
R.id.linear_privacy,
R.id.linear_license_conscrypt,
R.id.linear_license_fuzzywuzzy,
R.id.linear_license_gson,
Expand Down Expand Up @@ -133,6 +135,17 @@ public void onClick(View v) {
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.url_github))
));
} else if (v.getId() == R.id.linear_translation) {
startActivity(new Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.url_translate))
));
} else if (v.getId() == R.id.linear_privacy) {
ViewUtil.startIcon(binding.imagePrivacy);
startActivity(new Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.url_privacy))
));
} else if (v.getId() == R.id.linear_license_conscrypt) {
ViewUtil.startIcon(binding.imageLicenseConscrypt);
activity.showTextBottomSheet(
Expand Down
104 changes: 104 additions & 0 deletions app/src/main/res/drawable/ic_round_policy_anim.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<!--
~ This file is part of Grocy Android.
~
~ Grocy Android 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.
~
~ Grocy Android 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 Grocy Android. If not, see http://www.gnu.org/licenses/.
~
~ Copyright (c) 2020-2023 by Patrick Zedler and Dominic Zedler
-->

<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt">
<aapt:attr name="android:drawable">
<vector
android:name="vector"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<clip-path
android:name="mask"
android:pathData="M 11.996 1.188 C 11.72 1.188 11.444 1.244 11.189 1.359 L 4.189 4.471 C 3.469 4.791 3 5.511 3 6.301 L 3 11 C 3 16.55 6.84 21.74 12 23 C 17.106 21.719 21 16.576 21 11 L 21 6.301 C 21 5.511 20.531 4.791 19.811 4.471 L 12.811 1.359 C 12.551 1.244 12.272 1.188 11.996 1.188 Z" />
<group
android:name="group"
android:pivotX="18"
android:pivotY="18">
<path
android:name="path"
android:pathData="M -5 -5 L -5 29 L 27.586 29 L 14.754 16.168 C 13.937 16.709 12.98 16.998 12 17 C 10.674 17 9.402 16.473 8.464 15.536 C 7.527 14.598 7 13.326 7 12 C 7 10.674 7.527 9.402 8.464 8.464 C 9.402 7.527 10.674 7 12 7 C 13.326 7 14.598 7.527 15.536 8.464 C 16.473 9.402 17 10.674 17 12 C 16.998 12.98 16.709 13.937 16.168 14.754 L 29 27.586 L 29 -5 L -5 -5 Z M 12 9 C 11.205 9 10.441 9.316 9.879 9.879 C 9.316 10.441 9 11.205 9 12 C 9 12.795 9.316 13.559 9.879 14.121 C 10.441 14.684 11.205 15 12 15 C 12.795 15 13.559 14.684 14.121 14.121 C 14.684 13.559 15 12.795 15 12 C 15 11.205 14.684 10.441 14.121 9.879 C 13.559 9.316 12.795 9 12 9 Z"
android:fillColor="?attr/colorOnSurfaceVariant"
android:strokeWidth="1" />
</group>
</vector>
</aapt:attr>
<target android:name="group">
<aapt:attr name="android:animation">
<set>
<objectAnimator
android:propertyName="rotation"
android:duration="120"
android:valueFrom="0"
android:valueTo="20"
android:valueType="floatType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
<objectAnimator
android:propertyName="translateX"
android:duration="100"
android:valueFrom="0"
android:valueTo="-4"
android:valueType="floatType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
<objectAnimator
android:propertyName="rotation"
android:startOffset="120"
android:duration="180"
android:valueFrom="20"
android:valueTo="0"
android:valueType="floatType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
<objectAnimator
android:propertyName="translateX"
android:startOffset="100"
android:duration="100"
android:valueFrom="-4"
android:valueTo="1"
android:valueType="floatType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
<objectAnimator
android:propertyName="translateY"
android:duration="120"
android:valueFrom="0"
android:valueTo="4"
android:valueType="floatType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
<objectAnimator
android:propertyName="translateY"
android:startOffset="120"
android:duration="100"
android:valueFrom="4"
android:valueTo="0"
android:valueType="floatType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
<objectAnimator
android:propertyName="translateX"
android:startOffset="200"
android:duration="100"
android:valueFrom="1"
android:valueTo="0"
android:valueType="floatType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
</set>
</aapt:attr>
</target>
</animated-vector>
29 changes: 29 additions & 0 deletions app/src/main/res/drawable/ic_round_translate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
~ This file is part of Grocy Android.
~
~ Grocy Android 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.
~
~ Grocy Android 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 Grocy Android. If not, see http://www.gnu.org/licenses/.
~
~ Copyright (c) 2020-2023 by Patrick Zedler and Dominic Zedler
-->

<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12.65,15.67c0.14,-0.36 0.05,-0.77 -0.23,-1.05l-2.09,-2.06 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53h1.94c0.54,0 0.99,-0.45 0.99,-0.99v-0.02c0,-0.54 -0.45,-0.99 -0.99,-0.99L10,4L10,3c0,-0.55 -0.45,-1 -1,-1s-1,0.45 -1,1v1L1.99,4c-0.54,0 -0.99,0.45 -0.99,0.99 0,0.55 0.45,0.99 0.99,0.99h10.18C11.5,7.92 10.44,9.75 9,11.35c-0.81,-0.89 -1.49,-1.86 -2.06,-2.88 -0.16,-0.29 -0.45,-0.47 -0.78,-0.47 -0.69,0 -1.13,0.75 -0.79,1.35 0.63,1.13 1.4,2.21 2.3,3.21L3.3,16.87c-0.4,0.39 -0.4,1.03 0,1.42 0.39,0.39 1.02,0.39 1.42,0L9,14l2.02,2.02c0.51,0.51 1.38,0.32 1.63,-0.35zM17.5,10c-0.6,0 -1.14,0.37 -1.35,0.94l-3.67,9.8c-0.24,0.61 0.22,1.26 0.87,1.26 0.39,0 0.74,-0.24 0.88,-0.61l0.89,-2.39h4.75l0.9,2.39c0.14,0.36 0.49,0.61 0.88,0.61 0.65,0 1.11,-0.65 0.88,-1.26l-3.67,-9.8c-0.22,-0.57 -0.76,-0.94 -1.36,-0.94zM15.88,17l1.62,-4.33L19.12,17h-3.24z"
android:fillColor="#000" />
</vector>
47 changes: 47 additions & 0 deletions app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,53 @@

</LinearLayout>

<LinearLayout
android:id="@+id/linear_translation"
style="@style/Widget.Grocy.LinearLayout.ListItem.TwoLine.Clickable">

<ImageView
style="@style/Widget.Grocy.ImageView.ListItem.Icon"
android:src="@drawable/ic_round_translate"
tools:ignore="ContentDescription" />

<LinearLayout style="@style/Widget.Grocy.LinearLayout.ListItem.TextBox">

<TextView
style="@style/Widget.Grocy.TextView.ListItem.OverLine"
android:text="@string/info_translation" />

<TextView
style="@style/Widget.Grocy.TextView.ListItem.Title"
android:text="@string/info_translation_description" />

</LinearLayout>

</LinearLayout>

<LinearLayout
android:id="@+id/linear_privacy"
style="@style/Widget.Grocy.LinearLayout.ListItem.TwoLine.Clickable">

<ImageView
android:id="@+id/image_privacy"
style="@style/Widget.Grocy.ImageView.ListItem.Icon.Colored"
android:src="@drawable/ic_round_policy_anim"
tools:ignore="ContentDescription" />

<LinearLayout style="@style/Widget.Grocy.LinearLayout.ListItem.TextBox">

<TextView
style="@style/Widget.Grocy.TextView.ListItem.OverLine"
android:text="@string/info_privacy" />

<TextView
style="@style/Widget.Grocy.TextView.ListItem.Title"
android:text="@string/info_privacy_description" />

</LinearLayout>

</LinearLayout>

<LinearLayout
android:id="@+id/linear_intro"
style="@style/Widget.Grocy.LinearLayout.ListItem.TwoLine.Clickable">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/raw/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Fixed: ML Kit scanner could not start again after going to "choose product" page in
normal mode (not quick mode)
- Fixed: Impossible login due to disabled animations (#814)
- Fixed: Privacy policy link missing (#813)

## 3.4.2

Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,10 @@
<string name="info_github">Grocy Android on GitHub</string>
<string name="info_github_description">Source code</string>
<string name="info_website">Open Grocy website</string>
<string name="info_translation" translatable="false">Transifex</string>
<string name="info_translation_description">Help translate Grocy Android</string>
<string name="info_privacy">Privacy policy</string>
<string name="info_privacy_description">How is your data processed?</string>

<string name="feature_1_title">Grocy for Android</string>
<string name="feature_1_description">Self-hosted grocery management for your home</string>
Expand Down Expand Up @@ -1348,6 +1352,8 @@
<string name="url_developer" translatable="false">http://play.google.com/store/apps/dev?id=5870283381366287608</string>
<string name="url_github" translatable="false">https://github.com/patzly/grocy-android/</string>
<string name="url_github_issues" translatable="false">https://github.com/patzly/grocy-android/issues/</string>
<string name="url_translate" translatable="false">https://app.transifex.com/patzly/grocy-android/</string>
<string name="url_privacy" translatable="false">https://patrickzedler.com/grocy/privacy-policy-grocy/</string>

<string name="url_conscrypt" translatable="false">https://github.com/google/conscrypt/</string>
<string name="url_fuzzywuzzy" translatable="false">https://github.com/xdrop/fuzzywuzzy</string>
Expand Down

0 comments on commit 6c62aaf

Please sign in to comment.