Permalink
Browse files

populated all images added new account errors

  • Loading branch information...
1 parent 796d310 commit 46bc951935bc68b1a8806a79dad00c97cf1521de @andrescamarena andrescamarena committed Feb 14, 2012
Showing with 79 additions and 54 deletions.
  1. +1 −1 AndroidManifest.xml
  2. BIN bin/Messagee.apk
  3. BIN bin/classes.dex
  4. BIN bin/classes/com/project/messagee/AddAccount$1.class
  5. BIN bin/classes/com/project/messagee/AddAccount$2.class
  6. BIN bin/classes/com/project/messagee/AddAccount$3.class
  7. BIN bin/classes/com/project/messagee/AddAccount$4.class
  8. BIN bin/classes/com/project/messagee/AddAccount$5.class
  9. BIN bin/classes/com/project/messagee/AddAccount$6.class
  10. BIN bin/classes/com/project/messagee/AddAccount$7.class
  11. BIN bin/classes/com/project/messagee/AddAccount$AddAcctTask.class
  12. BIN bin/classes/com/project/messagee/AddAccount.class
  13. BIN bin/classes/com/project/messagee/Login$LoginTask.class
  14. BIN bin/classes/com/project/messagee/MessageBoard.class
  15. BIN bin/classes/com/project/messagee/R$drawable.class
  16. BIN bin/classes/com/project/messagee/R$id.class
  17. BIN bin/classes/com/project/messagee/R$layout.class
  18. BIN bin/classes/com/project/messagee/R$string.class
  19. BIN bin/res/drawable-hdpi/add_acct_titlebar.png
  20. BIN bin/res/drawable-hdpi/close_btn_clicked.png
  21. BIN bin/res/drawable-hdpi/message_board_titlebar.png
  22. BIN bin/res/drawable-hdpi/messagee_icon.png
  23. BIN bin/res/drawable-hdpi/new_message.png
  24. BIN bin/res/drawable-hdpi/new_message_clicked.png
  25. BIN bin/res/drawable-ldpi/add_acct_titlebar.png
  26. BIN bin/res/drawable-ldpi/add_btn.png
  27. BIN bin/res/drawable-ldpi/add_btn_clicked.png
  28. BIN bin/res/drawable-ldpi/add_people.png
  29. BIN bin/res/drawable-ldpi/add_people_clicked.png
  30. BIN bin/res/drawable-ldpi/close_btn.png
  31. BIN bin/res/drawable-ldpi/close_btn_clicked.png
  32. BIN bin/res/drawable-ldpi/logout_btn.png
  33. BIN bin/res/drawable-ldpi/logout_btn_clicked.png
  34. BIN bin/res/drawable-ldpi/message_board_titlebar.png
  35. BIN bin/res/drawable-ldpi/messagee_icon.png
  36. BIN bin/res/drawable-ldpi/new_message.png
  37. BIN bin/res/drawable-ldpi/new_message_clicked.png
  38. BIN bin/res/drawable-ldpi/newmess_titlebar.png
  39. BIN bin/res/drawable-ldpi/post_btn.png
  40. BIN bin/res/drawable-ldpi/post_btn_clicked.png
  41. BIN bin/res/drawable-mdpi/add_acct_titlebar.png
  42. BIN bin/res/drawable-mdpi/add_btn.png
  43. BIN bin/res/drawable-mdpi/add_btn_clicked.png
  44. BIN bin/res/drawable-mdpi/add_people.png
  45. BIN bin/res/drawable-mdpi/add_people_clicked.png
  46. BIN bin/res/drawable-mdpi/close_btn.png
  47. BIN bin/res/drawable-mdpi/close_btn_clicked.png
  48. BIN bin/res/drawable-mdpi/logout_btn.png
  49. BIN bin/res/drawable-mdpi/logout_btn_clicked.png
  50. BIN bin/res/drawable-mdpi/message_board_titlebar.png
  51. BIN bin/res/drawable-mdpi/messagee_icon.png
  52. BIN bin/res/drawable-mdpi/new_message.png
  53. BIN bin/res/drawable-mdpi/new_message_clicked.png
  54. BIN bin/res/drawable-mdpi/newmess_titlebar.png
  55. BIN bin/res/drawable-mdpi/post_btn.png
  56. BIN bin/res/drawable-mdpi/post_btn_clicked.png
  57. BIN bin/resources.ap_
  58. +38 −44 gen/com/project/messagee/R.java
  59. BIN res/drawable-hdpi/add_acct_titlebar.png
  60. BIN res/drawable-hdpi/close_btn_clicked.png
  61. BIN res/drawable-hdpi/message_board_titlebar.png
  62. BIN res/drawable-hdpi/messagee_icon.png
  63. BIN res/drawable-hdpi/new_message.png
  64. BIN res/drawable-hdpi/new_message_clicked.png
  65. BIN res/drawable-ldpi/add_acct_titlebar.png
  66. BIN res/drawable-ldpi/add_btn.png
  67. BIN res/drawable-ldpi/add_btn_clicked.png
  68. BIN res/drawable-ldpi/add_people.png
  69. BIN res/drawable-ldpi/add_people_clicked.png
  70. BIN res/drawable-ldpi/close_btn.png
  71. BIN res/drawable-ldpi/close_btn_clicked.png
  72. BIN res/drawable-ldpi/logout_btn.png
  73. BIN res/drawable-ldpi/logout_btn_clicked.png
  74. BIN res/drawable-ldpi/message_board_titlebar.png
  75. BIN res/drawable-ldpi/messagee_icon.png
  76. BIN res/drawable-ldpi/new_message.png
  77. BIN res/drawable-ldpi/new_message_clicked.png
  78. BIN res/drawable-ldpi/newmess_titlebar.png
  79. BIN res/drawable-ldpi/post_btn.png
  80. BIN res/drawable-ldpi/post_btn_clicked.png
  81. BIN res/drawable-mdpi/add_acct_titlebar.png
  82. BIN res/drawable-mdpi/add_btn.png
  83. BIN res/drawable-mdpi/add_btn_clicked.png
  84. BIN res/drawable-mdpi/add_people.png
  85. BIN res/drawable-mdpi/add_people_clicked.png
  86. BIN res/drawable-mdpi/close_btn.png
  87. BIN res/drawable-mdpi/close_btn_clicked.png
  88. BIN res/drawable-mdpi/logout_btn.png
  89. BIN res/drawable-mdpi/logout_btn_clicked.png
  90. BIN res/drawable-mdpi/message_board_titlebar.png
  91. BIN res/drawable-mdpi/messagee_icon.png
  92. BIN res/drawable-mdpi/new_message.png
  93. BIN res/drawable-mdpi/new_message_clicked.png
  94. BIN res/drawable-mdpi/newmess_titlebar.png
  95. BIN res/drawable-mdpi/post_btn.png
  96. BIN res/drawable-mdpi/post_btn_clicked.png
  97. +3 −3 res/drawable/logout_btn_xml.xml
  98. +1 −1 res/layout/add_account.xml
  99. +1 −1 res/layout/message_board.xml
  100. +29 −0 src/com/project/messagee/AddAccount.java
  101. +5 −3 src/com/project/messagee/Login.java
  102. +1 −1 src/com/project/messagee/MessageBoard.java
View
@@ -10,7 +10,7 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application
- android:icon="@drawable/twidicon"
+ android:icon="@drawable/messagee_icon"
android:label="@string/app_name"
android:name=".Messagee">
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
View
Binary file not shown.
@@ -25,53 +25,47 @@
public static final int tenDP=0x7f050000;
}
public static final class drawable {
- public static final int add_btn=0x7f020000;
- public static final int add_btn_clicked=0x7f020001;
- public static final int add_button_xml=0x7f020002;
- public static final int add_people=0x7f020003;
- public static final int add_people_btn_xml=0x7f020004;
- public static final int add_people_clicked=0x7f020005;
- public static final int apigee=0x7f020006;
- public static final int arrow=0x7f020007;
- public static final int background=0x7f020008;
- public static final int close_btn=0x7f020009;
- public static final int close_btn_clicked=0x7f02000a;
- public static final int close_btn_xml=0x7f02000b;
- public static final int login_background=0x7f02000c;
+ public static final int add_acct_titlebar=0x7f020000;
+ public static final int add_btn=0x7f020001;
+ public static final int add_btn_clicked=0x7f020002;
+ public static final int add_button_xml=0x7f020003;
+ public static final int add_people=0x7f020004;
+ public static final int add_people_btn_xml=0x7f020005;
+ public static final int add_people_clicked=0x7f020006;
+ public static final int apigee=0x7f020007;
+ public static final int arrow=0x7f020008;
+ public static final int background=0x7f020009;
+ public static final int close_btn=0x7f02000a;
+ public static final int close_btn_clicked=0x7f02000b;
+ public static final int close_btn_xml=0x7f02000c;
public static final int login_button=0x7f02000d;
public static final int login_button_clicked=0x7f02000e;
public static final int login_button_xml=0x7f02000f;
- public static final int login_password_textbox=0x7f020010;
- public static final int login_textfields=0x7f020011;
- public static final int login_username_textbox=0x7f020012;
- public static final int logout_btn=0x7f020013;
- public static final int logout_btn_clicked=0x7f020014;
- public static final int logout_btn_xml=0x7f020015;
- public static final int messageboard_background=0x7f020016;
- public static final int messagee=0x7f020017;
- public static final int new_message=0x7f020018;
- public static final int new_message_background=0x7f020019;
- public static final int new_message_btn_xml=0x7f02001a;
- public static final int new_message_clicked=0x7f02001b;
- public static final int newmess_titlebar=0x7f02001c;
- public static final int post_btn=0x7f02001d;
- public static final int post_btn_clicked=0x7f02001e;
- public static final int post_btn_xml=0x7f02001f;
- public static final int register_button=0x7f020020;
- public static final int register_button_clicked=0x7f020021;
- public static final int register_button_xml=0x7f020022;
- public static final int rounded_corners_white=0x7f020023;
- public static final int server_button=0x7f020024;
- public static final int server_button_clicked=0x7f020025;
- public static final int server_button_xml=0x7f020026;
- public static final int server_textbox=0x7f020027;
- public static final int settings_btn=0x7f020028;
- public static final int settings_btn_clicked=0x7f020029;
- public static final int settings_btn_xml=0x7f02002a;
- public static final int splash=0x7f02002b;
- public static final int twidicon=0x7f02002c;
- public static final int user=0x7f02002d;
- public static final int username_textbox=0x7f02002e;
+ public static final int login_textfields=0x7f020010;
+ public static final int logout_btn=0x7f020011;
+ public static final int logout_btn_clicked=0x7f020012;
+ public static final int logout_btn_xml=0x7f020013;
+ public static final int message_board_titlebar=0x7f020014;
+ public static final int messagee=0x7f020015;
+ public static final int messagee_icon=0x7f020016;
+ public static final int new_message=0x7f020017;
+ public static final int new_message_btn_xml=0x7f020018;
+ public static final int new_message_clicked=0x7f020019;
+ public static final int newmess_titlebar=0x7f02001a;
+ public static final int post_btn=0x7f02001b;
+ public static final int post_btn_clicked=0x7f02001c;
+ public static final int post_btn_xml=0x7f02001d;
+ public static final int register_button=0x7f02001e;
+ public static final int register_button_clicked=0x7f02001f;
+ public static final int register_button_xml=0x7f020020;
+ public static final int rounded_corners_white=0x7f020021;
+ public static final int server_button=0x7f020022;
+ public static final int server_button_clicked=0x7f020023;
+ public static final int server_button_xml=0x7f020024;
+ public static final int server_textbox=0x7f020025;
+ public static final int settings_btn_xml=0x7f020026;
+ public static final int splash=0x7f020027;
+ public static final int username_textbox=0x7f020028;
}
public static final class id {
public static final int ImageView01=0x7f070024;
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/settings_btn_clicked" /> <!-- pressed -->
+ android:drawable="@drawable/logout_btn_clicked" /> <!-- pressed -->
<item android:state_focused="true"
- android:drawable="@drawable/settings_btn_clicked" /> <!-- focused -->
- <item android:drawable="@drawable/settings_btn" /> <!-- default -->
+ android:drawable="@drawable/logout_btn_clicked" /> <!-- focused -->
+ <item android:drawable="@drawable/logout_btn" /> <!-- default -->
</selector>
@@ -16,7 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY"
- android:src="@drawable/newmess_titlebar" />
+ android:src="@drawable/add_acct_titlebar" />
<ImageButton
android:id="@+id/add_account_close_btn"
@@ -14,7 +14,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
- android:src="@drawable/newmess_titlebar" />
+ android:src="@drawable/message_board_titlebar" />
</RelativeLayout>
@@ -3,6 +3,9 @@
package com.project.messagee;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
import org.usergrid.android.client.response.ApiResponse;
import com.project.messagee.R;
@@ -77,11 +80,22 @@ public void onClick(View arg0){
//if length of email < 6, show error
if(email.length()<6){
showAddAccountEmailLengthError();
+ break;
}
+ //if email does not look like email show error
+ Pattern pattern = Pattern.compile(".+@.+\\.[a-z]+");
+ Matcher matcher = pattern.matcher(email);
+ boolean matchFound = matcher.matches();
+ if(!matchFound){
+ showAddAccountEmailFormatError();
+ break;
+ }
+
//if length password < 5, show error
if(password.length()<5){
showAddAccountPasswordLengthError();
+ break;
}
//if passwords match try to create account
@@ -197,6 +211,21 @@ public void onClick(DialogInterface dialog, int id) {
alert.show();
}
+ //email length error
+ private void showAddAccountEmailFormatError() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setMessage(
+ "Email format error. eg. ui@jquery.com")
+ .setCancelable(false)
+ .setNeutralButton("Ok", new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ dialog.dismiss();
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
//show account created dialog
private void showAddAccountSuccess() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
@@ -171,15 +171,17 @@ protected void onPostExecute(ApiResponse response) {
//get posts for user
((Messagee) app).messController.getPostsFromClient();
-
- //hide logging in dialog
- hideLoginProgressDialog();
+
//display messageboard
Intent i = new Intent();
i.setClassName("com.project.messagee",
"com.project.messagee.MessageBoard");
startActivity(i);
+
+
+ //hide logging in dialog
+ hideLoginProgressDialog();
}
}
@@ -133,7 +133,7 @@ private void createPosts() {
String username = ((Messagee) this.getApplication()).messController.getPosts().getPostNameByIndex(i);
TextView usernameText = new TextView(this);
usernameText.setPadding(0, 0, 0, dpToPix(4));
- usernameText.setTextColor(getResources().getColor(R.color.username_blue));
+ usernameText.setTextColor(getResources().getColor(R.color.black));
usernameText.setText(username);
usernameText.setTypeface(null,1);
usernameText.setTextSize(17);

0 comments on commit 46bc951

Please sign in to comment.