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
1dadb1d9
Commit
1dadb1d9
authored
Nov 24, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wrong reference to service
parent
89301510
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
NavDrawerActivity.java
app/src/main/java/com/testapp/NavDrawerActivity.java
+4
-6
No files found.
app/src/main/java/com/testapp/NavDrawerActivity.java
View file @
1dadb1d9
...
...
@@ -45,8 +45,6 @@ import retrofit2.converter.gson.GsonConverterFactory;
public
class
NavDrawerActivity
extends
AppCompatActivity
implements
NavigationView
.
OnNavigationItemSelectedListener
{
private
CanteeneoApiInterface
service
;
private
static
Context
c
;
private
DishAdapter
adapter
;
private
ArrayList
<
Dish
>
dishes
=
new
ArrayList
<>();
...
...
@@ -82,9 +80,9 @@ public class NavDrawerActivity extends AppCompatActivity implements NavigationVi
String
message
=
intent
.
getStringExtra
(
LoginActivity
.
EXTRA_MESSAGE
);
Toast
.
makeText
(
NavDrawerActivity
.
this
,
message
,
Toast
.
LENGTH_SHORT
).
show
();
populateFilter
(
service
.
getDishTypes
(),
R
.
id
.
type_checkboxes
);
populateFilter
(
service
.
getCuisines
(),
R
.
id
.
cuisine_checkboxes
);
populateFilter
(
service
.
getLocations
(),
R
.
id
.
location_checkboxes
);
populateFilter
(
AppUtils
.
service
.
getDishTypes
(),
R
.
id
.
type_checkboxes
);
populateFilter
(
AppUtils
.
service
.
getCuisines
(),
R
.
id
.
cuisine_checkboxes
);
populateFilter
(
AppUtils
.
service
.
getLocations
(),
R
.
id
.
location_checkboxes
);
ListView
lv
=
(
ListView
)
findViewById
(
R
.
id
.
listView
);
adapter
=
new
DishAdapter
(
this
,
dishes
);
...
...
@@ -215,7 +213,7 @@ public class NavDrawerActivity extends AppCompatActivity implements NavigationVi
}
private
void
searchDish
(
String
name
)
{
Call
<
List
<
Dish
>>
call
=
service
.
searchByName
(
name
,
getChecked
(
R
.
id
.
type_checkboxes
),
getChecked
(
R
.
id
.
cuisine_checkboxes
),
getChecked
(
R
.
id
.
location_checkboxes
),
0
,
1000
);
Call
<
List
<
Dish
>>
call
=
AppUtils
.
service
.
searchByName
(
name
,
getChecked
(
R
.
id
.
type_checkboxes
),
getChecked
(
R
.
id
.
cuisine_checkboxes
),
getChecked
(
R
.
id
.
location_checkboxes
),
0
,
1000
);
call
.
enqueue
(
new
Callback
<
List
<
Dish
>>()
{
@Override
public
void
onResponse
(
Call
<
List
<
Dish
>>
call
,
Response
<
List
<
Dish
>>
response
)
{
...
...
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