Commit 923ee019 authored by Tup's avatar Tup

Added the filter but the checkable thing is still broken

parent f21f28a2
......@@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -16,6 +16,7 @@ import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
......@@ -188,14 +189,14 @@ public class NavDrawerActivity extends AppCompatActivity
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_camera) {
if (id == R.id.nav_all_items) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_filter) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
//drawer.closeDrawer(GravityCompat.START);
return true;
}
......
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<group android:id="@+id/grp1" >
<item
android:id="@+id/nav_camera"
android:icon="@android:drawable/ic_menu_view"
android:title="@string/drawer_1" />
android:id="@+id/nav_all_items"
android:title="@string/drawer_1"
android:checkable="false" />
</group>
<group
android:id="@+id/grp2">
<item
android:id="@+id/nav_gallery"
android:icon="@android:drawable/ic_menu_sort_by_size"
android:id="@+id/nav_filter"
android:title="@string/drawer_2"
/>
android:checkable="false" />
<item
android:id="@+id/nav_type"
android:title="@string/drawer_3"
android:checkable="false" />
<item android:title="@string/drawer_3_1"
android:id="@+id/nav_type_main"
android:checkable="true" />
<item android:title="@string/drawer_3_2"
android:id="@+id/nav_type_drink"
android:checkable="true" />
<item android:title="@string/drawer_3_3"
android:id="@+id/nav_type_dessert"
android:checkable="true" />
<item
android:id="@+id/nav_pricerange"
android:title="@string/drawer_4"
android:checkable="false"
android:visible="false" />
<item
android:id="@+id/nav_locations"
android:title="@string/drawer_5"
android:checkable="false" />
<item android:title="@string/drawer_5_3"
android:id="@+id/nav_locations_zekaf"
android:checkable="true" />
<item android:title="@string/drawer_5_1"
android:checkable="true"
android:id="@+id/nav_location_gonzaga" />
<item android:title="@string/drawer_5_2"
android:id="@+id/nav_location_JSEC"
android:checkable="true" />
</group>
</menu>
......@@ -16,6 +16,15 @@
<string name="title_activity_nav_drawer">Main Menu</string>
<string name="drawer_1">All Items</string>
<string name="drawer_2">Filters</string>
<string name="drawer_3">Type</string>
<string name="drawer_3_1"> Main Course</string>
<string name="drawer_3_2"> Drink</string>
<string name="drawer_3_3"> Dessert</string>
<string name="drawer_4">Price Range</string>
<string name="drawer_5">Locations</string>
<string name="drawer_5_1"> Gonzaga</string>
<string name="drawer_5_2"> JSEC</string>
<string name="drawer_5_3"> Zekaf</string>
<string name="hint_search">Search</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment