You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.5 KiB
70 lines
1.5 KiB
package com.project.survey;
|
|
|
|
import static com.bingce.AppChannel.customChannel;
|
|
|
|
import android.app.Application;
|
|
import android.util.Log;
|
|
|
|
import com.bingce.AppChannel;
|
|
import com.bingce.BaseApp;
|
|
|
|
import org.polaric.colorful.Colorful;
|
|
|
|
import blankj.utilcode.util.Utils;
|
|
import io.reactivex.functions.Consumer;
|
|
import io.reactivex.plugins.RxJavaPlugins;
|
|
|
|
public class App extends Application {
|
|
|
|
private static App app;
|
|
|
|
public boolean isThemeDark;
|
|
|
|
public boolean isLandscape() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public void onCreate() {
|
|
customChannel = AppChannel.CUSTOM_CONTROL_PRO;//AppChannel.CUSTOM_PUBLIC;
|
|
super.onCreate();
|
|
app = this;
|
|
|
|
|
|
RxJavaPlugins.setErrorHandler(new Consumer<Throwable>() {
|
|
@Override
|
|
public void accept(Throwable throwable) {
|
|
Log.e("rxThrowable", String.valueOf(throwable));
|
|
}
|
|
});
|
|
|
|
initThemeDark();
|
|
Utils.init(this);
|
|
|
|
}
|
|
|
|
|
|
public boolean isThemeDark() {
|
|
return false;
|
|
}
|
|
|
|
|
|
private void initThemeDark() {
|
|
Colorful.defaults()
|
|
.primaryColor(Colorful.ThemeColor.BLUE)
|
|
.accentColor(Colorful.ThemeColor.BLUE)
|
|
.translucent(false)
|
|
.dark(false);
|
|
Colorful.init(this);
|
|
|
|
// Colorful.config(this).primaryColor(Colorful.ThemeColor.BROWN).apply();
|
|
// Colorful.config(this).accentColor(Colorful.ThemeColor.BROWN).apply();
|
|
}
|
|
|
|
|
|
public static App getApp() {
|
|
return app;
|
|
}
|
|
|
|
|
|
}
|
|
|