Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rate button #2036

Merged
merged 1 commit into from
Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/src/main/java/io/pslab/activity/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
navItemIndex = 5;
CURRENT_TAG = TAG_ABOUTUS;
break;
case R.id.nav_rate:
customTabService.launchUrl("https://play.google.com/store/apps/details?id=io.pslab");
if (drawer != null) {
drawer.closeDrawers();
}
case R.id.nav_help_feedback:
navItemIndex = 7;
CURRENT_TAG = TAG_FAQ;
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/menu/activity_main_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
android:checkable="true"
android:icon="@drawable/ic_info_black_24dp"
android:title="@string/nav_about_us" />
<item
android:id="@+id/nav_rate"
android:checkable="true"
android:icon="@android:drawable/btn_star"
android:title="@string/rateapp" />
<item
android:id="@+id/nav_buy_pslab"
android:checkable="true"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<resources>
<string name="app_name">PSLab</string>
<string name="openDrawer">open_drawer</string>
<string name="closeDrawer">close_drawer</string>
Expand Down Expand Up @@ -1037,5 +1037,5 @@
<string name="no_location_specified">Location not specified</string>
<string name="compass_default_0">0</string>
<string name="unknown">Unknown</string>

<string name="rateapp">Rate App</string>
</resources>