diff --git a/app/build.gradle b/app/build.gradle index d450bb3..4ee0d10 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -60,25 +60,25 @@ android { dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' + compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') { + transitive = true; + } + compile('com.github.tony19:logback-android-classic:1.1.1-6') { + // workaround issue #73 + exclude group: 'com.google.android', module: 'android' + } + compile project(':panoramiobindings') + compile project(':urbanexplorerutils') + compile project(':wikibinding') + compile project(':googleutils') compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.android.support:support-v4:21.0.3' compile 'com.android.support:recyclerview-v7:21.0.3' compile 'com.googlecode.android-query:android-query:0.25.9' compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' - compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') { - transitive = true; - } compile 'org.apache.commons:commons-lang3:3.4' compile 'org.slf4j:slf4j-api:1.7.21' compile 'com.github.tony19:logback-android-core:1.1.1-6' - compile('com.github.tony19:logback-android-classic:1.1.1-6') { - // workaround issue #73 - exclude group: 'com.google.android', module: 'android' - } compile 'com.google.code.gson:gson:2.7' compile 'org.greenrobot:eventbus:3.0.0' - compile project(':panoramiobindings') - compile project(':urbanexplorerutils') - compile project(':wikibinding') - compile project(':googleutils') } diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/AppConstants.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/AppConstants.java index 976ef06..9d87f49 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/AppConstants.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/AppConstants.java @@ -4,7 +4,7 @@ package pl.tpolgrabia.urbanexplorer; * Created by tpolgrabia on 27.08.16. */ public class AppConstants { - public static final AppStage RELEASE = AppStage.FINAL; + public static final AppStage RELEASE = AppStage.DEVELOPMENT; public static final float MIN_DISTANCE = 100; public static final long GPS_LOCATION_UPDATE_FREQ = 15000; public static final float GPS_LOCATION_DISTANCE_FREQ = MIN_DISTANCE; diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/PlacesFragment.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/PlacesFragment.java new file mode 100644 index 0000000..d7c3ebb --- /dev/null +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/PlacesFragment.java @@ -0,0 +1,31 @@ +package pl.tpolgrabia.urbanexplorer; + + +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + + +/** + * A simple {@link Fragment} subclass. + */ +public class PlacesFragment extends Fragment { + + + public PlacesFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + final View inflatedView = inflater.inflate(R.layout.fragment_places, container, false); + + return inflatedView; + } + +} diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/HomeFragment.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/HomeFragment.java index d776939..1887577 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/HomeFragment.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/HomeFragment.java @@ -117,7 +117,7 @@ public class HomeFragment extends Fragment { initialized = true; lg.trace("Saved instance state {}", savedInstanceState); - if (photos != null) { + if (photos == null) { photos = PanoramioCacheUtils.loadPhotosFromCache(this, savedInstanceState); } diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/utils/PanoramioCacheUtils.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/utils/PanoramioCacheUtils.java index 96d0c14..2b16b83 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/utils/PanoramioCacheUtils.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/utils/PanoramioCacheUtils.java @@ -32,6 +32,10 @@ public class PanoramioCacheUtils { public static ArrayList loadPhotosFromCache(HomeFragment homeFragment, Bundle savedBundleSettings) { ArrayList photos; + if (savedBundleSettings == null) { + return new ArrayList<>(); + } + final Serializable serPhotos = savedBundleSettings.getSerializable(HomeFragment.PHOTO_LIST); lg.trace("Photo list serPhotos {}", serPhotos); photos = (ArrayList) serPhotos; diff --git a/app/src/main/res/layout/fragment_places.xml b/app/src/main/res/layout/fragment_places.xml new file mode 100644 index 0000000..fcee28f --- /dev/null +++ b/app/src/main/res/layout/fragment_places.xml @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6da56cb..596ea10 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2,7 +2,7 @@ Urban Explorer - Location: + Location: Hello blank fragment @@ -52,6 +52,6 @@ Title: Author: Upload date: - Location: - Panoramio url: + Location: + Panoramio url: