mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Add developer plans to nav drawer
This commit is contained in:
parent
1c9989d658
commit
07102c04e9
4 changed files with 24 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ package fr.free.nrw.commons.theme;
|
|||
import android.content.ActivityNotFoundException;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.NavigationView;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
|
|
@ -114,6 +115,14 @@ public class NavigationBaseActivity extends BaseActivity
|
|||
Toast.makeText(this, R.string.no_email_client, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
return true;
|
||||
case R.id.action_developer_plans:
|
||||
drawerLayout.closeDrawer(navigationView);
|
||||
// Go to the page
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri
|
||||
.parse(getResources()
|
||||
.getString(R.string.feedback_page_url)));
|
||||
startActivity(browserIntent);
|
||||
return true;
|
||||
case R.id.action_logout:
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(R.string.logout_verification)
|
||||
|
|
|
|||
9
app/src/main/res/drawable/ic_help_outline_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_help_outline_black_24dp.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z"/>
|
||||
</vector>
|
||||
|
|
@ -30,6 +30,11 @@
|
|||
android:icon="@drawable/ic_feedback_black_24dp"
|
||||
android:title="@string/navigation_item_feedback"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_developer_plans"
|
||||
android:icon="@drawable/ic_help_outline_black_24dp"
|
||||
android:title="@string/navigation_item_developer_plans"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_logout"
|
||||
android:icon="@drawable/ic_exit_to_app_black_24dp"
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ Tap this message (or hit back) to skip this step.</string>
|
|||
<string name="navigation_item_feedback">Feedback</string>
|
||||
<string name="navigation_item_logout">Logout</string>
|
||||
<string name="navigation_item_info">Tutorial</string>
|
||||
<string name="navigation_item_developer_plans">Developer plans</string>
|
||||
|
||||
<string name="nearby_needs_permissions">Nearby places cannot be displayed without location permissions</string>
|
||||
<string name="no_description_found">no description found</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue