Browse Source

switched to local api

tags/v1.0.0
Robin Thoni 7 years ago
parent
commit
75e395578b
85 changed files with 8481 additions and 91 deletions
  1. 1
    1
      app/build.gradle
  2. 2
    4
      app/src/main/java/com/rthoni/stssaguenay/business/STSBusiness.java
  3. 24
    4
      app/src/main/java/com/rthoni/stssaguenay/business/StopsBusiness.java
  4. 8
    0
      app/src/main/java/com/rthoni/stssaguenay/dataaccess/RoutesDataAccess.java
  5. 8
    56
      app/src/main/java/com/rthoni/stssaguenay/dataaccess/StopsDataAccess.java
  6. 47
    6
      app/src/main/java/com/rthoni/stssaguenay/dbo/StopsDbo.java
  7. 1
    5
      app/src/main/java/com/rthoni/stssaguenay/ui/activities/MainActivity.java
  8. 1
    1
      app/src/main/java/com/rthoni/stssaguenay/ui/activities/StopPickerActivity.java
  9. 2
    4
      app/src/main/java/com/rthoni/stssaguenay/ui/fragments/StopPickerFragment.java
  10. 1
    1
      build.gradle
  11. 1
    0
      luticateutils/.gitignore
  12. 1
    0
      luticateutils/.idea/.name
  13. 22
    0
      luticateutils/.idea/compiler.xml
  14. 3
    0
      luticateutils/.idea/copyright/profiles_settings.xml
  15. 6
    0
      luticateutils/.idea/encodings.xml
  16. 29
    0
      luticateutils/.idea/gradle.xml
  17. 11
    0
      luticateutils/.idea/libraries/accessibility_test_framework_1_0.xml
  18. 12
    0
      luticateutils/.idea/libraries/animated_vector_drawable_23_4_0.xml
  19. 10
    0
      luticateutils/.idea/libraries/answers_1_3_7.xml
  20. 11
    0
      luticateutils/.idea/libraries/ant_1_8_0.xml
  21. 9
    0
      luticateutils/.idea/libraries/ant_launcher_1_8_0.xml
  22. 15
    0
      luticateutils/.idea/libraries/appcompat_v7_23_4_0.xml
  23. 11
    0
      luticateutils/.idea/libraries/asm_5_0_1.xml
  24. 11
    0
      luticateutils/.idea/libraries/asm_analysis_5_0_1.xml
  25. 11
    0
      luticateutils/.idea/libraries/asm_commons_5_0_1.xml
  26. 11
    0
      luticateutils/.idea/libraries/asm_tree_5_0_1.xml
  27. 11
    0
      luticateutils/.idea/libraries/asm_util_5_0_1.xml
  28. 11
    0
      luticateutils/.idea/libraries/bcprov_jdk16_1_46.xml
  29. 10
    0
      luticateutils/.idea/libraries/beta_1_1_5.xml
  30. 12
    0
      luticateutils/.idea/libraries/butterknife_8_0_1.xml
  31. 11
    0
      luticateutils/.idea/libraries/butterknife_annotations_8_0_1.xml
  32. 10
    0
      luticateutils/.idea/libraries/crashlytics_2_5_6.xml
  33. 10
    0
      luticateutils/.idea/libraries/crashlytics_core_2_3_9.xml
  34. 15
    0
      luticateutils/.idea/libraries/design_23_4_0.xml
  35. 11
    0
      luticateutils/.idea/libraries/eventbus_3_0_0.xml
  36. 10
    0
      luticateutils/.idea/libraries/fabric_1_3_11.xml
  37. 11
    0
      luticateutils/.idea/libraries/hamcrest_core_1_1.xml
  38. 11
    0
      luticateutils/.idea/libraries/hamcrest_core_1_3.xml
  39. 11
    0
      luticateutils/.idea/libraries/icu4j_53_1.xml
  40. 11
    0
      luticateutils/.idea/libraries/junit_4_10.xml
  41. 11
    0
      luticateutils/.idea/libraries/junit_4_12.xml
  42. 12
    0
      luticateutils/.idea/libraries/library_1_2_0.xml
  43. 11
    0
      luticateutils/.idea/libraries/maven_ant_tasks_2_1_3.xml
  44. 11
    0
      luticateutils/.idea/libraries/mockito_core_1_9_5.xml
  45. 11
    0
      luticateutils/.idea/libraries/objenesis_1_0.xml
  46. 15
    0
      luticateutils/.idea/libraries/recyclerview_v7_23_4_0.xml
  47. 11
    0
      luticateutils/.idea/libraries/robolectric_3_0.xml
  48. 11
    0
      luticateutils/.idea/libraries/robolectric_annotations_3_0.xml
  49. 11
    0
      luticateutils/.idea/libraries/robolectric_resources_3_0.xml
  50. 11
    0
      luticateutils/.idea/libraries/robolectric_utils_3_0.xml
  51. 11
    0
      luticateutils/.idea/libraries/shadows_core_3_0.xml
  52. 11
    0
      luticateutils/.idea/libraries/sqlite4java_0_282.xml
  53. 11
    0
      luticateutils/.idea/libraries/support_annotations_23_4_0.xml
  54. 16
    0
      luticateutils/.idea/libraries/support_v4_23_4_0.xml
  55. 12
    0
      luticateutils/.idea/libraries/support_vector_drawable_23_4_0.xml
  56. 11
    0
      luticateutils/.idea/libraries/vtd_xml_2_11.xml
  57. 62
    0
      luticateutils/.idea/misc.xml
  58. 12
    0
      luticateutils/.idea/modules.xml
  59. 12
    0
      luticateutils/.idea/runConfigurations.xml
  60. 4468
    0
      luticateutils/.idea/workspace.xml
  61. 25
    0
      luticateutils/build.gradle
  62. 11
    0
      luticateutils/local.properties
  63. 17
    0
      luticateutils/proguard-rules.pro
  64. 11
    0
      luticateutils/src/main/AndroidManifest.xml
  65. 7
    0
      luticateutils/src/main/java/com/luticate/utils/business/LuBusinessManager.java
  66. 1
    1
      luticateutils/src/main/java/com/luticate/utils/business/LuPromise.java
  67. 14
    5
      luticateutils/src/main/java/com/luticate/utils/business/LuRequest.java
  68. 7
    0
      luticateutils/src/main/java/com/luticate/utils/dataaccess/LuDataAccess.java
  69. 33
    0
      luticateutils/src/main/java/com/luticate/utils/dbo/LuBoolDbo.java
  70. 1
    1
      luticateutils/src/main/java/com/luticate/utils/dbo/LuDataAccessConfigDbo.java
  71. 6
    1
      luticateutils/src/main/java/com/luticate/utils/dbo/LuDbo.java
  72. 33
    0
      luticateutils/src/main/java/com/luticate/utils/dbo/LuIntDbo.java
  73. 65
    0
      luticateutils/src/main/java/com/luticate/utils/dbo/LuPaginatedDbo.java
  74. 21
    0
      luticateutils/src/main/java/com/luticate/utils/dbo/LuVoidDbo.java
  75. 141
    0
      luticateutils/src/main/java/com/luticate/utils/ui/fragments/AbstractPaginationFragment.java
  76. 54
    0
      luticateutils/src/main/java/com/luticate/utils/ui/fragments/ViewPaginationFragment.java
  77. 133
    0
      luticateutils/src/main/java/com/luticate/utils/ui/views/AbstractPaginationView.java
  78. 65
    0
      luticateutils/src/main/java/com/luticate/utils/ui/views/DefaultPaginationView.java
  79. 30
    0
      luticateutils/src/main/res/layout/default_pagination_view_layout.xml
  80. 52
    0
      luticateutils/src/main/res/layout/view_pagination_fragment_layout.xml
  81. 6
    0
      luticateutils/src/main/res/values/attrs.xml
  82. 3
    0
      luticateutils/src/main/res/values/strings.xml
  83. 15
    0
      luticateutils/src/test/java/com/luticate/lutcateutils/ExampleUnitTest.java
  84. 2564
    0
      projectFilesBackup/.idea/workspace.xml
  85. 1
    1
      settings.gradle

+ 1
- 1
app/build.gradle View File

@@ -27,7 +27,7 @@ dependencies {
27 27
     compile 'com.android.support:appcompat-v7:23.4.0'
28 28
     compile 'com.android.support:support-annotations:23.4.0'
29 29
     compile 'com.android.support:design:23.4.0'
30
-    compile 'com.android.volley:volley:1.0.0'
31 30
     compile 'com.jakewharton:butterknife:8.0.1'
32 31
     apt 'com.jakewharton:butterknife-compiler:8.0.1'
32
+    compile project(path: ':luticateutils')
33 33
 }

+ 2
- 4
app/src/main/java/com/rthoni/stssaguenay/business/STSBusiness.java View File

@@ -1,21 +1,19 @@
1 1
 package com.rthoni.stssaguenay.business;
2 2
 
3
-import com.rthoni.stssaguenay.dbo.LuDataAccessConfigDbo;
3
+import com.luticate.utils.dbo.LuDataAccessConfigDbo;
4 4
 
5 5
 /**
6 6
  * Created by robin on 9/29/16.
7 7
  */
