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
Hide 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'
android
{
compileSdkVersion
23
buildToolsVersion
"2
3
.0.3"
buildToolsVersion
"2
4
.0.3"
defaultConfig
{
applicationId
"com.testapp"
minSdkVersion
15
...
...
app/src/main/java/com/testapp/LoginActivity.java
View file @
3acf9530
...
...
@@ -226,12 +226,11 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
showProgress
(
true
);
mAuthTask
=
new
UserLoginTask
(
username
,
password
);
mAuthTask
.
execute
((
Void
)
null
);
}
Intent
intent
=
new
Intent
(
this
,
NavDrawerActivity
.
class
);
intent
.
putExtra
(
EXTRA_MESSAGE
,
"Signed in successfully"
);
startActivity
(
intent
);
Intent
intent
=
new
Intent
(
this
,
NavDrawerActivity
.
class
);
intent
.
putExtra
(
EXTRA_MESSAGE
,
"Signed in successfully"
);
startActivity
(
intent
);
}
}
private
boolean
isEmailValid
(
String
email
)
{
...
...
app/src/main/res/layout/activity_login.xml
View file @
3acf9530
...
...
@@ -74,37 +74,24 @@
<Button
android:id=
"@+id/email_sign_in_button"
style=
"?android:textAppearanceSmall"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:text=
"@string/action_sign_in"
android:textStyle=
"bold"
/>
android:text=
"@string/action_sign_in"
/>
<Button
android:id=
"@+id/use_as_guest_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:id=
"@+id/register_button"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:textColor=
"?android:attr/textColorSecondary"
android:layout_marginTop=
"16dp"
android:id=
"@+id/sample_dish"
/>
android:text=
"@string/action_guest"
/>
<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_height=
"wrap_content"
android:id=
"@+id/sample_stall"
android:textColor=
"?android:attr/textColorSecondary"
android:layout_marginTop=
"16dp"
/>
android:text=
"@string/action_register"
android:elevation=
"0dp"
/>
</LinearLayout>
</ScrollView>
...
...
app/src/main/res/menu/activity_nav_drawer_drawer.xml
View file @
3acf9530
...
...
@@ -19,15 +19,6 @@
android:id=
"@+id/nav_type"
android:title=
"@string/drawer_3"
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
android:id=
"@+id/nav_pricerange"
...
...
@@ -39,15 +30,6 @@
android:id=
"@+id/nav_locations"
android:title=
"@string/drawer_5"
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>
</menu>
app/src/main/res/values/strings.xml
View file @
3acf9530
...
...
@@ -4,8 +4,9 @@
<!-- Strings related to login -->
<string
name=
"prompt_username"
>
Username
</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_register"
>
New User? Register Here
</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_incorrect_password"
>
This password is incorrect
</string>
...
...
@@ -17,14 +18,8 @@
<string
name=
"drawer_1"
>
All Items
</string>
<string
name=
"drawer_2"
>
Filters
</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_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=
"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