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
3acf9530
Commit
3acf9530
authored
Dec 01, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Login working even if form has error, add separate register button
parent
f2414842
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
51 deletions
+14
-51
build.gradle
app/build.gradle
+1
-1
LoginActivity.java
app/src/main/java/com/testapp/LoginActivity.java
+4
-5
activity_login.xml
app/src/main/res/layout/activity_login.xml
+7
-20
activity_nav_drawer_drawer.xml
app/src/main/res/menu/activity_nav_drawer_drawer.xml
+0
-18
strings.xml
app/src/main/res/values/strings.xml
+2
-7
No files found.
app/build.gradle
View file @
3acf9530
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android
{
android
{
compileSdkVersion
23
compileSdkVersion
23
buildToolsVersion
"2
3
.0.3"
buildToolsVersion
"2
4
.0.3"
defaultConfig
{
defaultConfig
{
applicationId
"com.testapp"
applicationId
"com.testapp"
minSdkVersion
15
minSdkVersion
15
...
...
app/src/main/java/com/testapp/LoginActivity.java
View file @
3acf9530
...
@@ -226,13 +226,12 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
...
@@ -226,13 +226,12 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
showProgress
(
true
);
showProgress
(
true
);
mAuthTask
=
new
UserLoginTask
(
username
,
password
);
mAuthTask
=
new
UserLoginTask
(
username
,
password
);
mAuthTask
.
execute
((
Void
)
null
);
mAuthTask
.
execute
((
Void
)
null
);
}
Intent
intent
=
new
Intent
(
this
,
NavDrawerActivity
.
class
);
Intent
intent
=
new
Intent
(
this
,
NavDrawerActivity
.
class
);
intent
.
putExtra
(
EXTRA_MESSAGE
,
"Signed in successfully"
);
intent
.
putExtra
(
EXTRA_MESSAGE
,
"Signed in successfully"
);
startActivity
(
intent
);
startActivity
(
intent
);
}
}
}
private
boolean
isEmailValid
(
String
email
)
{
private
boolean
isEmailValid
(
String
email
)
{
//TODO: Replace this with your own logic
//TODO: Replace this with your own logic
...
...
app/src/main/res/layout/activity_login.xml
View file @
3acf9530
...
@@ -74,37 +74,24 @@
...
@@ -74,37 +74,24 @@
<Button
<Button
android:id=
"@+id/email_sign_in_button"
android:id=
"@+id/email_sign_in_button"
style=
"?android:textAppearanceSmall"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
android:text=
"@string/action_sign_in"
android:text=
"@string/action_sign_in"
/>
android:textStyle=
"bold"
/>
<Button
<Button
android:id=
"@+id/use_as_guest_button"
android:id=
"@+id/register_button"
style=
"?android:textAppearanceSmall"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:text=
"@string/action_guest"
android:textStyle=
"bold"
/>
<Button
android:text=
"sample dish"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"?android:attr/textColorSecondary"
android:text=
"@string/action_guest"
/>
android:layout_marginTop=
"16dp"
android:id=
"@+id/sample_dish"
/>
<Button
<Button
android:text=
"Sample Stall"
android:id=
"@+id/use_as_guest_button"
style=
"@android:style/Widget.Material.Light.Button.Borderless"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/sample_stall"
android:text=
"@string/action_register"
android:textColor=
"?android:attr/textColorSecondary"
android:elevation=
"0dp"
/>
android:layout_marginTop=
"16dp"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>
...
...
app/src/main/res/menu/activity_nav_drawer_drawer.xml
View file @
3acf9530
...
@@ -19,15 +19,6 @@
...
@@ -19,15 +19,6 @@
android:id=
"@+id/nav_type"
android:id=
"@+id/nav_type"
android:title=
"@string/drawer_3"
android:title=
"@string/drawer_3"
android:checkable=
"false"
/>
android:checkable=
"false"
/>
<item
android:title=
"@string/drawer_3_1"
android:id=
"@+id/nav_type_main"
android:checkable=
"true"
/>
<item
android:title=
"@string/drawer_3_2"
android:id=
"@+id/nav_type_drink"
android:checkable=
"true"
/>
<item
android:title=
"@string/drawer_3_3"
android:id=
"@+id/nav_type_dessert"
android:checkable=
"true"
/>
<item
<item
android:id=
"@+id/nav_pricerange"
android:id=
"@+id/nav_pricerange"
...
@@ -39,15 +30,6 @@
...
@@ -39,15 +30,6 @@
android:id=
"@+id/nav_locations"
android:id=
"@+id/nav_locations"
android:title=
"@string/drawer_5"
android:title=
"@string/drawer_5"
android:checkable=
"false"
/>
android:checkable=
"false"
/>
<item
android:title=
"@string/drawer_5_3"
android:id=
"@+id/nav_locations_zekaf"
android:checkable=
"true"
/>
<item
android:title=
"@string/drawer_5_1"
android:checkable=
"true"
android:id=
"@+id/nav_location_gonzaga"
/>
<item
android:title=
"@string/drawer_5_2"
android:id=
"@+id/nav_location_JSEC"
android:checkable=
"true"
/>
</group>
</group>
</menu>
</menu>
app/src/main/res/values/strings.xml
View file @
3acf9530
...
@@ -4,8 +4,9 @@
...
@@ -4,8 +4,9 @@
<!-- Strings related to login -->
<!-- Strings related to login -->
<string
name=
"prompt_username"
>
Username
</string>
<string
name=
"prompt_username"
>
Username
</string>
<string
name=
"prompt_password"
>
Password
</string>
<string
name=
"prompt_password"
>
Password
</string>
<string
name=
"action_sign_in"
>
Sign in
or register
</string>
<string
name=
"action_sign_in"
>
Sign in
</string>
<string
name=
"action_sign_in_short"
>
Sign in
</string>
<string
name=
"action_sign_in_short"
>
Sign in
</string>
<string
name=
"action_register"
>
New User? Register Here
</string>
<string
name=
"error_invalid_email"
>
This email address is invalid
</string>
<string
name=
"error_invalid_email"
>
This email address is invalid
</string>
<string
name=
"error_invalid_password"
>
This password is too short
</string>
<string
name=
"error_invalid_password"
>
This password is too short
</string>
<string
name=
"error_incorrect_password"
>
This password is incorrect
</string>
<string
name=
"error_incorrect_password"
>
This password is incorrect
</string>
...
@@ -17,14 +18,8 @@
...
@@ -17,14 +18,8 @@
<string
name=
"drawer_1"
>
All Items
</string>
<string
name=
"drawer_1"
>
All Items
</string>
<string
name=
"drawer_2"
>
Filters
</string>
<string
name=
"drawer_2"
>
Filters
</string>
<string
name=
"drawer_3"
>
Type
</string>
<string
name=
"drawer_3"
>
Type
</string>
<string
name=
"drawer_3_1"
>
Main Course
</string>
<string
name=
"drawer_3_2"
>
Drink
</string>
<string
name=
"drawer_3_3"
>
Dessert
</string>
<string
name=
"drawer_4"
>
Price Range
</string>
<string
name=
"drawer_4"
>
Price Range
</string>
<string
name=
"drawer_5"
>
Locations
</string>
<string
name=
"drawer_5"
>
Locations
</string>
<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"
>
Cuisine
</string>
<string
name=
"hint_search"
>
Search
</string>
<string
name=
"hint_search"
>
Search
</string>
...
...
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