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
1d28ae86
Commit
1d28ae86
authored
Nov 18, 2016
by
Tup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dish view and Stall view done
parent
5f1bcf91
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
343 additions
and
103 deletions
+343
-103
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+4
-0
DishViewActivity.java
app/src/main/java/com/testapp/DishViewActivity.java
+2
-0
LoginActivity.java
app/src/main/java/com/testapp/LoginActivity.java
+17
-2
StallViewActivity.java
app/src/main/java/com/testapp/StallViewActivity.java
+35
-0
activity_login.xml
app/src/main/res/layout/activity_login.xml
+8
-0
activity_stall_view.xml
app/src/main/res/layout/activity_stall_view.xml
+26
-0
content_dish_view.xml
app/src/main/res/layout/content_dish_view.xml
+131
-100
content_stall_view.xml
app/src/main/res/layout/content_stall_view.xml
+118
-0
colors.xml
app/src/main/res/values/colors.xml
+1
-1
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
1d28ae86
...
...
@@ -35,6 +35,10 @@
<activity
android:name=
".DishViewActivity"
android:label=
"@string/title_activity_blahblah"
android:theme=
"@style/AppTheme"
/>
<activity
android:name=
".StallViewActivity"
android:label=
"@string/title_activity_stall_view"
android:theme=
"@style/AppTheme"
></activity>
</application>
...
...
app/src/main/java/com/testapp/DishViewActivity.java
View file @
1d28ae86
...
...
@@ -16,6 +16,8 @@ public class DishViewActivity extends AppCompatActivity {
getSupportActionBar
().
setDisplayHomeAsUpEnabled
(
true
);
getSupportActionBar
().
setDisplayShowHomeEnabled
(
true
);
setTitle
(
"Dish Pls"
);
}
@Override
...
...
app/src/main/java/com/testapp/LoginActivity.java
View file @
1d28ae86
...
...
@@ -106,14 +106,29 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
sampleDishButton
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
sample
();
sample
Dish
();
}
});
Button
sampleStallButton
=
(
Button
)
findViewById
(
R
.
id
.
sample_stall
);
sampleStallButton
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
sampleStall
();
}
});
mLoginFormView
=
findViewById
(
R
.
id
.
login_form
);
mProgressView
=
findViewById
(
R
.
id
.
login_progress
);
}
public
void
sample
()
{
public
void
sampleStall
()
{
Intent
intent
=
new
Intent
(
this
,
StallViewActivity
.
class
);
startActivity
(
intent
);
}
public
void
sampleDish
()
{
Intent
intent
=
new
Intent
(
this
,
DishViewActivity
.
class
);
startActivity
(
intent
);
...
...
app/src/main/java/com/testapp/StallViewActivity.java
0 → 100644
View file @
1d28ae86
package
com
.
testapp
;
import
android.os.Bundle
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.design.widget.Snackbar
;
import
android.support.v7.app.AppCompatActivity
;
import
android.support.v7.widget.Toolbar
;
import
android.view.MenuItem
;
import
android.view.View
;
public
class
StallViewActivity
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_stall_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/res/layout/activity_login.xml
View file @
1d28ae86
...
...
@@ -98,6 +98,14 @@
android:layout_marginTop=
"16dp"
android:id=
"@+id/sample_dish"
/>
<Button
android:text=
"Sample Stall"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/sample_stall"
android:textColor=
"?android:attr/textColorSecondary"
android:layout_marginTop=
"16dp"
/>
</LinearLayout>
</ScrollView>
</LinearLayout>
app/src/main/res/layout/activity_stall_view.xml
0 → 100644
View file @
1d28ae86
<?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.StallViewActivity"
>
<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_stall_view"
/>
</android.support.design.widget.CoordinatorLayout>
app/src/main/res/layout/content_dish_view.xml
View file @
1d28ae86
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/content_stall_view.xml
0 → 100644
View file @
1d28ae86
<?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_stall_view"
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.StallViewActivity"
tools:showIn=
"@layout/activity_stall_view"
>
<ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:srcCompat=
"@mipmap/canteeneo_logo"
android:id=
"@+id/stall_logo"
/>
<LinearLayout
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:text=
"Location"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/stall_location"
android:layout_weight=
"1"
/>
<Button
android:text=
"Favorite"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/stall_favorite"
android:layout_weight=
"1"
/>
</LinearLayout>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingTop=
"10dp"
android:layout_weight=
"1"
>
<TextView
android:text=
"Description:"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/textView"
android:textSize=
"18sp"
android:paddingTop=
"0dp"
android:paddingLeft=
"0dp"
android:paddingRight=
"0dp"
/>
<TextView
android:text=
"STOL"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/stall_description"
android:paddingTop=
"5dp"
/>
</LinearLayout>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:text=
"Dishes:"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/textView9"
android:layout_marginTop=
"10dp"
android:textSize=
"18sp"
/>
<ListView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/stall_dishes"
/>
</LinearLayout>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
>
<TextView
android:text=
"Reviews:"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/textView10"
android:textSize=
"18sp"
android:paddingTop=
"10dp"
/>
<ListView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/stall_reviews"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
app/src/main/res/values/colors.xml
View file @
1d28ae86
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"colorPrimary"
>
#3
F51B
5
</color>
<color
name=
"colorPrimary"
>
#3
f51b
5
</color>
<color
name=
"colorPrimaryDark"
>
#303F9F
</color>
<color
name=
"colorAccent"
>
#FF4081
</color>
</resources>
app/src/main/res/values/strings.xml
View file @
1d28ae86
...
...
@@ -45,4 +45,5 @@
<item>
Item 333
</item>
</string-array>
<string
name=
"title_activity_blahblah"
>
blahblah
</string>
<string
name=
"title_activity_stall_view"
>
StallViewActivity
</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