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
6e56a9bf
Commit
6e56a9bf
authored
Dec 07, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dishes not appearing properly in StallView
parent
fb03238d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
59 deletions
+63
-59
candy.xml
.idea/dictionaries/candy.xml
+0
-3
vcs.xml
.idea/vcs.xml
+0
-1
DishAdapter.java
app/src/main/java/com/canteeneo/DishAdapter.java
+5
-0
StallViewActivity.java
app/src/main/java/com/canteeneo/StallViewActivity.java
+1
-0
content_stall_view.xml
app/src/main/res/layout/content_stall_view.xml
+57
-55
No files found.
.idea/dictionaries/candy.xml
deleted
100644 → 0
View file @
fb03238d
<component
name=
"ProjectDictionaryState"
>
<dictionary
name=
"candy"
/>
</component>
\ No newline at end of file
.idea/vcs.xml
View file @
6e56a9bf
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
""
vcs=
"Git"
/>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</component>
</project>
</project>
\ No newline at end of file
app/src/main/java/com/canteeneo/DishAdapter.java
View file @
6e56a9bf
...
@@ -83,6 +83,11 @@ public class DishAdapter extends BaseAdapter {
...
@@ -83,6 +83,11 @@ public class DishAdapter extends BaseAdapter {
}
}
}
}
public
void
defaultFilter
()
{
filteredDishes
.
clear
();
filteredDishes
.
addAll
(
dishes
);
}
static
class
DishViewHolder
{
static
class
DishViewHolder
{
TextView
name
;
TextView
name
;
...
...
app/src/main/java/com/canteeneo/StallViewActivity.java
View file @
6e56a9bf
...
@@ -159,6 +159,7 @@ public class StallViewActivity extends AppCompatActivity {
...
@@ -159,6 +159,7 @@ public class StallViewActivity extends AppCompatActivity {
List
<
Dish
>
newDishes
=
response
.
body
();
List
<
Dish
>
newDishes
=
response
.
body
();
dishes
.
clear
();
dishes
.
clear
();
dishes
.
addAll
(
newDishes
);
dishes
.
addAll
(
newDishes
);
dAdapter
.
defaultFilter
();
dAdapter
.
notifyDataSetChanged
();
dAdapter
.
notifyDataSetChanged
();
}
}
...
...
app/src/main/res/layout/content_stall_view.xml
View file @
6e56a9bf
...
@@ -18,163 +18,165 @@
...
@@ -18,163 +18,165 @@
android:fillViewport=
"true"
>
android:fillViewport=
"true"
>
<LinearLayout
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:weightSum=
"2"
>
android:weightSum=
"2"
>
<LinearLayout
<LinearLayout
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:
weightSum=
"5
"
android:
orientation=
"horizontal
"
android:
layout_height=
"wrap_content
"
>
android:
weightSum=
"5
"
>
<LinearLayout
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"3"
>
android:layout_weight=
"3"
android:orientation=
"vertical"
>
<TextView
<TextView
android:
text=
"N
ame"
android:
id=
"@+id/dish_n
ame"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/dish_name"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:textSize=
"18sp"
/>
android:text=
"Name"
android:textSize=
"18sp"
/>
<LinearLayout
<LinearLayout
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<TextView
<TextView
android:text=
"Location: "
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Location: "
android:textSize=
"18sp"
android:textSize=
"18sp"
/>
/>
<TextView
<TextView
android:
text=
"L
ocation"
android:
id=
"@+id/stall_l
ocation"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:
id=
"@+id/stall_location
"
android:
layout_weight=
"1
"
android:
layout_weight=
"1"
/>
android:
text=
"Location"
/>
</LinearLayout>
</LinearLayout>
<CheckBox
<CheckBox
android:
text=
"Favorite
"
android:
id=
"@+id/favorite_checkbox
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/favorite_checkbox"
android:button=
"@drawable/favorite_checkbox"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_weight=
"1"
/>
android:layout_weight=
"1"
android:button=
"@drawable/favorite_checkbox"
android:text=
"Favorite"
/>
</LinearLayout>
</LinearLayout>
<ImageView
<ImageView
android:id=
"@+id/dish_pic"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"78dp"
android:layout_height=
"78dp"
app:srcCompat=
"@mipmap/ic_launcher"
android:layout_weight=
"2"
android:id=
"@+id/dish_pic"
app:srcCompat=
"@mipmap/ic_launcher"
/>
android:layout_weight=
"2"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:weightSum=
"10"
android:paddingTop=
"10dp"
android:layout_marginLeft=
"0dp"
android:layout_marginLeft=
"0dp"
android:layout_marginRight=
"0dp"
android:layout_marginRight=
"0dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:orientation=
"vertical"
android:paddingLeft=
"10dp"
android:paddingLeft=
"10dp"
android:paddingRight=
"10dp"
>
android:paddingRight=
"10dp"
android:paddingTop=
"10dp"
android:weightSum=
"10"
>
<TextView
<TextView
android:text=
"Description:"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:textSize=
"18sp"
/>
android:text=
"Description:"
android:textSize=
"18sp"
/>
<TextView
<TextView
android:
text=
"This is a foodz
"
android:
id=
"@+id/stall_description
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/stall_description"
android:layout_weight=
"9"
android:layout_weight=
"9"
android:paddingTop=
"5dp"
/>
android:paddingTop=
"5dp"
android:text=
"This is a foodz"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:paddingTop=
"10dp"
android:layout_marginLeft=
"0dp"
android:layout_marginLeft=
"0dp"
android:layout_marginRight=
"0dp"
android:layout_marginRight=
"0dp"
android:weightSum=
"14"
android:layout_weight=
"3"
android:paddingLeft=
"10dp"
>
android:orientation=
"vertical"
android:paddingLeft=
"10dp"
android:paddingTop=
"10dp"
android:weightSum=
"14"
>
<LinearLayout
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:weightSum=
"1"
>
<TextView
<TextView
android:text=
"Dishes:"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:textSize=
"18sp"
/>
android:text=
"Dishes:"
android:textSize=
"18sp"
/>
<ListView
<ListView
android:layout_width=
"match_parent"
android:layout_height=
"125dp"
android:id=
"@+id/stall_dishes"
android:id=
"@+id/stall_dishes"
android:fadeScrollbars=
"false"
/>
android:layout_width=
"match_parent"
android:layout_height=
"150dp"
android:layout_weight=
"6.45"
android:fadeScrollbars=
"false"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
<TextView
android:text=
"Reviews:"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"18sp"
android:layout_weight=
"1"
android:layout_weight=
"1"
/>
android:text=
"Reviews:"
android:textSize=
"18sp"
/>
<Button
<Button
android:id=
"@+id/add_review_button"
style=
"@style/Widget.AppCompat.Button.Borderless"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/add_review_button"
android:drawableLeft=
"@drawable/ic_add_circle_outline_black_24dp"
android:drawableLeft=
"@drawable/ic_add_circle_outline_black_24dp"
android:text=
"Add your own review"
android:text=
"Add your own review"
/>
style=
"@style/Widget.AppCompat.Button.Borderless"
/>
</LinearLayout>
</LinearLayout>
<ListView
<ListView
android:layout_width=
"match_parent"
android:id=
"@+id/stall_reviews"
android:id=
"@+id/stall_reviews"
android:layout_height=
"wrap_content"
/>
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</LinearLayout>
...
...
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