diff --git a/res/drawable/ic_baseline_info_24.xml b/res/drawable/ic_baseline_info_24.xml new file mode 100644 --- /dev/null +++ b/res/drawable/ic_baseline_info_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#000000" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/> +</vector> diff --git a/res/drawable/ic_outline_info_24.xml b/res/drawable/ic_outline_info_24.xml new file mode 100644 --- /dev/null +++ b/res/drawable/ic_outline_info_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#000000" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M11,7h2v2h-2zM11,11h2v6h-2zM12,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,8z"/> +</vector> diff --git a/res/menu/drawer_main.xml b/res/menu/drawer_main.xml --- a/res/menu/drawer_main.xml +++ b/res/menu/drawer_main.xml @@ -25,4 +25,9 @@ android:icon="@drawable/ic_baseline_settings_24" /> + <item android:id="@+id/drawer_action_info" + android:title="@string/action_about" + android:icon="@drawable/ic_outline_info_24" + /> + </menu> \ No newline at end of file diff --git a/src/it/reyboz/bustorino/ActivityPrincipal.java b/src/it/reyboz/bustorino/ActivityPrincipal.java --- a/src/it/reyboz/bustorino/ActivityPrincipal.java +++ b/src/it/reyboz/bustorino/ActivityPrincipal.java @@ -283,6 +283,10 @@ closeDrawerIfOpen(); showLinesFragment(getSupportFragmentManager(), true,null); return true; + } else if(menuItem.getItemId() == R.id.drawer_action_info) { + closeDrawerIfOpen(); + startActivity(new Intent(ActivityPrincipal.this, ActivityAbout.class)); + return true; } //selectDrawerItem(menuItem); Log.d(DEBUG_TAG, "pressed item "+menuItem);