diff --git a/app/build.gradle b/app/build.gradle index 6096c051..67f7e17f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -50,6 +50,7 @@ dependencies { compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.github.bumptech.glide:glide:3.7.0' compile 'joda-time:joda-time:2.9.9' + compile 'org.joda:joda-convert:1.8' compile 'io.reactivex.rxjava2:rxandroid:2.0.1' compile 'io.reactivex.rxjava2:rxjava:2.0.1' diff --git a/app/src/main/java/de/nicidienase/chaosflix/ChaosflixApplication.java b/app/src/debug/java/de/nicidienase/chaosflix/ChaosflixApplication.java similarity index 88% rename from app/src/main/java/de/nicidienase/chaosflix/ChaosflixApplication.java rename to app/src/debug/java/de/nicidienase/chaosflix/ChaosflixApplication.java index ab89c3c2..463e2e83 100644 --- a/app/src/main/java/de/nicidienase/chaosflix/ChaosflixApplication.java +++ b/app/src/debug/java/de/nicidienase/chaosflix/ChaosflixApplication.java @@ -4,7 +4,6 @@ import android.app.Application; import android.content.Context; import android.support.multidex.MultiDex; -import com.facebook.stetho.Stetho; import com.orm.SugarContext; /** @@ -15,7 +14,6 @@ public class ChaosflixApplication extends Application { @Override public void onCreate() { super.onCreate(); - Stetho.initializeWithDefaults(this); SugarContext.init(this); } diff --git a/app/src/main/java/de/nicidienase/chaosflix/fragments/EventsDetailsFragment.java b/app/src/main/java/de/nicidienase/chaosflix/fragments/EventsDetailsFragment.java index 126a1188..bfab341e 100644 --- a/app/src/main/java/de/nicidienase/chaosflix/fragments/EventsDetailsFragment.java +++ b/app/src/main/java/de/nicidienase/chaosflix/fragments/EventsDetailsFragment.java @@ -149,9 +149,8 @@ public class EventsDetailsFragment extends DetailsFragment { adapter.add(new ListRow(header, randomEventAdapter)); } + setOnItemViewClickedListener(new ItemViewClickedListener(this)); setAdapter(adapter); - ItemViewClickedListener listener = new ItemViewClickedListener(EventsDetailsFragment.this); - setOnItemViewClickedListener(listener); browseErrorFragment.dismiss(); }); }); @@ -166,8 +165,8 @@ public class EventsDetailsFragment extends DetailsFragment { ArrayObjectAdapter actionsAdapter = getStreamActionsAdapter(mRoom.getStreams()); detailsOverviewRow.setActionsAdapter(actionsAdapter); adapter.add(detailsOverviewRow); - setAdapter(adapter); setOnItemViewClickedListener(new ItemViewClickedListener(EventsDetailsFragment.this)); + setAdapter(adapter); browseErrorFragment.dismiss(); // TODO add other streams }); diff --git a/app/src/release/java/de/nicidienase/chaosflix/ChaosflixApplication.java b/app/src/release/java/de/nicidienase/chaosflix/ChaosflixApplication.java new file mode 100644 index 00000000..463e2e83 --- /dev/null +++ b/app/src/release/java/de/nicidienase/chaosflix/ChaosflixApplication.java @@ -0,0 +1,31 @@ +package de.nicidienase.chaosflix; + +import android.app.Application; +import android.content.Context; +import android.support.multidex.MultiDex; + +import com.orm.SugarContext; + +/** + * Created by felix on 18.03.17. + */ + +public class ChaosflixApplication extends Application { + @Override + public void onCreate() { + super.onCreate(); + SugarContext.init(this); + } + + @Override + public void onTerminate() { + SugarContext.terminate(); + super.onTerminate(); + } + + @Override + protected void attachBaseContext(Context base) { + MultiDex.install(base); + super.attachBaseContext(base); + } +}