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
1788d15b
Commit
1788d15b
authored
Dec 06, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wrong dish being opened when selecting from a filtered list
parent
a1ee6884
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
DishAdapter.java
app/src/main/java/com/canteeneo/DishAdapter.java
+1
-1
NavDrawerActivity.java
app/src/main/java/com/canteeneo/NavDrawerActivity.java
+1
-1
No files found.
app/src/main/java/com/canteeneo/DishAdapter.java
View file @
1788d15b
...
...
@@ -35,7 +35,7 @@ public class DishAdapter extends BaseAdapter {
@Override
public
long
getItemId
(
int
position
)
{
return
position
;
return
filteredDishes
.
get
(
position
).
getId
()
;
}
@Override
...
...
app/src/main/java/com/canteeneo/NavDrawerActivity.java
View file @
1788d15b
...
...
@@ -72,7 +72,7 @@ public class NavDrawerActivity extends AppCompatActivity implements NavigationVi
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
Intent
i
=
new
Intent
(
NavDrawerActivity
.
this
,
DishViewActivity
.
class
);
Dish
d
=
dishes
.
get
(
position
);
Dish
d
=
adapter
.
getItem
(
position
);
i
.
putExtra
(
"ID"
,
d
.
getId
());
i
.
putExtra
(
"NAME"
,
d
.
getName
());
i
.
putExtra
(
"PRICE"
,
d
.
getPrice
());
...
...
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