mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +00:00
move ChaosflixApplication so we have separate debug and release versions, so we can enable Stetho only in debug builds
This commit is contained in:
parent
55f657ff13
commit
50838e964c
4 changed files with 34 additions and 5 deletions
|
@ -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'
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue