From: Soren Stoutner Date: Wed, 25 Aug 2021 19:57:47 +0000 (-0700) Subject: Add the URL entries to the navigation menu. X-Git-Tag: v1.0~1 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=bfab9b01fcc75d413741664d8401a4e9d4785136;p=PrivacyCell.git Add the URL entries to the navigation menu. --- diff --git a/app/src/main/assets/en/licenses.html b/app/src/main/assets/en/licenses.html index d594815..bf26251 100644 --- a/app/src/main/assets/en/licenses.html +++ b/app/src/main/assets/en/licenses.html @@ -52,9 +52,14 @@

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.

+

bug_report_rounded.

+

chrome_reader_mode_rounded.

fact_checked_outlined.

format_list_bulleted_rounded.

+

forum_rounded.

groups_filled.

+

map_rounded.

+

payments_rounded.

phone_android_outlined.

policy_filled.

text_snippet_outlined.

diff --git a/app/src/main/assets/images/bug_report_rounded.svg b/app/src/main/assets/images/bug_report_rounded.svg new file mode 100644 index 0000000..dba6977 --- /dev/null +++ b/app/src/main/assets/images/bug_report_rounded.svg @@ -0,0 +1,30 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/images/chrome_reader_mode_rounded.svg b/app/src/main/assets/images/chrome_reader_mode_rounded.svg new file mode 100644 index 0000000..58d88d8 --- /dev/null +++ b/app/src/main/assets/images/chrome_reader_mode_rounded.svg @@ -0,0 +1,30 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/images/forum_rounded.svg b/app/src/main/assets/images/forum_rounded.svg new file mode 100644 index 0000000..3d8b42b --- /dev/null +++ b/app/src/main/assets/images/forum_rounded.svg @@ -0,0 +1,30 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/images/map_rounded.svg b/app/src/main/assets/images/map_rounded.svg new file mode 100644 index 0000000..f2adfd5 --- /dev/null +++ b/app/src/main/assets/images/map_rounded.svg @@ -0,0 +1,30 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/images/payments_rounded.svg b/app/src/main/assets/images/payments_rounded.svg new file mode 100644 index 0000000..f0a54c2 --- /dev/null +++ b/app/src/main/assets/images/payments_rounded.svg @@ -0,0 +1,30 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/stoutner/privacycell/activities/PrivacyCell.kt b/app/src/main/java/com/stoutner/privacycell/activities/PrivacyCell.kt index eec29e4..84d8db6 100644 --- a/app/src/main/java/com/stoutner/privacycell/activities/PrivacyCell.kt +++ b/app/src/main/java/com/stoutner/privacycell/activities/PrivacyCell.kt @@ -21,7 +21,9 @@ package com.stoutner.privacycell.activities import android.Manifest import android.content.Context +import android.content.Intent import android.content.pm.PackageManager +import android.net.Uri import android.os.Bundle import android.telephony.PhoneStateListener import android.telephony.ServiceState @@ -203,6 +205,61 @@ class PrivacyCell : AppCompatActivity(), NavigationView.OnNavigationItemSelected // Show the alert dialog. contributorsDialogFragment.show(supportFragmentManager, getString(R.string.contributors)) } + + R.id.news -> { // News. + // Create a news URL intent. + val newsUrlIntent = Intent(Intent.ACTION_VIEW) + + // Add the URL to the intent. + newsUrlIntent.data = Uri.parse("https://www.stoutner.com/category/privacy-cell/") + + // Make it so. + startActivity(newsUrlIntent) + } + + R.id.roadmap -> { // Roadmap. + // Create a roadmap URL intent. + val roadmapUrlIntent = Intent(Intent.ACTION_VIEW) + + // Add the URL to the intent. + roadmapUrlIntent.data = Uri.parse("https://www.stoutner.com/category/privacy-cell-roadmap/") + + // Make it so. + startActivity(roadmapUrlIntent) + } + + R.id.bug_tracker -> { // Bug tracker. + // Create a bug tracker URL intent. + val bugTrackerUrlIntent = Intent(Intent.ACTION_VIEW) + + // Add the URL to the intent. + bugTrackerUrlIntent.data = Uri.parse("https://redmine.stoutner.com/projects/privacy-cell/issues") + + // Make it so. + startActivity(bugTrackerUrlIntent) + } + + R.id.forum -> { // Forum. + // Create a forum URL intent. + val forumUrlIntent = Intent(Intent.ACTION_VIEW) + + // Add the URL to the intent. + forumUrlIntent.data = Uri.parse("https://redmine.stoutner.com/projects/privacy-cell/boards") + + // Make it so. + startActivity(forumUrlIntent) + } + + R.id.donations -> { // Donations. + // Create a donations URL intent. + val donationsUrlIntent = Intent(Intent.ACTION_VIEW) + + // Add the URL to the intent. + donationsUrlIntent.data = Uri.parse("https://www.stoutner.com/donations/") + + // Make it so. + startActivity(donationsUrlIntent) + } } // Close the navigation drawer. diff --git a/app/src/main/res/drawable/bug_tracker.xml b/app/src/main/res/drawable/bug_tracker.xml new file mode 100644 index 0000000..fb34073 --- /dev/null +++ b/app/src/main/res/drawable/bug_tracker.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/donations.xml b/app/src/main/res/drawable/donations.xml new file mode 100644 index 0000000..b0f7e29 --- /dev/null +++ b/app/src/main/res/drawable/donations.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/forum.xml b/app/src/main/res/drawable/forum.xml new file mode 100644 index 0000000..25e4421 --- /dev/null +++ b/app/src/main/res/drawable/forum.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/news.xml b/app/src/main/res/drawable/news.xml new file mode 100644 index 0000000..7c2e1e9 --- /dev/null +++ b/app/src/main/res/drawable/news.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/roadmap.xml b/app/src/main/res/drawable/roadmap.xml new file mode 100644 index 0000000..2eba771 --- /dev/null +++ b/app/src/main/res/drawable/roadmap.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/navigation_menu_top_appbar.xml b/app/src/main/res/menu/navigation_menu_top_appbar.xml index cf8437f..745e866 100644 --- a/app/src/main/res/menu/navigation_menu_top_appbar.xml +++ b/app/src/main/res/menu/navigation_menu_top_appbar.xml @@ -54,25 +54,25 @@ @@ -81,7 +81,7 @@ \ No newline at end of file