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
5f1bcf91
Commit
5f1bcf91
authored
Nov 17, 2016
by
Tup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the dish page boiii
parent
59355320
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
232 additions
and
2 deletions
+232
-2
build.gradle
app/build.gradle
+1
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+5
-1
DishViewActivity.java
app/src/main/java/com/testapp/DishViewActivity.java
+33
-0
LoginActivity.java
app/src/main/java/com/testapp/LoginActivity.java
+13
-1
activity_dish_view.xml
app/src/main/res/layout/activity_dish_view.xml
+25
-0
activity_login.xml
app/src/main/res/layout/activity_login.xml
+9
-0
content_dish_view.xml
app/src/main/res/layout/content_dish_view.xml
+141
-0
strings.xml
app/src/main/res/values/strings.xml
+5
-0
No files found.
app/build.gradle
View file @
5f1bcf91
...
...
@@ -31,4 +31,5 @@ dependencies {
compile
'com.squareup.retrofit2:retrofit:2.1.0'
compile
'com.squareup.retrofit2:converter-gson:2.1.0'
compile
files
(
'libs/picasso-2.5.2.jar'
)
compile
'com.android.support:support-v4:24.2.1'
}
app/src/main/AndroidManifest.xml
View file @
5f1bcf91
...
...
@@ -31,7 +31,11 @@
<activity
android:name=
".SearchActivity"
android:label=
"@string/title_activity_search"
android:theme=
"@style/AppTheme.NoActionBar"
></activity>
android:theme=
"@style/AppTheme.NoActionBar"
/>
<activity
android:name=
".DishViewActivity"
android:label=
"@string/title_activity_blahblah"
android:theme=
"@style/AppTheme"
></activity>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/com/testapp/DishViewActivity.java
0 → 100644
View file @
5f1bcf91
package
com
.
testapp
;
import
android.os.Bundle
;
import
android.support.v7.app.AppCompatActivity
;
import
android.support.v7.widget.Toolbar
;
import
android.view.MenuItem
;
public
class
DishViewActivity
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_dish_view
);
Toolbar
toolbar
=
(
Toolbar
)
findViewById
(
R
.
id
.
toolbar
);
setSupportActionBar
(
toolbar
);
getSupportActionBar
().
setDisplayHomeAsUpEnabled
(
true
);
getSupportActionBar
().
setDisplayShowHomeEnabled
(
true
);
}
@Override
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
switch
(
item
.
getItemId
())
{
case
android
.
R
.
id
.
home
:
// app icon in action bar clicked; goto parent activity.
this
.
finish
();
return
true
;
default
:
return
super
.
onOptionsItemSelected
(
item
);
}
}
}
app/src/main/java/com/testapp/LoginActivity.java
View file @
5f1bcf91
...
...
@@ -102,11 +102,23 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
}
});
Button
sampleDishButton
=
(
Button
)
findViewById
(
R
.
id
.
sample_dish
);
sampleDishButton
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
sample
();
}
});
mLoginFormView
=
findViewById
(
R
.
id
.
login_form
);
mProgressView
=
findViewById
(
R
.
id
.
login_progress
);
}
public
void
sample
()
{
Intent
intent
=
new
Intent
(
this
,
DishViewActivity
.
class
);
startActivity
(
intent
);
}
public
void
guestLogin
()
{
Intent
intent
=
new
Intent
(
this
,
NavDrawerActivity
.
class
);
...
...
app/src/main/res/layout/activity_dish_view.xml
0 → 100644
View file @
5f1bcf91
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
tools:context=
"com.testapp.DishViewActivity"
>
<android.support.design.widget.AppBarLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:theme=
"@style/AppTheme.AppBarOverlay"
>
<android.support.v7.widget.Toolbar
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
app:popupTheme=
"@style/AppTheme.PopupOverlay"
/>
</android.support.design.widget.AppBarLayout>
<include
layout=
"@layout/content_dish_view"
/>
</android.support.design.widget.CoordinatorLayout>
app/src/main/res/layout/activity_login.xml
View file @
5f1bcf91
...
...
@@ -80,6 +80,7 @@
android:layout_marginTop=
"16dp"
android:text=
"@string/action_sign_in"
android:textStyle=
"bold"
/>
<Button
android:id=
"@+id/use_as_guest_button"
style=
"?android:textAppearanceSmall"
...
...
@@ -89,6 +90,14 @@
android:text=
"@string/action_guest"
android:textStyle=
"bold"
/>
<Button
android:text=
"sample dish"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:textColor=
"?android:attr/textColorSecondary"
android:layout_marginTop=
"16dp"
android:id=
"@+id/sample_dish"
/>
</LinearLayout>
</ScrollView>
</LinearLayout>
app/src/main/res/layout/content_dish_view.xml
0 → 100644
View file @
5f1bcf91
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/content_blahblah"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingBottom=
"@dimen/activity_vertical_margin"
android:paddingLeft=
"@dimen/activity_horizontal_margin"
android:paddingRight=
"@dimen/activity_horizontal_margin"
android:paddingTop=
"@dimen/activity_vertical_margin"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
tools:context=
"com.testapp.DishViewActivity"
tools:showIn=
"@layout/activity_dish_view"
>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:weightSum=
"5"
>
<LinearLayout
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_weight=
"1"
android:weightSum=
"5"
android:layout_height=
"wrap_content"
>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_weight=
"3"
android:weightSum=
"7"
>
<TextView
android:text=
"Name"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/textView5"
android:layout_weight=
"3"
/>
<TextView
android:text=
"Price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/textView6"
android:layout_weight=
"1"
/>
<TextView
android:text=
"Stall"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/dish_stall"
android:layout_weight=
"1"
android:clickable=
"true"
/>
<TextView
android:text=
"Location"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/textView8"
android:layout_weight=
"1"
/>
<Button
android:text=
"Favorite"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/dish_favorite"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_weight=
"1"
/>
</LinearLayout>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
app:srcCompat=
"@mipmap/ic_launcher"
android:id=
"@+id/dish_pic"
android:layout_weight=
"2"
/>
</LinearLayout>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"100dp"
android:weightSum=
"14"
android:paddingTop=
"10dp"
android:layout_marginLeft=
"10px"
android:layout_marginRight=
"10px"
android:layout_weight=
"1"
>
<TextView
android:text=
"Description:"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/textView3"
android:layout_weight=
"1"
android:textSize=
"18sp"
/>
<TextView
android:text=
"TextView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/dish_desc"
android:layout_weight=
"13"
android:paddingTop=
"5dp"
/>
</LinearLayout>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:paddingTop=
"10dp"
android:layout_marginLeft=
"10px"
android:layout_marginRight=
"10px"
android:weightSum=
"14"
>
<TextView
android:text=
"Reviews:"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/textView4"
android:textSize=
"18sp"
android:layout_weight=
"1"
/>
<ListView
android:layout_width=
"match_parent"
android:id=
"@+id/dish_reviews"
android:layout_height=
"150dp"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
app/src/main/res/values/strings.xml
View file @
5f1bcf91
...
...
@@ -25,6 +25,10 @@
<string
name=
"drawer_5_1"
>
Gonzaga
</string>
<string
name=
"drawer_5_2"
>
JSEC
</string>
<string
name=
"drawer_5_3"
>
Zekaf
</string>
<string
name=
"drawer_6"
>
Cuisine
</string>
<string
name=
"drawer_6_1"
>
American
</string>
<string
name=
"drawer_6_2"
>
Japanese
</string>
<string
name=
"drawer_6_3"
>
Chinese
</string>
<string
name=
"hint_search"
>
Search
</string>
<string
name=
"navigation_drawer_open"
>
Open navigation drawer
</string>
...
...
@@ -40,4 +44,5 @@
<item>
Item 222
</item>
<item>
Item 333
</item>
</string-array>
<string
name=
"title_activity_blahblah"
>
blahblah
</string>
</resources>
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