Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS123-CanteeneoAndroid
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Willard Torres
CS123-CanteeneoAndroid
Commits
923ee019
Commit
923ee019
authored
Nov 09, 2016
by
Tup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the filter but the checkable thing is still broken
parent
f21f28a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
11 deletions
+59
-11
vcs.xml
.idea/vcs.xml
+1
-0
NavDrawerActivity.java
app/src/main/java/com/testapp/NavDrawerActivity.java
+4
-3
activity_nav_drawer_drawer.xml
app/src/main/res/menu/activity_nav_drawer_drawer.xml
+45
-8
strings.xml
app/src/main/res/values/strings.xml
+9
-0
No files found.
.idea/vcs.xml
View file @
923ee019
...
...
@@ -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
app/src/main/java/com/testapp/NavDrawerActivity.java
View file @
923ee019
...
...
@@ -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
;
}
...
...
app/src/main/res/menu/activity_nav_drawer_drawer.xml
View file @
923ee019
<?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>
app/src/main/res/values/strings.xml
View file @
923ee019
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment