PageRenderTime 59ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/app/src/main/java/com/ahmadrosid/inspections/helper/Constants.java

https://gitlab.com/ahmadrosid/TrackinsAndroid
Java | 98 lines | 65 code | 20 blank | 13 comment | 0 complexity | 5afa0206888945c664220edf4143580f MD5 | raw file
  1. package com.ahmadrosid.inspections.helper;
  2. import java.util.regex.Matcher;
  3. import java.util.regex.Pattern;
  4. /**
  5. * Created by ocittwo on 02/09/16.
  6. */
  7. public class Constants {
  8. public static final Pattern VALID_EMAIL_ADDRESS_REGEX =
  9. Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);
  10. public static boolean isMatchEmail(String emailStr) {
  11. Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(emailStr);
  12. return matcher.find();
  13. }
  14. public static final String CREATED_AT = "created_at";
  15. /**
  16. * Intent sections
  17. */
  18. public static final int IMG_LEFT = 100;
  19. public static final int IMG_RIGHT = 200;
  20. public static final int LEFT_FRONT_IDLER_PHOTO = 300;
  21. public static final int LEFT_REAR_IDLER_PHOTO = 400;
  22. public static final int RIGHT_FRONT_IDLER_PHOTO = 500;
  23. public static final int RIGHT_REAR_IDLER_PHOTO = 600;
  24. public static final int LEFT_SIDE_TRACK_SHOE_PHOTO = 700;
  25. public static final int RIGHT_SIDE_TRACK_SHOE_PHOTO = 800;
  26. public static final int REQUEST_SET_MY_LOCATION = 900;
  27. public static final int LEFT_ONE_CARRIER_IMG = 1000;
  28. public static final int LEFT_TWO_CARRIER_IMG = 1001;
  29. public static final int LEFT_THREE_CARRIER_IMG = 1002;
  30. public static final int RIGHT_ONE_CARRIER_IMG = 1003;
  31. public static final int RIGHT_TWO_CARRIER_IMG = 1004;
  32. public static final int RIGHT_THREE_CARRIER_IMG = 1005;
  33. /**
  34. * Settings sections
  35. */
  36. public static final String HAVE_SETTINGS = "have settings";
  37. public static final String API_TOKEN = "api_token";
  38. public static final String IMG_PROFILE_PATH = "img_profile_path";
  39. public static final String IMG_BANNER_PATH = "img_banner_path";
  40. /**
  41. * Pick image left report
  42. */
  43. public static final int REQUEST_GALLERY = 0;
  44. public static final int REQUEST_CAMERA = 1;
  45. // Cache fragment report
  46. public static final String IMAGE_FRAGMENT_GENERAL = "path image general";
  47. public static final String JSON_GENERAL_SPINNER = "json general spinner";
  48. public static final String JSON_GENERAL_INPUT_FIELD = "json general input field";
  49. public static final String JSON_LEFT_INPUT_FIELD = "json left input field";
  50. public static final String JSON_LEFT_IMAGE_PATH = "json image path";
  51. public static final String JSON_LEFT_TEXT_HINT = "text hint field";
  52. public static final String JSON_RIGHT_INPUT_FIELD = "json right input field";
  53. public static final String JSON_RIGHT_IMAGE_PATH = "json right image path";
  54. public static final String JSON_RIGHT_TEXT_HINT = "text right hint field";
  55. public static final String SPINNER_FORM_GENERAL = "spinner general";
  56. public static final String INPUT_FIELD_GENERAL = "input field general";
  57. public class User{
  58. public static final String EMAIL = "email";
  59. public static final String PASSWORD = "password";
  60. }
  61. public class RequestCode {
  62. public static final int CAMERA = 101;
  63. public static final int GALLERY = 102;
  64. }
  65. public class Maps {
  66. public static final String CURRENT_LAT_LON = "current_lat_lon";
  67. public static final String LAST_LAT_LON = "last_lat_lon";
  68. }
  69. public class Settings{
  70. public static final String ORGANIZATION = "organization";
  71. public static final String REGION = "region";
  72. public static final String DISTRICT= "district";
  73. public static final String DELAER_NAME= "dealer_name";
  74. public static final String DELAER_CODE= "dealer_code";
  75. public static final String SALES_NAME= "sales_name";
  76. public static final String IS_EDIT_MODE = "isEditMode";
  77. }
  78. }