aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Zelent <zelent.marcin@gmail.com>2018-04-23 17:19:58 +0200
committerMarcin Zelent <zelent.marcin@gmail.com>2018-04-23 17:19:58 +0200
commite2f49fe23b2ae1a910ab7015167e5ed9a5e4988a (patch)
treebbc450ed3480593480efcba5a5a58dcd63fa51c1 /app/src/main/java/org/marcinzelent/liberavem/DataKeeper.java
parent2cf7ca569e50caa8d33d4045977d69d1f10771c2 (diff)
Added proper new observation layout with geolocation and bird choosing,
added swipe refreshing.
Diffstat (limited to 'app/src/main/java/org/marcinzelent/liberavem/DataKeeper.java')
-rw-r--r--app/src/main/java/org/marcinzelent/liberavem/DataKeeper.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/src/main/java/org/marcinzelent/liberavem/DataKeeper.java b/app/src/main/java/org/marcinzelent/liberavem/DataKeeper.java
index 27f9dc4..2000eab 100644
--- a/app/src/main/java/org/marcinzelent/liberavem/DataKeeper.java
+++ b/app/src/main/java/org/marcinzelent/liberavem/DataKeeper.java
@@ -1,9 +1,6 @@
package org.marcinzelent.liberavem;
import android.app.Activity;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.view.View;
import android.widget.Toast;
import com.android.volley.Request;
@@ -103,7 +100,7 @@ public class DataKeeper {
private void callPopulator(Activity activity) {
if (birds != null && observations != null) {
- MyObservationsFragment mo = (MyObservationsFragment) ((MainActivity)activity).getAllFragments().get(0);
+ MyObservationsFragment mo = (MyObservationsFragment) ((MainActivity)activity).getObservationFragments().get(0);
List<Observation> myObservationsList = new ArrayList<>();
for (Observation o : observations)
if (o.getUserId().equals("Sminem")) myObservationsList.add(o);
@@ -111,7 +108,7 @@ public class DataKeeper {
Observation[] myObservations = new Observation[myObservationsList.size()];
myObservations = myObservationsList.toArray(myObservations);
mo.populateList(myObservations, birds);
- AllObservationsFragment aof = (AllObservationsFragment) ((MainActivity)activity).getAllFragments().get(1);
+ AllObservationsFragment aof = (AllObservationsFragment) ((MainActivity)activity).getObservationFragments().get(1);
aof.populateList(observations, birds);
}
}