diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index a2fe35894..a64ed7ff4 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -135,8 +135,12 @@ public class AboutActivity extends AppCompatActivity { View githubLink = rootView.findViewById(R.id.github_link); githubLink.setOnClickListener(new OnGithubLinkClickListener()); - View licenseLink = rootView.findViewById(R.id.app_read_license); - licenseLink.setOnClickListener(new OnReadFullLicenseClickListener()); + View donationLink = rootView.findViewById(R.id.donation_link); + donationLink.setOnClickListener(new OnDonationLinkClickListener()); + + View websiteLink = rootView.findViewById(R.id.website_link); + websiteLink.setOnClickListener(new OnWebsiteLinkClickListener()); + return rootView; } @@ -149,10 +153,21 @@ public class AboutActivity extends AppCompatActivity { } } - private static class OnReadFullLicenseClickListener implements View.OnClickListener { + private static class OnDonationLinkClickListener implements View.OnClickListener { @Override - public void onClick(View v) { - LicenseFragment.showLicense(v.getContext(), StandardLicenses.GPL3); + public void onClick(final View view) { + final Context context = view.getContext(); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(context.getString(R.string.donation_url))); + context.startActivity(intent); + } + } + + private static class OnWebsiteLinkClickListener implements View.OnClickListener { + @Override + public void onClick(final View view) { + final Context context = view.getContext(); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(context.getString(R.string.website_url))); + context.startActivity(intent); } } } diff --git a/app/src/main/java/org/schabi/newpipe/about/LicenseFragment.java b/app/src/main/java/org/schabi/newpipe/about/LicenseFragment.java index 4400cac53..272e27240 100644 --- a/app/src/main/java/org/schabi/newpipe/about/LicenseFragment.java +++ b/app/src/main/java/org/schabi/newpipe/about/LicenseFragment.java @@ -62,6 +62,9 @@ public class LicenseFragment extends Fragment { View rootView = inflater.inflate(R.layout.fragment_licenses, container, false); ViewGroup softwareComponentsView = rootView.findViewById(R.id.software_components); + View licenseLink = rootView.findViewById(R.id.app_read_license); + licenseLink.setOnClickListener(new OnReadFullLicenseClickListener()); + for (final SoftwareComponent component : softwareComponents) { View componentView = inflater.inflate(R.layout.item_software_component, container, false); TextView softwareName = componentView.findViewById(R.id.name); @@ -119,4 +122,11 @@ public class LicenseFragment extends Fragment { Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(componentLink)); startActivity(browserIntent); } + + private static class OnReadFullLicenseClickListener implements View.OnClickListener { + @Override + public void onClick(View v) { + LicenseFragment.showLicense(v.getContext(), StandardLicenses.GPL3); + } + } } diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index aa154072a..6e1db563a 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -45,6 +45,7 @@ android:id="@+id/app_description" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:paddingBottom="5dp" android:text="@string/app_description" /> -