8 8
 public class STSBusiness {
9 9
 
10
-    public static int UNKNOWN_PARAM = 118;
11
-
12 10
     private static LuDataAccessConfigDbo _config = null;
13 11
 
14 12
     public static LuDataAccessConfigDbo getConfig()
15 13
     {
16 14
         if (_config == null) {
17 15
             _config = new LuDataAccessConfigDbo();
18
-            _config.setBaseUrl("http://horaires.sts.saguenay.ca/api/");
16
+            _config.setBaseUrl("http://gigi-eth:8089/");
19 17
         }
20 18
         return _config;
21 19
     }

+ 24
- 4
app/src/main/java/com/rthoni/stssaguenay/business/StopsBusiness.java View File

@@ -1,8 +1,8 @@
1 1
 package com.rthoni.stssaguenay.business;
2 2
 
3
-import com.rthoni.stssaguenay.dataaccess.LuPromise;
3
+import com.luticate.utils.business.LuPromise;
4
+import com.luticate.utils.dbo.LuDataAccessConfigDbo;
4 5
 import com.rthoni.stssaguenay.dataaccess.StopsDataAccess;
5
-import com.rthoni.stssaguenay.dbo.LuDataAccessConfigDbo;
6 6
 import com.rthoni.stssaguenay.dbo.StopsDbo;
7 7
 
8 8
 import java.util.List;
@@ -12,8 +12,28 @@ import java.util.List;
12 12
  */
13 13
 public class StopsBusiness {
14 14
 
15
-    public static LuPromise<List<StopsDbo>> getAll(LuDataAccessConfigDbo config, int unknownParam)
15
+    private static List<StopsDbo> _stopsDbos = null;
16
+
17
+    public static LuPromise<List<StopsDbo>> getAll(LuDataAccessConfigDbo config)
16 18
     {
17
-        return StopsDataAccess.getAll(config, unknownParam);
19
+        final LuPromise<List<StopsDbo>> promise = new LuPromise<>();
20
+        if (_stopsDbos == null) {
21
+            StopsDataAccess.getAll(config).then(new LuPromise.LuConsumer<List<StopsDbo>>() {
22
+                @Override
23
+                public void execute(List<StopsDbo> data) {
24
+                    _stopsDbos = data;
25
+                    promise.resolve(data);
26
+                }
27
+            }, new LuPromise.LuConsumer<LuPromise.LuPromiseError>() {
28
+                @Override
29
+                public void execute(LuPromise.LuPromiseError data) {
30
+                    promise.reject(data);
31
+                }
32
+            });
33
+        }
34
+        else {
35
+            promise.resolve(_stopsDbos);
36
+        }
37
+        return promise;
18 38
     }
19 39
 }

+ 8
- 0
app/src/main/java/com/rthoni/stssaguenay/dataaccess/RoutesDataAccess.java View File

@@ -0,0 +1,8 @@
1
+package com.rthoni.stssaguenay.dataaccess;
2
+
3
+/**
4
+ * Created by robin on 9/30/16.
5
+ */
6
+
7
+public class RoutesDataAccess {
8
+}

+ 8
- 56
app/src/main/java/com/rthoni/stssaguenay/dataaccess/StopsDataAccess.java View File

@@ -1,73 +1,25 @@
1 1
 package com.rthoni.stssaguenay.dataaccess;
2 2
 
3
-import android.util.Pair;
4
-
5
-import com.rthoni.stssaguenay.dbo.LuDataAccessConfigDbo;
6
-import com.rthoni.stssaguenay.dbo.LuDbo;
3
+import com.luticate.utils.business.LuPromise;
4
+import com.luticate.utils.business.LuRequest;
5
+import com.luticate.utils.dbo.LuDataAccessConfigDbo;
7 6
 import com.rthoni.stssaguenay.dbo.StopsDbo;
8 7
 
9
-import org.json.JSONArray;
10
-import org.json.JSONException;
11
-import org.json.JSONObject;
12
-
13
-import java.util.HashMap;
14 8
 import java.util.List;
15 9
 import java.util.Locale;
16
-import java.util.Vector;
17 10
 
18 11
 /**
19 12
  * Created by robin on 9/29/16.
20 13
  */
21 14
 public class StopsDataAccess {
22 15
 
23
-    public static class StopsDboRaw extends LuDbo {
24
-
25
-        protected List<StopsDbo> _stops;
26
-
27
-        @Override
28
-        public void fromJson(JSONObject json) throws JSONException {
29
-
30
-            _stops = new Vector<>();
31
-            JSONArray features = json.getJSONArray("features");
32
-            for (int i = 0; i < features.length(); ++i) {
33
-                JSONObject obj = features.getJSONObject(i);
34
-                JSONObject props = obj.getJSONObject("properties");
35
-
36
-                JSONArray routes = props.getJSONArray("route_ids");
37
-                List<String> routesStr = new Vector<>();
38
-                for (int j = 0; j < routes.length(); ++j) {
39
-                    routesStr.add(routes.getString(j));
40
-                }
41
-
42
-                JSONArray pos = obj.getJSONObject("geometry").getJSONArray("coordinates");
43
-
44
-                StopsDbo stop = new StopsDbo();
45
-                stop.setId(obj.getString("id"));
46
-                stop.setName(props.getString("name"));
47
-                stop.setRoutes(routesStr);
48
-                stop.setPosition(new Pair<Double, Double>(pos.getDouble(0), pos.getDouble(1)));
49
-                _stops.add(stop);
50
-            }
51
-        }
52
-
53
-        @Override
54
-        public HashMap<String, Object> toArray() {
55
-            return null;
56
-        }
57
-
58
-        public List<StopsDbo> getStops()
59
-        {
60
-            return _stops;
61
-        }
62
-    }
63
-
64
-    public static LuPromise<List<StopsDbo>> getAll(LuDataAccessConfigDbo config, int unknownParam)
16
+    public static LuPromise<List<StopsDbo>> getAll(LuDataAccessConfigDbo config)
65 17
     {
66
-        return LuRequest.get(config, StopsDboRaw.class, String.format(Locale.getDefault(), "transit/%d/week/stops.json", unknownParam))
67
-        .map(new LuPromise.LuConverter<StopsDboRaw, List<StopsDbo>>() {
18
+        return LuRequest.get(config, StopsDbo.PaginatedStopsDbo.class, "stops")
19
+        .map(new LuPromise.LuConverter<StopsDbo.PaginatedStopsDbo, List<StopsDbo>>() {
68 20
             @Override
69
-            public List<StopsDbo> convert(StopsDboRaw data) {
70
-                return data.getStops();
21
+            public List<StopsDbo> convert(StopsDbo.PaginatedStopsDbo data) {
22
+                return data.getData();
71 23
             }
72 24
         });
73 25
     }

+ 47
- 6
app/src/main/java/com/rthoni/stssaguenay/dbo/StopsDbo.java View File

@@ -2,12 +2,43 @@ package com.rthoni.stssaguenay.dbo;
2 2
 
3 3
 import android.util.Pair;
4 4
 
5
+import com.luticate.utils.dbo.LuDbo;
6
+import com.luticate.utils.dbo.LuPaginatedDbo;
7
+
8
+import org.json.JSONArray;
9
+import org.json.JSONException;
10
+import org.json.JSONObject;
11
+
12
+import java.util.HashMap;
5 13
 import java.util.List;
14
+import java.util.Vector;
6 15
 
7 16
 /**
8 17
  * Created by robin on 9/29/16.
9 18
  */
10
-public class StopsDbo {
19
+public class StopsDbo extends LuDbo {
20
+
21
+    public static class PaginatedStopsDbo extends LuPaginatedDbo<StopsDbo>
22
+    {
23
+    }
24
+
25
+    @Override
26
+    public void fromJson(JSONObject json) throws JSONException {
27
+        _name = json.getString("name");
28
+        _routes = new Vector<>();
29
+        JSONArray routes = json.getJSONArray("routes");
30
+        for (int i = 0; i < routes.length(); ++i) {
31
+            _routes.add(routes.getString(i));
32
+        }
33
+        _id = json.getString("id");
34
+        _posX = json.getDouble("posX");
35
+        _posY = json.getDouble("posY");
36
+    }
37
+
38
+    @Override
39
+    public HashMap<String, Object> toArray() {
40
+        return null;
41
+    }
11 42
 
12 43
     protected String _name;
13 44
 
@@ -15,7 +46,9 @@ public class StopsDbo {
15 46
 
16 47
     protected String _id;
17 48
 
18
-    protected Pair<Double, Double> _position;
49
+    protected double _posX;
50
+
51
+    protected double _posY;
19 52
 
20 53
     public String getFullName()
21 54
     {
@@ -46,11 +79,19 @@ public class StopsDbo {
46 79
         _id = id;
47 80
     }
48 81
 
49
-    public Pair<Double, Double> getPosition() {
50
-        return _position;
82
+    public double getPosX() {
83
+        return _posX;
84
+    }
85
+
86
+    public void setPosX(double posX) {
87
+        _posX = posX;
88
+    }
89
+
90
+    public double getPosY() {
91
+        return _posY;
51 92
     }
52 93
 
53
-    public void setPosition(Pair<Double, Double> position) {
54
-        _position = position;
94
+    public void setPosY(double posY) {
95
+        _posY = posY;
55 96
     }
56 97
 }

+ 1
- 5
app/src/main/java/com/rthoni/stssaguenay/ui/activities/MainActivity.java View File

@@ -3,17 +3,13 @@ package com.rthoni.stssaguenay.ui.activities;
3 3
 import android.content.Intent;
4 4
 import android.os.Bundle;
5 5
 import android.support.design.widget.FloatingActionButton;
6
-import android.support.design.widget.Snackbar;
7 6
 import android.support.v7.app.AppCompatActivity;
8 7
 import android.support.v7.widget.Toolbar;
9 8
 import android.view.View;
10
-import android.view.Menu;
11
-import android.view.MenuItem;
12 9
 
10
+import com.luticate.utils.business.LuRequest;
13 11
 import com.rthoni.stssaguenay.R;
14
-import com.rthoni.stssaguenay.dataaccess.LuRequest;
15 12
 import com.rthoni.stssaguenay.ui.fragments.HomeFragment;
16
-import com.rthoni.stssaguenay.ui.fragments.StopPickerFragment;
17 13
 
18 14
 import butterknife.BindView;
19 15
 import butterknife.ButterKnife;

+ 1
- 1
app/src/main/java/com/rthoni/stssaguenay/ui/activities/StopPickerActivity.java View File

@@ -3,8 +3,8 @@ package com.rthoni.stssaguenay.ui.activities;
3 3
 import android.os.Bundle;
4 4
 import android.support.v7.app.AppCompatActivity;
5 5
 
6
+import com.luticate.utils.business.LuPromise;
6 7
 import com.rthoni.stssaguenay.R;
7
-import com.rthoni.stssaguenay.dataaccess.LuPromise;
8 8
 import com.rthoni.stssaguenay.dbo.StopsDbo;
9 9
 import com.rthoni.stssaguenay.ui.fragments.StopPickerFragment;
10 10
 import com.rthoni.stssaguenay.ui.fragments.StopRoutesPickerFragment;

+ 2
- 4
app/src/main/java/com/rthoni/stssaguenay/ui/fragments/StopPickerFragment.java View File

@@ -19,15 +19,13 @@ import android.widget.Filterable;
19 19
 import android.widget.TextView;
20 20
 import android.widget.Toast;
21 21
 
22
+import com.luticate.utils.business.LuPromise;
22 23
 import com.rthoni.stssaguenay.R;
23 24
 import com.rthoni.stssaguenay.business.STSBusiness;
24 25
 import com.rthoni.stssaguenay.business.StopsBusiness;
25 26
 import com.rthoni.stssaguenay.business.Utils;
26
-import com.rthoni.stssaguenay.dataaccess.LuPromise;
27 27
 import com.rthoni.stssaguenay.dbo.StopsDbo;
28 28
 
29
-import java.util.ArrayList;
30
-import java.util.Arrays;
31 29
 import java.util.List;
32 30
 import java.util.TimerTask;
33 31
 import java.util.Vector;
@@ -179,7 +177,7 @@ public class StopPickerFragment extends Fragment {
179 177
         progressDialog.setIndeterminate(true);
180 178
         progressDialog.show();
181 179
 
182
-        StopsBusiness.getAll(STSBusiness.getConfig(), STSBusiness.UNKNOWN_PARAM)
180
+        StopsBusiness.getAll(STSBusiness.getConfig())
183 181
                 .then(new LuPromise.LuConsumer<List<StopsDbo>>() {
184 182
                     @Override
185 183
                     public void execute(List<StopsDbo> data) {

+ 1
- 1
build.gradle View File

@@ -6,7 +6,7 @@ buildscript {
6 6
         mavenCentral()
7 7
     }
8 8
     dependencies {
9
-        classpath 'com.android.tools.build:gradle:2.1.3'
9
+        classpath 'com.android.tools.build:gradle:2.2.0'
10 10
         classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
11 11
 
12 12
         // NOTE: Do not place your application dependencies here; they belong

+ 1
- 0
luticateutils/.gitignore View File

@@ -0,0 +1 @@
1
+/build

+ 1
- 0
luticateutils/.idea/.name View File

@@ -0,0 +1 @@
1
+luticateutils

+ 22
- 0
luticateutils/.idea/compiler.xml View File

@@ -0,0 +1,22 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="CompilerConfiguration">
4
+    <resourceExtensions />
5
+    <wildcardResourcePatterns>
6
+      <entry name="!?*.java" />
7
+      <entry name="!?*.form" />
8
+      <entry name="!?*.class" />
9
+      <entry name="!?*.groovy" />
10
+      <entry name="!?*.scala" />
11
+      <entry name="!?*.flex" />
12
+      <entry name="!?*.kt" />
13
+      <entry name="!?*.clj" />
14
+      <entry name="!?*.aj" />
15
+    </wildcardResourcePatterns>
16
+    <annotationProcessing>
17
+      <profile default="true" name="Default" enabled="false">
18
+        <processorPath useClasspath="true" />
19
+      </profile>
20
+    </annotationProcessing>
21
+  </component>
22
+</project>

+ 3
- 0
luticateutils/.idea/copyright/profiles_settings.xml View File

@@ -0,0 +1,3 @@
1
+<component name="CopyrightManager">
2
+  <settings default="" />
3
+</component>

+ 6
- 0
luticateutils/.idea/encodings.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="Encoding">
4
+    <file url="PROJECT" charset="UTF-8" />
5
+  </component>
6
+</project>

+ 29
- 0
luticateutils/.idea/gradle.xml View File

@@ -0,0 +1,29 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="GradleSettings">
4
+    <option name="linkedExternalProjectsSettings">
5
+      <GradleProjectSettings>
6
+        <option name="distributionType" value="DEFAULT_WRAPPED" />
7
+        <option name="externalProjectPath" value="$PROJECT_DIR$" />
8
+        <option name="modules">
9
+          <set>
10
+            <option value="$PROJECT_DIR$/.." />
11
+            <option value="$PROJECT_DIR$/../app" />
12
+            <option value="$PROJECT_DIR$/../luticateauth" />
13
+            <option value="$PROJECT_DIR$" />
14
+            <option value="$PROJECT_DIR$/../volley" />
15
+          </set>
16
+        </option>
17
+        <option name="myModules">
18
+          <set>
19
+            <option value="$PROJECT_DIR$/.." />
20
+            <option value="$PROJECT_DIR$/../app" />
21
+            <option value="$PROJECT_DIR$/../luticateauth" />
22
+            <option value="$PROJECT_DIR$" />
23
+            <option value="$PROJECT_DIR$/../volley" />
24
+          </set>
25
+        </option>
26
+      </GradleProjectSettings>
27
+    </option>
28
+  </component>
29
+</project>

+ 11
- 0
luticateutils/.idea/libraries/accessibility_test_framework_1_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="accessibility-test-framework-1.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.android.apps.common.testing.accessibility.framework/accessibility-test-framework/1.0/28162aae36f8ba5903adadfb570313e1f1be852e/accessibility-test-framework-1.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.android.apps.common.testing.accessibility.framework/accessibility-test-framework/1.0/d742fcaabf1e26311aa7796f5b378ee60b09fe62/accessibility-test-framework-1.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 12
- 0
luticateutils/.idea/libraries/animated_vector_drawable_23_4_0.xml View File

@@ -0,0 +1,12 @@
1
+<component name="libraryTable">
2
+  <library name="animated-vector-drawable-23.4.0">
3
+    <CLASSES>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/23.4.0/jars/classes.jar!/" />
5
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/23.4.0/res" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES>
9
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/animated-vector-drawable/23.4.0/animated-vector-drawable-23.4.0-sources.jar!/" />
10
+    </SOURCES>
11
+  </library>
12
+</component>

+ 10
- 0
luticateutils/.idea/libraries/answers_1_3_7.xml View File

@@ -0,0 +1,10 @@
1
+<component name="libraryTable">
2
+  <library name="answers-1.3.7">
3
+    <CLASSES>
4
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.crashlytics.sdk.android/answers/1.3.7/res" />
5
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.crashlytics.sdk.android/answers/1.3.7/jars/classes.jar!/" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES />
9
+  </library>
10
+</component>

+ 11
- 0
luticateutils/.idea/libraries/ant_1_8_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="ant-1.8.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant/1.8.0/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/ant-1.8.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant/1.8.0/2e585348c06d55d4c27c4afe46721fd5d6a43d9d/ant-1.8.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 9
- 0
luticateutils/.idea/libraries/ant_launcher_1_8_0.xml View File

@@ -0,0 +1,9 @@
1
+<component name="libraryTable">
2
+  <library name="ant-launcher-1.8.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant-launcher/1.8.0/8b53ba16fa62fb1034da8f1de200ddc407c8381/ant-launcher-1.8.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES />
8
+  </library>
9
+</component>

+ 15
- 0
luticateutils/.idea/libraries/appcompat_v7_23_4_0.xml View File

@@ -0,0 +1,15 @@
1
+<component name="libraryTable">
2
+  <library name="appcompat-v7-23.4.0">
3
+    <ANNOTATIONS>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/annotations.zip!/" />
5
+    </ANNOTATIONS>
6
+    <CLASSES>
7
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/res" />
8
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/jars/classes.jar!/" />
9
+    </CLASSES>
10
+    <JAVADOC />
11
+    <SOURCES>
12
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/23.4.0/appcompat-v7-23.4.0-sources.jar!/" />
13
+    </SOURCES>
14
+  </library>
15
+</component>

+ 11
- 0
luticateutils/.idea/libraries/asm_5_0_1.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="asm-5.0.1">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/5.0.1/2fd56467a018aafe6ec6a73ccba520be4a7e1565/asm-5.0.1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/5.0.1/78ebb2694324283f3120aa3ed52465b22fab8a4a/asm-5.0.1-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/asm_analysis_5_0_1.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="asm-analysis-5.0.1">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-analysis/5.0.1/e286fbee48efacb4e7c175f7948d9d8b2ab52352/asm-analysis-5.0.1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-analysis/5.0.1/78ebb2694324283f3120aa3ed52465b22fab8a4a/asm-analysis-5.0.1-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/asm_commons_5_0_1.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="asm-commons-5.0.1">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/5.0.1/7b7147a390a93a14d2edfdcf3f7b0e87a0939c3e/asm-commons-5.0.1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/5.0.1/78ebb2694324283f3120aa3ed52465b22fab8a4a/asm-commons-5.0.1-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/asm_tree_5_0_1.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="asm-tree-5.0.1">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-tree/5.0.1/1b1e6e9d869acd704056d0a4223071a511c619e6/asm-tree-5.0.1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-tree/5.0.1/78ebb2694324283f3120aa3ed52465b22fab8a4a/asm-tree-5.0.1-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/asm_util_5_0_1.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="asm-util-5.0.1">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-util/5.0.1/7c8caddfbd0b2d7b844f8fcc75175b9cb9cf4724/asm-util-5.0.1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-util/5.0.1/78ebb2694324283f3120aa3ed52465b22fab8a4a/asm-util-5.0.1-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/bcprov_jdk16_1_46.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="bcprov-jdk16-1.46">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk16/1.46/ce091790943599535cbb4de8ede84535b0c1260c/bcprov-jdk16-1.46.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk16/1.46/d2b70567594225923450d7e3f80cd022c852725e/bcprov-jdk16-1.46-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 10
- 0
luticateutils/.idea/libraries/beta_1_1_5.xml View File

@@ -0,0 +1,10 @@
1
+<component name="libraryTable">
2
+  <library name="beta-1.1.5">
3
+    <CLASSES>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.crashlytics.sdk.android/beta/1.1.5/jars/classes.jar!/" />
5
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.crashlytics.sdk.android/beta/1.1.5/res" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES />
9
+  </library>
10
+</component>

+ 12
- 0
luticateutils/.idea/libraries/butterknife_8_0_1.xml View File

@@ -0,0 +1,12 @@
1
+<component name="libraryTable">
2
+  <library name="butterknife-8.0.1">
3
+    <CLASSES>
4
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.jakewharton/butterknife/8.0.1/res" />
5
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.jakewharton/butterknife/8.0.1/jars/classes.jar!/" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES>
9
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/8.0.1/95f98af806452c48faf67da0d8c7430f94502e30/butterknife-8.0.1-sources.jar!/" />
10
+    </SOURCES>
11
+  </library>
12
+</component>

+ 11
- 0
luticateutils/.idea/libraries/butterknife_annotations_8_0_1.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="butterknife-annotations-8.0.1">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.0.1/345b89f45d02d8b09400b472fab7b7e38f4ede1f/butterknife-annotations-8.0.1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.0.1/9cb4e19d0e2481474c142ea56df86fff89bdf0a/butterknife-annotations-8.0.1-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 10
- 0
luticateutils/.idea/libraries/crashlytics_2_5_6.xml View File

@@ -0,0 +1,10 @@
1
+<component name="libraryTable">
2
+  <library name="crashlytics-2.5.6">
3
+    <CLASSES>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics/2.5.6/jars/classes.jar!/" />
5
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics/2.5.6/res" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES />
9
+  </library>
10
+</component>

+ 10
- 0
luticateutils/.idea/libraries/crashlytics_core_2_3_9.xml View File

@@ -0,0 +1,10 @@
1
+<component name="libraryTable">
2
+  <library name="crashlytics-core-2.3.9">
3
+    <CLASSES>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics-core/2.3.9/jars/classes.jar!/" />
5
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics-core/2.3.9/res" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES />
9
+  </library>
10
+</component>

+ 15
- 0
luticateutils/.idea/libraries/design_23_4_0.xml View File

@@ -0,0 +1,15 @@
1
+<component name="libraryTable">
2
+  <library name="design-23.4.0">
3
+    <ANNOTATIONS>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/design/23.4.0/annotations.zip!/" />
5
+    </ANNOTATIONS>
6
+    <CLASSES>
7
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/design/23.4.0/res" />
8
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/design/23.4.0/jars/classes.jar!/" />
9
+    </CLASSES>
10
+    <JAVADOC />
11
+    <SOURCES>
12
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/design/23.4.0/design-23.4.0-sources.jar!/" />
13
+    </SOURCES>
14
+  </library>
15
+</component>

+ 11
- 0
luticateutils/.idea/libraries/eventbus_3_0_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="eventbus-3.0.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.greenrobot/eventbus/3.0.0/ddd99896e9569eaababbe81b35d80e1b91c4ad85/eventbus-3.0.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.greenrobot/eventbus/3.0.0/777f0a941d3dd0f9988d4f22b42b36ce2fe64ea4/eventbus-3.0.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 10
- 0
luticateutils/.idea/libraries/fabric_1_3_11.xml View File

@@ -0,0 +1,10 @@
1
+<component name="libraryTable">
2
+  <library name="fabric-1.3.11">
3
+    <CLASSES>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/io.fabric.sdk.android/fabric/1.3.11/jars/classes.jar!/" />
5
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/io.fabric.sdk.android/fabric/1.3.11/res" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES />
9
+  </library>
10
+</component>

+ 11
- 0
luticateutils/.idea/libraries/hamcrest_core_1_1.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="hamcrest-core-1.1">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.1/860340562250678d1a344907ac75754e259cdb14/hamcrest-core-1.1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.1/2ccf1154d1a8936042a8a742dc3e611d02ac7213/hamcrest-core-1.1-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/hamcrest_core_1_3.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="hamcrest-core-1.3">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b/hamcrest-core-1.3-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/icu4j_53_1.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="icu4j-53.1">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.ibm.icu/icu4j/53.1/786d9055d4ca8c1aab4a7d4ac8283f973fd7e41f/icu4j-53.1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.ibm.icu/icu4j/53.1/fd352ab7304443c31256acd4476bc089fc2dd3b1/icu4j-53.1-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/junit_4_10.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="junit-4.10">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.10/e4f1766ce7404a08f45d859fb9c226fc9e41a861/junit-4.10.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.10/6c98d6766e72d5575f96c9479d1c1d3b865c6e25/junit-4.10-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/junit_4_12.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="junit-4.12">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 12
- 0
luticateutils/.idea/libraries/library_1_2_0.xml View File

@@ -0,0 +1,12 @@
1
+<component name="libraryTable">
2
+  <library name="library-1.2.0">
3
+    <CLASSES>
4
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/se.simbio.encryption/library/1.2.0/res" />
5
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/se.simbio.encryption/library/1.2.0/jars/classes.jar!/" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES>
9
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/se.simbio.encryption/library/1.2.0/67fdd3472e760850ed7cc3e41dea68a63de66821/library-1.2.0-sources.jar!/" />
10
+    </SOURCES>
11
+  </library>
12
+</component>

+ 11
- 0
luticateutils/.idea/libraries/maven_ant_tasks_2_1_3.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="maven-ant-tasks-2.1.3">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-ant-tasks/2.1.3/b09be554228d66d208e5fef5266844aacf443abc/maven-ant-tasks-2.1.3.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-ant-tasks/2.1.3/49136cf7eb0e463e080ad2ebb0f65e91b19c8101/maven-ant-tasks-2.1.3-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/mockito_core_1_9_5.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="mockito-core-1.9.5">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.9.5/c3264abeea62c4d2f367e21484fbb40c7e256393/mockito-core-1.9.5.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.9.5/46f703fb4266140c544d48a189cb25947eb6333e/mockito-core-1.9.5-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/objenesis_1_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="objenesis-1.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/1.0/9b473564e792c2bdf1449da1f0b1b5bff9805704/objenesis-1.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/1.0/b10c90e57b7bb985a7b6a704769428fe5c2a732c/objenesis-1.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 15
- 0
luticateutils/.idea/libraries/recyclerview_v7_23_4_0.xml View File

@@ -0,0 +1,15 @@
1
+<component name="libraryTable">
2
+  <library name="recyclerview-v7-23.4.0">
3
+    <ANNOTATIONS>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.4.0/annotations.zip!/" />
5
+    </ANNOTATIONS>
6
+    <CLASSES>
7
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.4.0/jars/classes.jar!/" />
8
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.4.0/res" />
9
+    </CLASSES>
10
+    <JAVADOC />
11
+    <SOURCES>
12
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/recyclerview-v7/23.4.0/recyclerview-v7-23.4.0-sources.jar!/" />
13
+    </SOURCES>
14
+  </library>
15
+</component>

+ 11
- 0
luticateutils/.idea/libraries/robolectric_3_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="robolectric-3.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/robolectric/3.0/f888cea3bc1a24110e315eb9827ab593610ea62f/robolectric-3.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/robolectric/3.0/6a43602a072b7d4c6ba0760dfd1b4a5145ceece0/robolectric-3.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/robolectric_annotations_3_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="robolectric-annotations-3.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/robolectric-annotations/3.0/2a6cfc072d7680694c1ff893c5dc8fec33163110/robolectric-annotations-3.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/robolectric-annotations/3.0/c936fceba80c370dfd85b0e3a5126a7ab7c0fb8f/robolectric-annotations-3.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/robolectric_resources_3_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="robolectric-resources-3.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/robolectric-resources/3.0/1ab609054aab67cd13a434567467f4b4774f2465/robolectric-resources-3.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/robolectric-resources/3.0/356679719fa4ff9f552d831a87b338db1d40bf69/robolectric-resources-3.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/robolectric_utils_3_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="robolectric-utils-3.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/robolectric-utils/3.0/4bcecd8115fe7296088bb1636e6cbd7ae8927392/robolectric-utils-3.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/robolectric-utils/3.0/38d31ddbc7db513477a5f1e63ba5f0f4e71c8bc8/robolectric-utils-3.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/shadows_core_3_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="shadows-core-3.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/shadows-core/3.0/9dfa881bfd1796afa28204ef1a5ed7e3de992612/shadows-core-3.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.robolectric/shadows-core/3.0/3d33ccfbdb2d72115aed935a66c6210f9bf67148/shadows-core-3.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/sqlite4java_0_282.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="sqlite4java-0.282">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.almworks.sqlite4java/sqlite4java/0.282/745a7e2f35fdbe6336922e0d492c979dbbfa74fb/sqlite4java-0.282.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.almworks.sqlite4java/sqlite4java/0.282/8058566a195c0f19ddaf9e2162138bdcb43712e1/sqlite4java-0.282-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 11
- 0
luticateutils/.idea/libraries/support_annotations_23_4_0.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="support-annotations-23.4.0">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/23.4.0/support-annotations-23.4.0.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/23.4.0/support-annotations-23.4.0-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 16
- 0
luticateutils/.idea/libraries/support_v4_23_4_0.xml View File

@@ -0,0 +1,16 @@
1
+<component name="libraryTable">
2
+  <library name="support-v4-23.4.0">
3
+    <ANNOTATIONS>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/annotations.zip!/" />
5
+    </ANNOTATIONS>
6
+    <CLASSES>
7
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/jars/classes.jar!/" />
8
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/jars/libs/internal_impl-23.4.0.jar!/" />
9
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/res" />
10
+    </CLASSES>
11
+    <JAVADOC />
12
+    <SOURCES>
13
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0-sources.jar!/" />
14
+    </SOURCES>
15
+  </library>
16
+</component>

+ 12
- 0
luticateutils/.idea/libraries/support_vector_drawable_23_4_0.xml View File

@@ -0,0 +1,12 @@
1
+<component name="libraryTable">
2
+  <library name="support-vector-drawable-23.4.0">
3
+    <CLASSES>
4
+      <root url="jar://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/23.4.0/jars/classes.jar!/" />
5
+      <root url="file://$PROJECT_DIR$/../app/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/23.4.0/res" />
6
+    </CLASSES>
7
+    <JAVADOC />
8
+    <SOURCES>
9
+      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-vector-drawable/23.4.0/support-vector-drawable-23.4.0-sources.jar!/" />
10
+    </SOURCES>
11
+  </library>
12
+</component>

+ 11
- 0
luticateutils/.idea/libraries/vtd_xml_2_11.xml View File

@@ -0,0 +1,11 @@
1
+<component name="libraryTable">
2
+  <library name="vtd-xml-2.11">
3
+    <CLASSES>
4
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.ximpleware/vtd-xml/2.11/ee5bcf62c1acf76434ee9f1c67a840bafef72a6d/vtd-xml-2.11.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC />
7
+    <SOURCES>
8
+      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.ximpleware/vtd-xml/2.11/fa2dcbbe7f3bf99312efc0a010d8aa97f0f5779e/vtd-xml-2.11-sources.jar!/" />
9
+    </SOURCES>
10
+  </library>
11
+</component>

+ 62
- 0
luticateutils/.idea/misc.xml View File

@@ -0,0 +1,62 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectInspectionProfilesVisibleTreeState">
4
+    <entry key="Project Default">
5
+      <profile-state>
6
+        <expanded-state>
7
+          <State>
8
+            <id />
9
+          </State>
10
+          <State>
11
+            <id>Android &gt; Lint &gt; Correctness</id>
12
+          </State>
13
+          <State>
14
+            <id>Android &gt; Lint &gt; Performance</id>
15
+          </State>
16
+          <State>
17
+            <id>Android &gt; Lint &gt; Security</id>
18
+          </State>
19
+          <State>
20
+            <id>Declaration redundancyJava</id>
21
+          </State>
22
+          <State>
23
+            <id>Initialization issuesJava</id>
24
+          </State>
25
+          <State>
26
+            <id>J2ME issuesJava</id>
27
+          </State>
28
+          <State>
29
+            <id>Java</id>
30
+          </State>
31
+          <State>
32
+            <id>Naming conventionsJava</id>
33
+          </State>
34
+          <State>
35
+            <id>toString() issuesJava</id>
36
+          </State>
37
+        </expanded-state>
38
+        <selected-state>
39
+          <State>
40
+            <id>Android</id>
41
+          </State>
42
+        </selected-state>
43
+      </profile-state>
44
+    </entry>
45
+  </component>
46
+  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
47
+    <OptionsSetting value="true" id="Add" />
48
+    <OptionsSetting value="true" id="Remove" />
49
+    <OptionsSetting value="true" id="Checkout" />
50
+    <OptionsSetting value="true" id="Update" />
51
+    <OptionsSetting value="true" id="Status" />
52
+    <OptionsSetting value="true" id="Edit" />
53
+    <ConfirmationsSetting value="0" id="Add" />
54
+    <ConfirmationsSetting value="0" id="Remove" />
55
+  </component>
56
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
57
+    <output url="file://$PROJECT_DIR$/build/classes" />
58
+  </component>
59
+  <component name="ProjectType">
60
+    <option name="id" value="Android" />
61
+  </component>
62
+</project>

+ 12
- 0
luticateutils/.idea/modules.xml View File

@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/../app/app.iml" filepath="$PROJECT_DIR$/../app/app.iml" />
6
+      <module fileurl="file://$PROJECT_DIR$/../luticateauth/luticateauth.iml" filepath="$PROJECT_DIR$/../luticateauth/luticateauth.iml" />
7
+      <module fileurl="file://$PROJECT_DIR$/luticateutils.iml" filepath="$PROJECT_DIR$/luticateutils.iml" />
8
+      <module fileurl="file://$PROJECT_DIR$/../trainme-android.iml" filepath="$PROJECT_DIR$/../trainme-android.iml" />
9
+      <module fileurl="file://$PROJECT_DIR$/../volley/volley.iml" filepath="$PROJECT_DIR$/../volley/volley.iml" />
10
+    </modules>
11
+  </component>
12
+</project>

+ 12
- 0
luticateutils/.idea/runConfigurations.xml View File

@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="RunConfigurationProducerService">
4
+    <option name="ignoredProducers">
5
+      <set>
6
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
7
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
8
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
9
+      </set>
10
+    </option>
11
+  </component>
12
+</project>

+ 4468
- 0
luticateutils/.idea/workspace.xml
File diff suppressed because it is too large
View File


+ 25
- 0
luticateutils/build.gradle View File

@@ -0,0 +1,25 @@
1
+apply plugin: 'com.android.library'
2
+
3
+android {
4
+    compileSdkVersion 22
5
+    buildToolsVersion "22.0.1"
6
+
7
+    defaultConfig {
8
+        minSdkVersion 14
9
+        targetSdkVersion 22
10
+        versionCode 1
11
+        versionName "1.0"
12
+    }
13
+    buildTypes {
14
+        release {
15
+            minifyEnabled false
16
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17
+        }
18
+    }
19
+}
20
+
21
+dependencies {
22
+    compile fileTree(dir: 'libs', include: ['*.jar'])
23
+    testCompile 'junit:junit:4.12'
24
+    compile 'com.android.volley:volley:1.0.0'
25
+}

+ 11
- 0
luticateutils/local.properties View File

@@ -0,0 +1,11 @@
1
+## This file is automatically generated by Android Studio.
2
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3
+#
4
+# This file must *NOT* be checked into Version Control Systems,
5
+# as it contains information specific to your local configuration.
6
+#
7
+# Location of the SDK. This is only used by Gradle.
8
+# For customization when using a Version Control System, please read the
9
+# header note.
10
+#Fri Jun 17 21:43:56 CEST 2016
11
+sdk.dir=/home/robin/Android/Sdk

+ 17
- 0
luticateutils/proguard-rules.pro View File

@@ -0,0 +1,17 @@
1
+# Add project specific ProGuard rules here.
2
+# By default, the flags in this file are appended to flags specified
3
+# in /home/robin/Android/Sdk/tools/proguard/proguard-android.txt
4
+# You can edit the include path and order by changing the proguardFiles
5
+# directive in build.gradle.
6
+#
7
+# For more details, see
8
+#   http://developer.android.com/guide/developing/tools/proguard.html
9
+
10
+# Add any project specific keep options here:
11
+
12
+# If your project uses WebView with JS, uncomment the following
13
+# and specify the fully qualified class name to the JavaScript interface
14
+# class:
15
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16
+#   public *;
17
+#}

+ 11
- 0
luticateutils/src/main/AndroidManifest.xml View File

@@ -0,0 +1,11 @@
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+    package="com.luticate.utils">
3
+
4
+    <application
5
+        android:allowBackup="true"
6
+        android:label="@string/app_name"
7
+        android:supportsRtl="true">
8
+
9
+    </application>
10
+
11
+</manifest>

+ 7
- 0
luticateutils/src/main/java/com/luticate/utils/business/LuBusinessManager.java View File

@@ -0,0 +1,7 @@
1
+package com.luticate.utils.business;
2
+
3
+/**
4
+ * Created by robin on 11/27/15.
5
+ */
6
+public class LuBusinessManager {
7
+}

app/src/main/java/com/rthoni/stssaguenay/dataaccess/LuPromise.java → luticateutils/src/main/java/com/luticate/utils/business/LuPromise.java View File

@@ -1,4 +1,4 @@
1
-package com.rthoni.stssaguenay.dataaccess;
1
+package com.luticate.utils.business;
2 2
 
3 3
 /**
4 4
  *

app/src/main/java/com/rthoni/stssaguenay/dataaccess/LuRequest.java → luticateutils/src/main/java/com/luticate/utils/business/LuRequest.java View File

@@ -1,16 +1,17 @@
1
-package com.rthoni.stssaguenay.dataaccess;
1
+package com.luticate.utils.business;
2 2
 
3 3
 import android.content.Context;
4 4
 import android.net.Uri;
5 5
 
6
+import com.android.volley.AuthFailureError;
6 7
 import com.android.volley.Request;
7 8
 import com.android.volley.RequestQueue;
8 9
 import com.android.volley.Response;
9 10
 import com.android.volley.VolleyError;
10 11
 import com.android.volley.toolbox.StringRequest;
11 12
 import com.android.volley.toolbox.Volley;
12
-import com.rthoni.stssaguenay.dbo.LuDataAccessConfigDbo;
13
-import com.rthoni.stssaguenay.dbo.LuDbo;
13
+import com.luticate.utils.dbo.LuDataAccessConfigDbo;
14
+import com.luticate.utils.dbo.LuDbo;
14 15
 
15 16
 import org.json.JSONObject;
16 17
 
@@ -40,7 +41,15 @@ public class LuRequest {
40 41
                     T dbo = type.newInstance();
41 42
                     try {
42 43
                         JSONObject json = new JSONObject(response);
43
-                        dbo.fromJson(json);
44
+                        JSONObject obj = null;
45
+                        if (!json.isNull("data")) {
46
+                            obj = json.optJSONObject("data");
47
+                            if (obj == null) {
48
+                                obj = new JSONObject();
49
+                                obj.put("value", json.opt("data"));
50
+                            }
51
+                        }
52
+                        dbo.fromJson(obj);
44 53
                         promise.resolve(dbo);
45 54
                     } catch (Exception e)
46 55
                     {
@@ -68,7 +77,7 @@ public class LuRequest {
68 77
                 try
69 78
                 {
70 79
                     JSONObject data = new JSONObject(new String(error.networkResponse.data));
71
-                    promise.reject(new LuPromise.LuPromiseError(data.getString("messages"), code));//TODO messages is an array
80
+                    promise.reject(new LuPromise.LuPromiseError(data.getString("Message"), code));
72 81
                 } catch (Exception e)
73 82
                 {
74 83
                     promise.reject(new LuPromise.LuPromiseError(e.getMessage(), code));

+ 7
- 0
luticateutils/src/main/java/com/luticate/utils/dataaccess/LuDataAccess.java View File

@@ -0,0 +1,7 @@
1
+package com.luticate.utils.dataaccess;
2
+
3
+/**
4
+ * Created by robin on 11/27/15.
5
+ */
6
+public abstract class LuDataAccess {
7
+}

+ 33
- 0
luticateutils/src/main/java/com/luticate/utils/dbo/LuBoolDbo.java View File

@@ -0,0 +1,33 @@
1
+package com.luticate.utils.dbo;
2
+
3
+import org.json.JSONException;
4
+import org.json.JSONObject;
5
+
6
+import java.util.HashMap;
7
+
8
+/**
9
+ * Created by robin on 11/27/15.
10
+ */
11
+public class LuBoolDbo extends LuDbo {
12
+    public boolean isValue() {
13
+        return _value;
14
+    }
15
+
16
+    public void setValue(boolean value) {
17
+        _value = value;
18
+    }
19
+
20
+    private boolean _value;
21
+
22
+    @Override
23
+    public void fromJson(JSONObject json) throws JSONException {
24
+        _value = json.getBoolean("value");
25
+    }
26
+
27
+    @Override
28
+    public HashMap<String, Object> toArray() {
29
+        HashMap<String, Object> array = new HashMap<>();
30
+        array.put("value", _value);
31
+        return array;
32
+    }
33
+}

app/src/main/java/com/rthoni/stssaguenay/dbo/LuDataAccessConfigDbo.java → luticateutils/src/main/java/com/luticate/utils/dbo/LuDataAccessConfigDbo.java View File

@@ -1,4 +1,4 @@
1
-package com.rthoni.stssaguenay.dbo;
1
+package com.luticate.utils.dbo;
2 2
 
3 3
 import java.util.HashMap;
4 4
 import java.util.Map;

app/src/main/java/com/rthoni/stssaguenay/dbo/LuDbo.java → luticateutils/src/main/java/com/luticate/utils/dbo/LuDbo.java View File

@@ -1,4 +1,4 @@
1
-package com.rthoni.stssaguenay.dbo;
1
+package com.luticate.utils.dbo;
2 2
 
3 3
 import org.json.JSONException;
4 4
 import org.json.JSONObject;
@@ -10,6 +10,11 @@ import java.util.HashMap;
10 10
  */
11 11
 public abstract class LuDbo {
12 12
 
13
+    public void fromString(String data) throws JSONException {
14
+        JSONObject json = new JSONObject(data);
15
+        fromJson(json);
16
+    }
17
+
13 18
     public abstract void fromJson(JSONObject json) throws JSONException;
14 19
 
15 20
     public abstract HashMap<String, Object> toArray();

+ 33
- 0
luticateutils/src/main/java/com/luticate/utils/dbo/LuIntDbo.java View File

@@ -0,0 +1,33 @@
1
+package com.luticate.utils.dbo;
2
+
3
+import org.json.JSONException;
4
+import org.json.JSONObject;
5
+
6
+import java.util.HashMap;
7
+
8
+/**
9
+ * Created by robin on 11/27/15.
10
+ */
11
+public class LuIntDbo extends LuDbo {
12
+    public int getInt() {
13
+        return _value;
14
+    }
15
+
16
+    public void setInt(int value) {
17
+        _value = value;
18
+    }
19
+
20
+    private int _value;
21
+
22
+    @Override
23
+    public void fromJson(JSONObject json) throws JSONException {
24
+        _value = json.getInt("value");
25
+    }
26
+
27
+    @Override
28
+    public HashMap<String, Object> toArray() {
29
+        HashMap<String, Object> array = new HashMap<>();
30
+        array.put("value", _value);
31
+        return array;
32
+    }
33
+}

+ 65
- 0
luticateutils/src/main/java/com/luticate/utils/dbo/LuPaginatedDbo.java View File

@@ -0,0 +1,65 @@
1
+package com.luticate.utils.dbo;
2
+
3
+import org.json.JSONArray;
4
+import org.json.JSONException;
5
+import org.json.JSONObject;
6
+
7
+import java.lang.reflect.ParameterizedType;
8
+import java.util.HashMap;
9
+import java.util.List;
10
+import java.util.Vector;
11
+
12
+/**
13
+ *
14
+ * Created by robin on 11/27/15.
15
+ */
16
+public class LuPaginatedDbo<T extends LuDbo> extends LuDbo {
17
+
18
+    public List<T> getData() {
19
+        return _data;
20
+    }
21
+
22
+    public void setData(List<T> data) {
23
+        _data = data;
24
+    }
25
+
26
+    public int getCount() {
27
+        return _count;
28
+    }
29
+
30
+    public void setCount(int count) {
31
+        _count = count;
32
+    }
33
+
34
+    private List<T> _data = new Vector<>();
35
+
36
+    private int _count;
37
+
38
+    @Override
39
+    public void fromJson(JSONObject json) throws JSONException {
40
+        _count = json.getInt("count");
41
+        JSONArray array = json.getJSONArray("data");
42
+        for (int i = 0; i < array.length(); ++i) {
43
+            try {
44
+                T dbo = (T)((Class)((ParameterizedType)this.getClass().
45
+                        getGenericSuperclass()).getActualTypeArguments()[0]).newInstance();
46
+                dbo.fromJson(array.getJSONObject(i));
47
+                _data.add(dbo);
48
+            } catch (Exception e) {
49
+                e.printStackTrace();
50
+            }
51
+        }
52
+    }
53
+
54
+    @Override
55
+    public HashMap<String, Object> toArray() {
56
+        HashMap<String, Object> array = new HashMap<>();
57
+        array.put("count", _count);
58
+        Vector<HashMap<String, Object>> data = new Vector<>();
59
+        for (T value : _data) {
60
+            data.add(value.toArray());
61
+        }
62
+        array.put("data", data);
63
+        return array;
64
+    }
65
+}

+ 21
- 0
luticateutils/src/main/java/com/luticate/utils/dbo/LuVoidDbo.java View File

@@ -0,0 +1,21 @@
1
+package com.luticate.utils.dbo;
2
+
3
+import org.json.JSONException;
4
+import org.json.JSONObject;
5
+
6
+import java.util.HashMap;
7
+
8
+/**
9
+ * Created by robin on 11/27/15.
10
+ */
11
+public class LuVoidDbo extends LuDbo {
12
+    @Override
13
+    public void fromJson(JSONObject json) throws JSONException {
14
+
15
+    }
16
+
17
+    @Override
18
+    public HashMap<String, Object> toArray() {
19
+        return null;
20
+    }
21
+}

+ 141
- 0
luticateutils/src/main/java/com/luticate/utils/ui/fragments/AbstractPaginationFragment.java View File

@@ -0,0 +1,141 @@
1
+package com.luticate.utils.ui.fragments;
2
+
3
+import android.animation.Animator;
4
+import android.animation.AnimatorListenerAdapter;
5
+import android.app.Fragment;
6
+import android.os.Build;
7
+import android.os.Bundle;
8
+import android.view.LayoutInflater;
9
+import android.view.View;
10
+import android.view.ViewGroup;
11
+
12
+import com.luticate.utils.business.LuPromise;
13
+import com.luticate.utils.dbo.LuDbo;
14
+import com.luticate.utils.dbo.LuPaginatedDbo;
15
+import com.luticate.utils.ui.views.AbstractPaginationView;
16
+
17
+import java.util.Vector;
18
+
19
+/**
20
+ * Created by robin on 12/6/15.
21
+ */
22
+public abstract class AbstractPaginationFragment<Dbo extends LuDbo> extends Fragment {
23
+
24
+    protected int _page = 0;
25
+
26
+    protected int _perPage = 15;
27
+
28
+    protected int _maxPage = 1;
29
+
30
+    protected String _query = "";
31
+
32
+    protected LuPaginatedDbo<Dbo> _items = null;
33
+
34
+    @Override
35
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
36
+    {
37
+        return inflater.inflate(getLayoutId(), container, false);
38
+    }
39
+
40
+    @Override
41
+    public void onStart() {
42
+        super.onStart();
43
+        View v = getView();
44
+        AbstractPaginationView paginationView = (AbstractPaginationView) v.findViewById(getPaginationViewId());
45
+        paginationView.setOnPageChanged(new LuPromise.LuConsumer<Integer>() {
46
+            @Override
47
+            public void execute(Integer page) {
48
+                loadPage(page);
49
+            }
50
+        });
51
+        if (_items == null) {
52
+            loadPage(_page);
53
+        }
54
+    }
55
+
56
+    protected void showProgress(final boolean show)
57
+    {
58
+        View v = getView();
59
+        if (!isAdded() || v == null)
60
+            return;
61
+
62
+        final View imagesScrollView = v.findViewById(getScrollViewId());
63
+        final View loadingView = v.findViewById(getLoaderViewId());
64
+
65
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2)
66
+        {
67
+            int shortAnimTime =
68
+                    getResources().getInteger(android.R.integer.config_shortAnimTime);
69
+
70
+            loadingView.setVisibility(View.VISIBLE);
71
+            loadingView.animate().setDuration(shortAnimTime).alpha(show ? 1 : 0)
72
+                    .setListener(new AnimatorListenerAdapter()
73
+                    {
74
+                        @Override
75
+                        public void onAnimationEnd(Animator animation)
76
+                        {
77
+                            loadingView.setVisibility(show ? View.VISIBLE : View.GONE);
78
+                        }
79
+                    });
80
+
81
+            imagesScrollView.setVisibility(View.VISIBLE);
82
+            imagesScrollView.animate().setDuration(shortAnimTime).alpha(show ? 0 : 1)
83
+                    .setListener(new AnimatorListenerAdapter()
84
+                    {
85
+                        @Override
86
+                        public void onAnimationEnd(Animator animation)
87
+                        {
88
+                            imagesScrollView.setVisibility(show ? View.GONE : View.VISIBLE);
89
+                        }
90
+                    });
91
+        }
92
+        else
93
+        {
94
+            loadingView.setVisibility(show ? View.VISIBLE : View.GONE);
95
+            imagesScrollView.setVisibility(show ? View.GONE : View.VISIBLE);
96
+        }
97
+    }
98
+
99
+    public void loadPage(final int page)
100
+    {
101
+        final View v = getView();
102
+        if (!isAdded() || v == null) {
103
+            return;
104
+        }
105
+        showProgress(true);
106
+        if (_items != null) {
107
+            _items.setData(new Vector<Dbo>());
108
+        }
109
+        getLoadPagePromise(page, _perPage, _query).then(new LuPromise.LuConsumer<LuPaginatedDbo<Dbo>>() {
110
+            @Override
111
+            public void execute(LuPaginatedDbo<Dbo> items) {
112
+                _items = items;
113
+                _page = page;
114
+                _maxPage = Math.max(items.getCount() / _perPage, 1);
115
+                AbstractPaginationView paginationView = (AbstractPaginationView) v.findViewById(getPaginationViewId());
116
+                paginationView.setMaxPage(_maxPage);
117
+                paginationView.setPage(_page);
118
+                onPageChanged();
119
+                showProgress(false);
120
+            }
121
+        }, new LuPromise.LuConsumer<LuPromise.LuPromiseError>() {
122
+            @Override
123
+            public void execute(LuPromise.LuPromiseError error) {
124
+
125
+                showProgress(false);
126
+            }
127
+        });
128
+    }
129
+
130
+    protected abstract void onPageChanged();
131
+
132
+    protected abstract LuPromise<LuPaginatedDbo<Dbo>> getLoadPagePromise(int page, int perPage, String query);
133
+
134
+    protected abstract int getScrollViewId();
135
+
136
+    protected abstract int getLoaderViewId();
137
+
138
+    protected abstract int getLayoutId();
139
+
140
+    protected abstract int getPaginationViewId();
141
+}

+ 54
- 0
luticateutils/src/main/java/com/luticate/utils/ui/fragments/ViewPaginationFragment.java View File

@@ -0,0 +1,54 @@
1
+package com.luticate.utils.ui.fragments;
2
+
3
+import android.view.View;
4
+import android.widget.LinearLayout;
5
+
6
+import com.luticate.utils.R;
7
+import com.luticate.utils.dbo.LuDbo;
8
+
9
+import java.util.List;
10
+import java.util.Vector;
11
+
12
+/**
13
+ * Created by robin on 12/6/15.
14
+ */
15
+public abstract class ViewPaginationFragment<Dbo extends LuDbo, DboView extends View> extends AbstractPaginationFragment<Dbo> {
16
+
17
+    protected List<DboView> _views = new Vector<>();
18
+
19
+    @Override
20
+    protected int getLoaderViewId() {
21
+        return R.id.loadStatus;
22
+    }
23
+
24
+    @Override
25
+    protected int getScrollViewId() {
26
+        return R.id.mainScrollView;
27
+    }
28
+
29
+    @Override
30
+    protected int getLayoutId() {
31
+        return R.layout.view_pagination_fragment_layout;
32
+    }
33
+
34
+    @Override
35
+    protected int getPaginationViewId() {
36
+        return R.id.paginationView;
37
+    }
38
+
39
+    @Override
40
+    protected void onPageChanged() {
41
+        View view = getView();
42
+        LinearLayout layout = (LinearLayout) view.findViewById(R.id.itemsLayoutScrollView);
43
+        layout.removeAllViews();
44
+        _views.clear();
45
+        for (Dbo item : _items.getData())
46
+        {
47
+            DboView v = getDboView(item);
48
+            layout.addView(v);
49
+            _views.add(v);
50
+        }
51
+    }
52
+
53
+    protected abstract DboView getDboView(Dbo dbo);
54
+}

+ 133
- 0
luticateutils/src/main/java/com/luticate/utils/ui/views/AbstractPaginationView.java View File

@@ -0,0 +1,133 @@
1
+package com.luticate.utils.ui.views;
2
+
3
+import android.content.Context;
4
+import android.util.AttributeSet;
5
+import android.widget.LinearLayout;
6
+
7
+import com.luticate.utils.business.LuPromise;
8
+
9
+import java.util.List;
10
+import java.util.Vector;
11
+
12
+/**
13
+ * Created by robin on 12/8/15.
14
+ */
15
+public abstract class AbstractPaginationView extends LinearLayout {
16
+
17
+    private LuPromise.LuConsumer<Integer> _onPageChanged = null;
18
+
19
+    private int _page = 0;
20
+
21
+    private int _maxPage = 1;
22
+
23
+    private int _contextPagesCount = 2;
24
+
25
+    public AbstractPaginationView(Context context) {
26
+        super(context);
27
+        init();
28
+    }
29
+
30
+    public AbstractPaginationView(Context context, AttributeSet attrs) {
31
+        super(context, attrs);
32
+        init(attrs);
33
+    }
34
+
35
+    public AbstractPaginationView(Context context, AttributeSet attrs, int defStyleAttr) {
36
+        super(context, attrs, defStyleAttr);
37
+        init(attrs);
38
+    }
39
+
40
+    private void init(AttributeSet attrs)
41
+    {
42
+        init();
43
+        //_contextPagesCount = attrs.getAttributeIntValue(R.styleable.DefaultPaginationView_contextPagesCount, _contextPagesCount);
44
+    }
45
+
46
+    private void init()
47
+    {
48
+
49
+    }
50
+
51
+    @Override
52
+    protected void onAttachedToWindow() {
53
+        super.onAttachedToWindow();
54
+
55
+        if (isInEditMode())
56
+        {
57
+            onUpdatePages();
58
+        }
59
+    }
60
+
61
+    protected List<Integer> getPages()
62
+    {
63
+        List<Integer> pages = new Vector<>();
64
+        int start = Math.max(0, getPage() - getContextPagesCount());
65
+        int end = Math.min(start + getContextPagesCount() + 1, getMaxPage());
66
+        for (int i = start; i < end; ++i)
67
+        {
68
+            pages.add(i);
69
+        }
70
+        return pages;
71
+    }
72
+
73
+    protected abstract void onUpdatePages();
74
+
75
+    public int getMaxPage() {
76
+        return isInEditMode() ? 50 : _maxPage;
77
+    }
78
+
79
+    public void setMaxPage(int maxPage) {
80
+        _maxPage = maxPage;
81
+        onUpdatePages();
82
+    }
83
+
84
+    public int getContextPagesCount() {
85
+        return _contextPagesCount;
86
+    }
87
+
88
+    public void setContextPagesCount(int contextPagesCount) {
89
+        _contextPagesCount = contextPagesCount;
90
+        onUpdatePages();
91
+    }
92
+
93
+    public void setPage(int page)
94
+    {
95
+        _page = page;
96
+        onUpdatePages();
97
+    }
98
+
99
+    public int getPage()
100
+    {
101
+        return isInEditMode() ? 24 : _page;
102
+    }
103
+
104
+    public void setOnPageChanged(LuPromise.LuConsumer<Integer> onPageChanged) {
105
+        _onPageChanged = onPageChanged;
106
+    }
107
+
108
+    public void loadPage(int page)
109
+    {
110
+        if (_onPageChanged != null)
111
+        {
112
+            _onPageChanged.execute(page);
113
+        }
114
+    }
115
+
116
+    public void loadNextPage()
117
+    {
118
+        int page = getPage();
119
+        if (page < getMaxPage() - 1)
120
+        {
121
+            loadPage(page + 1);
122
+        }
123
+    }
124
+
125
+    public void loadPreviousPage()
126
+    {
127
+        int page = getPage();
128
+        if (page > 0)
129
+        {
130
+            loadPage(page - 1);
131
+        }
132
+    }
133
+}

+ 65
- 0
luticateutils/src/main/java/com/luticate/utils/ui/views/DefaultPaginationView.java View File

@@ -0,0 +1,65 @@
1
+package com.luticate.utils.ui.views;
2
+
3
+import android.content.Context;
4
+import android.util.AttributeSet;
5
+import android.view.View;
6
+import android.view.ViewGroup;
7
+import android.widget.TextView;
8
+
9
+import com.luticate.utils.R;
10
+
11
+/**
12
+ * Created by robin on 12/8/15.
13
+ */
14
+public class DefaultPaginationView extends AbstractPaginationView {
15
+    public DefaultPaginationView(Context context) {
16
+        super(context);
17
+        init();
18
+    }
19
+
20
+    public DefaultPaginationView(Context context, AttributeSet attrs) {
21
+        super(context, attrs);
22
+        init();
23
+    }
24
+
25
+    public DefaultPaginationView(Context context, AttributeSet attrs, int defStyleAttr) {
26
+        super(context, attrs, defStyleAttr);
27
+        init();
28
+    }
29
+
30
+    public void init()
31
+    {
32
+        inflate(getContext(), R.layout.default_pagination_view_layout, this);
33
+        findViewById(R.id.previousPageView).setOnClickListener(new OnClickListener() {
34
+            @Override
35
+            public void onClick(View v) {
36
+                loadPreviousPage();
37
+            }
38
+        });
39
+        findViewById(R.id.nextPageView).setOnClickListener(new OnClickListener() {
40
+            @Override
41
+            public void onClick(View v) {
42
+                loadNextPage();
43
+            }
44
+        });
45
+    }
46
+
47
+    @Override
48
+    protected void onUpdatePages() {
49
+        ViewGroup layout = (ViewGroup) findViewById(R.id.pagesLayout);
50
+        layout.removeAllViews();
51
+        for (final int page : getPages())
52
+        {
53
+            TextView tv = new TextView(getContext());
54
+            tv.setText(" " + String.valueOf(page + 1) + " ");
55
+            tv.setOnClickListener(new View.OnClickListener() {
56
+                    @Override
57
+                    public void onClick(View v) {
58
+                        loadPage(page);
59
+                    }
60
+                });
61
+            tv.setTextAppearance(getContext(), android.R.style.TextAppearance_DeviceDefault_Large);
62
+            layout.addView(tv);
63
+        }
64
+    }
65
+}

+ 30
- 0
luticateutils/src/main/res/layout/default_pagination_view_layout.xml View File

@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+              android:layout_width="match_parent"
4
+              android:layout_height="wrap_content"
5
+              android:gravity="center">
6
+
7
+    <TextView
8
+        android:layout_width="wrap_content"
9
+        android:layout_height="wrap_content"
10
+        android:id="@+id/previousPageView"
11
+        android:textAppearance="?android:attr/textAppearanceLarge"
12
+        android:layout_margin="2dp"
13
+        android:text=" &lt; "/>
14
+
15
+    <LinearLayout
16
+        android:id="@+id/pagesLayout"
17
+        android:layout_width="wrap_content"
18
+        android:layout_height="match_parent"
19
+        android:layout_gravity="center_horizontal"
20
+        android:orientation="horizontal">
21
+    </LinearLayout>
22
+
23
+    <TextView
24
+        android:layout_width="wrap_content"
25
+        android:layout_height="wrap_content"
26
+        android:id="@+id/nextPageView"
27
+        android:textAppearance="?android:attr/textAppearanceLarge"
28
+        android:layout_margin="2dp"
29
+        android:text=" &gt; "/>
30
+</LinearLayout>

+ 52
- 0
luticateutils/src/main/res/layout/view_pagination_fragment_layout.xml View File

@@ -0,0 +1,52 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+              android:layout_width="match_parent"
4
+              android:layout_height="match_parent"
5
+              xmlns:app="http://schemas.android.com/apk/res-auto"
6
+              android:orientation="vertical">
7
+
8
+    <!-- Loading progress -->
9
+
10
+    <LinearLayout
11
+        android:id="@+id/loadStatus"
12
+        android:layout_width="wrap_content"
13
+        android:layout_height="wrap_content"
14
+        android:layout_gravity="center"
15
+        android:gravity="center_horizontal"
16
+        android:orientation="vertical"
17
+        android:visibility="gone">
18
+
19
+        <ProgressBar
20
+            style="?android:attr/progressBarStyleLarge"
21
+            android:layout_width="wrap_content"
22
+            android:layout_height="wrap_content"
23
+            android:layout_marginBottom="8dp"/>
24
+    </LinearLayout>
25
+
26
+    <!-- Layout -->
27
+
28
+    <ScrollView
29
+        android:id="@+id/mainScrollView"
30
+        android:layout_width="match_parent"
31
+        android:layout_height="0dp"
32
+        android:layout_weight="0.33">
33
+
34
+        <RelativeLayout
35
+            android:layout_width="match_parent"
36
+            android:layout_height="wrap_content">
37
+
38
+            <LinearLayout
39
+                android:id="@+id/itemsLayoutScrollView"
40
+                android:layout_width="match_parent"
41
+                android:layout_height="match_parent"
42
+                android:orientation="vertical">
43
+            </LinearLayout>
44
+
45
+            <com.luticate.utils.ui.views.DefaultPaginationView
46
+                android:layout_width="match_parent"
47
+                android:layout_height="wrap_content"
48
+                android:layout_below="@+id/itemsLayoutScrollView"
49
+                android:id="@+id/paginationView"/>
50
+        </RelativeLayout>
51
+    </ScrollView>
52
+</LinearLayout>

+ 6
- 0
luticateutils/src/main/res/values/attrs.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<resources>
3
+    <declare-styleable name="DefaultPaginationView">
4
+        <attr name="contextPagesCount" format="integer" />
5
+    </declare-styleable>
6
+</resources>

+ 3
- 0
luticateutils/src/main/res/values/strings.xml View File

@@ -0,0 +1,3 @@
1
+<resources>
2
+    <string name="app_name">LutcateUtils</string>
3
+</resources>

+ 15
- 0
luticateutils/src/test/java/com/luticate/lutcateutils/ExampleUnitTest.java View File

@@ -0,0 +1,15 @@
1
+package com.rthoni.utils;
2
+
3
+import org.junit.Test;
4
+
5
+import static org.junit.Assert.*;
6
+
7
+/**
8
+ * To work on unit tests, switch the Test Artifact in the Build Variants view.
9
+ */
10
+public class ExampleUnitTest {
11
+    @Test
12
+    public void addition_isCorrect() throws Exception {
13
+        assertEquals(4, 2 + 2);
14
+    }
15
+}

+ 2564
- 0
projectFilesBackup/.idea/workspace.xml
File diff suppressed because it is too large
View File


+ 1
- 1
settings.gradle View File

@@ -1 +1 @@
1
-include ':app'
1
+include ':app', ':luticateutils'

Loading…
Cancel
Save