Skip to content

Commit

Permalink
Add link to privacy policy
Browse files Browse the repository at this point in the history
  • Loading branch information
kaaholst committed Dec 24, 2024
1 parent d56249a commit 11efc6a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.DialogFragment;

import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.TextView;

Expand All @@ -42,6 +44,10 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
final View view = getActivity().getLayoutInflater().inflate(R.layout.about_dialog, null);
final TextView titleText = view.findViewById(R.id.about_title);
final TextView versionText = view.findViewById(R.id.version_text);
final TextView support = view.findViewById(R.id.support);
final TextView privacy = view.findViewById(R.id.privacy);
support.setMovementMethod(LinkMovementMethod.getInstance());
privacy.setMovementMethod(LinkMovementMethod.getInstance());

PackageManager pm = getActivity().getPackageManager();
PackageInfo info;
Expand Down
9 changes: 5 additions & 4 deletions Squeezer/src/main/res/layout/about_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ limitations under the License.

<TextView
android:id="@+id/support"
android:textAppearance="@style/SqueezerTextAppearance.Medium"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/authors"
Expand All @@ -95,12 +95,13 @@ limitations under the License.
android:text="@string/about_support"/>

<TextView
android:textAppearance="@style/SqueezerTextAppearance.Small"
android:id="@+id/privacy"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/support"
app:layout_constraintStart_toStartOf="parent"
android:autoLink="web"
android:text="@string/about_support_text"/>
android:paddingTop="16dp"
android:text="@string/about_privacy_policy"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
4 changes: 2 additions & 2 deletions Squeezer/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ of your accepting any such warranty or additional liability.&lt;/p&gt;</string>

<string name="about_team" translatable="false">Team</string>
<string name="about_authors" translatable="false">Benjamin Viertel\nKurt Aaholst\nNik Clayton\nBrad Fitzpatrick</string>
<string name="about_support" translatable="false">Support</string>
<string name="about_support_text" translatable="false">https://github.com/kaaholst/android-squeezer</string>
<string name="about_support" translatable="false"><a href="https://github.com/kaaholst/android-squeezer">Support</a></string>
<string name="about_privacy_policy" translatable="false"><a href="https://github.com/kaaholst/android-squeezer/blob/develop/PRIVACY.md">Privacy policy</a></string>
<string name="mysqueezebox_com" translatable="false">mysqueezebox.com</string>
<string name="configure_select_player">Select player to control</string>
<string name="configure_select_button">Widget action</string>
Expand Down

0 comments on commit 11efc6a

Please sign in to comment.