Skip to content

Commit

Permalink
Add donation information in About Activity.
Browse files Browse the repository at this point in the history
  • Loading branch information
flackbash committed May 23, 2021
1 parent 18df4b0 commit 7d3223a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.method.LinkMovementMethod;
import android.widget.TextView;

import com.prangesoftwaresolutions.audioanchor.R;
Expand All @@ -19,6 +20,10 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);

// Make paypal link clickable
TextView paypalLinkTV = findViewById(R.id.paypal_link_tv);
paypalLinkTV.setMovementMethod(LinkMovementMethod.getInstance());

mVersionName = findViewById(R.id.about_text_tv);

// Extract the version name of the app
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@
android:text="@string/about_report_bugs"
android:textAlignment="center"/>

<TextView
android:id="@+id/paypal_link_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColorLink="@color/colorPrimaryDark"
android:linksClickable="true"
android:textSize="@dimen/small_font_size"
android:paddingEnd="@dimen/large_margin"
android:paddingStart="@dimen/large_margin"
android:paddingTop="@dimen/large_margin"
android:text="@string/about_donations"
android:textAlignment="center"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<string name="playback_speed">Playback speed</string>
<string name="about_contributors">For a list of contributors visit</string>
<string name="about_report_bugs">This is also the place to report bugs, make a contribution yourself or leave a star if you like the app.</string>
<string name="about_donations">If you like the app and wish to make a donation you can do so via <a href="https://www.paypal.com/donate/?hosted_button_id=ZTVWJXZUVE64U">PayPal</a> (thank you :) ).</string>
<string name="add_sub_dir">Add directory that\ncontains audio files</string>
<string name="add_parent_dir">Add directory with\nsubdirectories that\ncontain audio files</string>
<string name="add_directory">You can select a single directory that contains audio files or a parent directory that contains several directories containing audio files.</string>
Expand Down

0 comments on commit 7d3223a

Please sign in to comment.