From fd5c8d5ad38423d5e73121abdb9b58b85018d1a7 Mon Sep 17 00:00:00 2001 From: Aran Zaiger Date: Sun, 10 Jul 2016 16:34:29 +0300 Subject: [PATCH] Merge branch 'master' of https://github.com/sagidayan/TheSocialNotework-Android # Conflicts: # app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/GmapFragment.java --- .idea/libraries/animated_vector_drawable_23_4_0.xml | 4 ++-- .idea/libraries/appcompat_v7_23_4_0.xml | 4 ++-- .idea/libraries/design_23_4_0.xml | 4 ++-- .idea/libraries/firebase_analytics_impl_9_2_0.xml | 2 +- .idea/libraries/firebase_auth_9_2_0.xml | 2 +- .idea/libraries/firebase_auth_common_9_2_0.xml | 2 +- .idea/libraries/firebase_auth_module_9_2_0.xml | 2 +- .idea/libraries/firebase_config_9_2_0.xml | 2 +- .idea/libraries/firebase_crash_9_2_0.xml | 2 +- .idea/libraries/firebase_database_9_2_0.xml | 2 +- .idea/libraries/firebase_messaging_9_2_0.xml | 2 +- .idea/libraries/firebase_storage_9_2_0.xml | 2 +- .idea/libraries/firebase_storage_common_9_2_0.xml | 2 +- .idea/libraries/mediarouter_v7_23_0_0.xml | 4 ++-- .idea/libraries/play_services_9_2_0.xml | 2 +- .idea/libraries/play_services_appindexing_9_2_0.xml | 2 +- .idea/libraries/play_services_auth_base_9_2_0.xml | 2 +- .idea/libraries/play_services_basement_9_2_0.xml | 2 +- .idea/libraries/play_services_cast_9_2_0.xml | 2 +- .../play_services_contextmanager_9_2_0.xml | 2 +- .idea/libraries/play_services_location_9_2_0.xml | 2 +- .idea/libraries/play_services_plus_9_2_0.xml | 2 +- .../play_services_tagmanager_api_9_2_0.xml | 2 +- .idea/libraries/play_services_tasks_9_2_0.xml | 2 +- .idea/libraries/play_services_vision_9_2_0.xml | 2 +- .idea/libraries/recyclerview_v7_23_4_0.xml | 4 ++-- .idea/libraries/support_annotations_23_4_0.xml | 4 ++-- .idea/libraries/support_v4_23_4_0.xml | 4 ++-- .idea/libraries/support_vector_drawable_23_4_0.xml | 2 +- .idea/libraries/volley_1_0_0.xml | 2 +- .../sagi/thesocialnotework/PersonalFragment.java | 13 +++++++++---- 31 files changed, 46 insertions(+), 41 deletions(-) diff --git a/.idea/libraries/animated_vector_drawable_23_4_0.xml b/.idea/libraries/animated_vector_drawable_23_4_0.xml index 4688c4a..581ec94 100644 --- a/.idea/libraries/animated_vector_drawable_23_4_0.xml +++ b/.idea/libraries/animated_vector_drawable_23_4_0.xml @@ -1,13 +1,13 @@ - + - + diff --git a/.idea/libraries/appcompat_v7_23_4_0.xml b/.idea/libraries/appcompat_v7_23_4_0.xml index 215af43..7fc3be6 100644 --- a/.idea/libraries/appcompat_v7_23_4_0.xml +++ b/.idea/libraries/appcompat_v7_23_4_0.xml @@ -4,13 +4,13 @@ - + - + diff --git a/.idea/libraries/design_23_4_0.xml b/.idea/libraries/design_23_4_0.xml index da6f2ae..e917021 100644 --- a/.idea/libraries/design_23_4_0.xml +++ b/.idea/libraries/design_23_4_0.xml @@ -4,13 +4,13 @@ - + - + diff --git a/.idea/libraries/firebase_analytics_impl_9_2_0.xml b/.idea/libraries/firebase_analytics_impl_9_2_0.xml index 4993bce..6e0d7e2 100644 --- a/.idea/libraries/firebase_analytics_impl_9_2_0.xml +++ b/.idea/libraries/firebase_analytics_impl_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_auth_9_2_0.xml b/.idea/libraries/firebase_auth_9_2_0.xml index f4f9543..7185ab6 100644 --- a/.idea/libraries/firebase_auth_9_2_0.xml +++ b/.idea/libraries/firebase_auth_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_auth_common_9_2_0.xml b/.idea/libraries/firebase_auth_common_9_2_0.xml index 7a29d3c..86f4201 100644 --- a/.idea/libraries/firebase_auth_common_9_2_0.xml +++ b/.idea/libraries/firebase_auth_common_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_auth_module_9_2_0.xml b/.idea/libraries/firebase_auth_module_9_2_0.xml index 06c2d67..a45803b 100644 --- a/.idea/libraries/firebase_auth_module_9_2_0.xml +++ b/.idea/libraries/firebase_auth_module_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_config_9_2_0.xml b/.idea/libraries/firebase_config_9_2_0.xml index fc1bc23..d4a396e 100644 --- a/.idea/libraries/firebase_config_9_2_0.xml +++ b/.idea/libraries/firebase_config_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_crash_9_2_0.xml b/.idea/libraries/firebase_crash_9_2_0.xml index 5f6e0d0..7b7a413 100644 --- a/.idea/libraries/firebase_crash_9_2_0.xml +++ b/.idea/libraries/firebase_crash_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_database_9_2_0.xml b/.idea/libraries/firebase_database_9_2_0.xml index 2ce92c1..4cf8d04 100644 --- a/.idea/libraries/firebase_database_9_2_0.xml +++ b/.idea/libraries/firebase_database_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_messaging_9_2_0.xml b/.idea/libraries/firebase_messaging_9_2_0.xml index 036d0ad..f28a963 100644 --- a/.idea/libraries/firebase_messaging_9_2_0.xml +++ b/.idea/libraries/firebase_messaging_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_storage_9_2_0.xml b/.idea/libraries/firebase_storage_9_2_0.xml index d84dec2..111cccc 100644 --- a/.idea/libraries/firebase_storage_9_2_0.xml +++ b/.idea/libraries/firebase_storage_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/firebase_storage_common_9_2_0.xml b/.idea/libraries/firebase_storage_common_9_2_0.xml index 380abaf..206dd0b 100644 --- a/.idea/libraries/firebase_storage_common_9_2_0.xml +++ b/.idea/libraries/firebase_storage_common_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/mediarouter_v7_23_0_0.xml b/.idea/libraries/mediarouter_v7_23_0_0.xml index 9e4c862..d53bf7d 100644 --- a/.idea/libraries/mediarouter_v7_23_0_0.xml +++ b/.idea/libraries/mediarouter_v7_23_0_0.xml @@ -5,13 +5,13 @@ - + - + diff --git a/.idea/libraries/play_services_9_2_0.xml b/.idea/libraries/play_services_9_2_0.xml index c48c16f..7460e35 100644 --- a/.idea/libraries/play_services_9_2_0.xml +++ b/.idea/libraries/play_services_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_appindexing_9_2_0.xml b/.idea/libraries/play_services_appindexing_9_2_0.xml index 972539a..1f748dc 100644 --- a/.idea/libraries/play_services_appindexing_9_2_0.xml +++ b/.idea/libraries/play_services_appindexing_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_auth_base_9_2_0.xml b/.idea/libraries/play_services_auth_base_9_2_0.xml index 992cc4d..a6522a6 100644 --- a/.idea/libraries/play_services_auth_base_9_2_0.xml +++ b/.idea/libraries/play_services_auth_base_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_basement_9_2_0.xml b/.idea/libraries/play_services_basement_9_2_0.xml index d4ac257..0aec068 100644 --- a/.idea/libraries/play_services_basement_9_2_0.xml +++ b/.idea/libraries/play_services_basement_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_cast_9_2_0.xml b/.idea/libraries/play_services_cast_9_2_0.xml index db48fce..984c4b1 100644 --- a/.idea/libraries/play_services_cast_9_2_0.xml +++ b/.idea/libraries/play_services_cast_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_contextmanager_9_2_0.xml b/.idea/libraries/play_services_contextmanager_9_2_0.xml index 0c01383..f1795a0 100644 --- a/.idea/libraries/play_services_contextmanager_9_2_0.xml +++ b/.idea/libraries/play_services_contextmanager_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_location_9_2_0.xml b/.idea/libraries/play_services_location_9_2_0.xml index 53c7ebe..37fb730 100644 --- a/.idea/libraries/play_services_location_9_2_0.xml +++ b/.idea/libraries/play_services_location_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_plus_9_2_0.xml b/.idea/libraries/play_services_plus_9_2_0.xml index a1e9d21..13b2aef 100644 --- a/.idea/libraries/play_services_plus_9_2_0.xml +++ b/.idea/libraries/play_services_plus_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_tagmanager_api_9_2_0.xml b/.idea/libraries/play_services_tagmanager_api_9_2_0.xml index 0ccf9df..785dae0 100644 --- a/.idea/libraries/play_services_tagmanager_api_9_2_0.xml +++ b/.idea/libraries/play_services_tagmanager_api_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_tasks_9_2_0.xml b/.idea/libraries/play_services_tasks_9_2_0.xml index e7d0a1b..255cf7b 100644 --- a/.idea/libraries/play_services_tasks_9_2_0.xml +++ b/.idea/libraries/play_services_tasks_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/play_services_vision_9_2_0.xml b/.idea/libraries/play_services_vision_9_2_0.xml index 02a9a1e..d05e55f 100644 --- a/.idea/libraries/play_services_vision_9_2_0.xml +++ b/.idea/libraries/play_services_vision_9_2_0.xml @@ -1,8 +1,8 @@ - + diff --git a/.idea/libraries/recyclerview_v7_23_4_0.xml b/.idea/libraries/recyclerview_v7_23_4_0.xml index 0651040..af5c00a 100644 --- a/.idea/libraries/recyclerview_v7_23_4_0.xml +++ b/.idea/libraries/recyclerview_v7_23_4_0.xml @@ -4,13 +4,13 @@ - + - + diff --git a/.idea/libraries/support_annotations_23_4_0.xml b/.idea/libraries/support_annotations_23_4_0.xml index 4619479..92ae113 100644 --- a/.idea/libraries/support_annotations_23_4_0.xml +++ b/.idea/libraries/support_annotations_23_4_0.xml @@ -1,12 +1,12 @@ - + - + diff --git a/.idea/libraries/support_v4_23_4_0.xml b/.idea/libraries/support_v4_23_4_0.xml index b9606c9..550c072 100644 --- a/.idea/libraries/support_v4_23_4_0.xml +++ b/.idea/libraries/support_v4_23_4_0.xml @@ -5,13 +5,13 @@ - + - + diff --git a/.idea/libraries/support_vector_drawable_23_4_0.xml b/.idea/libraries/support_vector_drawable_23_4_0.xml index c4f8c3a..2f49a78 100644 --- a/.idea/libraries/support_vector_drawable_23_4_0.xml +++ b/.idea/libraries/support_vector_drawable_23_4_0.xml @@ -6,8 +6,8 @@ - + diff --git a/.idea/libraries/volley_1_0_0.xml b/.idea/libraries/volley_1_0_0.xml index 8e317b7..81a83dd 100644 --- a/.idea/libraries/volley_1_0_0.xml +++ b/.idea/libraries/volley_1_0_0.xml @@ -1,8 +1,8 @@ - + diff --git a/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java b/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java index 337ab91..9190771 100644 --- a/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java +++ b/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java @@ -309,7 +309,7 @@ public class PersonalFragment extends Fragment { Date time = new Date(); JSONObject noteObject = response.getJSONObject("note"); time.setTime(noteObject.getLong("created_at")); - addNoteFromJsonObj(noteObject, time); + addNoteFromJsonObj(noteObject, time,0); updateShowedNotes(); // presentedNotes = listOfNotes; @@ -346,7 +346,7 @@ public class PersonalFragment extends Fragment { JSONObject noteObject = noteObjectsArray.getJSONObject(i); time.setTime(noteObject.getLong("created_at")); - addNoteFromJsonObj(noteObject, time); + addNoteFromJsonObj(noteObject, time,-1); } updateShowedNotes(); // presentedNotes = listOfNotes; @@ -393,7 +393,7 @@ public class PersonalFragment extends Fragment { } - private void addNoteFromJsonObj(JSONObject noteObject, Date time) throws JSONException { + private void addNoteFromJsonObj(JSONObject noteObject, Date time, int position) throws JSONException { Note addNote = new Note( noteObject.getString("id"), Float.parseFloat(noteObject.getJSONObject("location").getString("lat")), @@ -408,7 +408,12 @@ public class PersonalFragment extends Fragment { noteObject.getString("owner_id"), jsonArrayToStringArray(noteObject.getJSONArray("tags")) ); - listOfNotes.add(addNote); + Log.d(TAG, "addNoteFromJsonObj: "+ addNote.getDate() + " " + addNote.getTime()); + if (position != 0) + listOfNotes.add(addNote); + else + listOfNotes.add(position,addNote); + }