Commit a040e986 by sikang

add garble mark

parent 12df1d95
......@@ -92,14 +92,21 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// ScreenAutoSize.getInstance().resizeDensity(this, 360f);
// TODO GARBLE_MARK
TAG = getClass().getSimpleName();
// TODO GARBLE_MARK
lifecycleSubject.onNext(ActivityEvent.CREATE);
// TODO GARBLE_MARK
progressDialog = new ProgressDialog(this);
// TODO GARBLE_MARK
presenterHelper = new PresenterHoler(this);
// TODO GARBLE_MARK
initRootLayout();
// TODO GARBLE_MARK
if (getTrustee() != null) {
// TODO GARBLE_MARK
getTrustee().onCreate();
// TODO GARBLE_MARK
}
}
......@@ -127,6 +134,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
@Override
protected void onRestart() {
super.onRestart();
// TODO GARBLE_MARK
if (getTrustee() != null) {
getTrustee().onRestart();
}
......@@ -233,35 +241,59 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
//----------------------------------- Layout ----------------------------------------
private void initRootLayout() {
// TODO GARBLE_MARK
setContentView(R.layout.base_activity_root);
// TODO GARBLE_MARK
rootLayout = findViewById(R.id.root_layout);
// TODO GARBLE_MARK
//是否使用沉浸式状态栏
if (useTransparentStatusBar()) {
// TODO GARBLE_MARK
QMUIStatusBarHelper.translucent(this);
// TODO GARBLE_MARK
}
// TODO GARBLE_MARK
//判断是否要显示TopBar
if (useTopBar()) {
// TODO GARBLE_MARK
mTopBar = QMUIHelper.insertTopBar(rootLayout, useTransparentStatusBar());
// TODO GARBLE_MARK
if (mTopBar != null)
initTopBar(mTopBar);
// TODO GARBLE_MARK
}
// TODO GARBLE_MARK
//填充Activity -> bindLayout();
if (bindLayout() != 0) {
// TODO GARBLE_MARK
//是否使用了侧滑
if (bindDrawerLayout() != 0) {
// TODO GARBLE_MARK
drawerLayout = LayoutInflater.from(this).inflate(R.layout.base_activity_drawer, rootLayout, true).findViewById(R.id.root_drawer_layout);
// TODO GARBLE_MARK
FrameLayout content = drawerLayout.findViewById(R.id.root_content);
// TODO GARBLE_MARK
FrameLayout drawer = drawerLayout.findViewById(R.id.root_drawer);
// TODO GARBLE_MARK
drawer.setClickable(true);
// TODO GARBLE_MARK
LayoutInflater.from(this).inflate(bindLayout(), content, true);
// TODO GARBLE_MARK
LayoutInflater.from(this).inflate(bindDrawerLayout(), drawer, true);
// TODO GARBLE_MARK
} else {
// TODO GARBLE_MARK
LayoutInflater.from(this).inflate(bindLayout(), rootLayout, true);
// TODO GARBLE_MARK
}
}
// TODO GARBLE_MARK
unBinder = LibConfig.bindView(this, rootLayout);
// TODO GARBLE_MARK
initView();
// TODO GARBLE_MARK
getFragmentLauncher();
// TODO GARBLE_MARK
}
/**
......
......@@ -58,19 +58,28 @@ public abstract class BaseApplication extends MultiDexApplication {
// if (!TextUtils.isEmpty(LibConfig.BUGLY_APPID)) {
// CrashReport.initCrashReport(getApplicationContext(), LibConfig.BUGLY_APPID, false);
// }
// TODO GARBLE_MARK
try {
// TODO GARBLE_MARK
String appId = StringDecrypt.uncodeString(BuildConfig.FACEBOOK_APP_ID);
// TODO GARBLE_MARK
String clienToken = StringDecrypt.uncodeString(BuildConfig.ACCOUNT_KIT_CLIENT_TOKEN);
// TODO GARBLE_MARK
FacebookSdk.setApplicationId(appId);
// TODO GARBLE_MARK
FacebookSdk.setApplicationName(LibConfig.APP_NAME);
// TODO GARBLE_MARK
FacebookSdk.setClientToken(clienToken);
// TODO GARBLE_MARK
FacebookSdk.sdkInitialize(this);
// TODO GARBLE_MARK
AccountKitUtils.initAccountKit(appId, LibConfig.APP_NAME, clienToken);
// TODO GARBLE_MARK
} catch (Exception e) {
// TODO GARBLE_MARK
Log.e("AccountKitUtils", "Failed to auto initialize the Facebook SDK", e);
}
// TODO GARBLE_MARK
AppLanguageUtils.setLanguage(this, LibConfig.LANGUAGE);
// PhilologyRepositoryFactory repositoryFactory = locale -> new DefaultPhilologyRepository();
......@@ -78,9 +87,12 @@ public abstract class BaseApplication extends MultiDexApplication {
// Philology.INSTANCE.init(repositoryFactory);
// ViewPump.init(ViewPump.builder().addInterceptor(PhilologyInterceptor.INSTANCE).build());
// TODO GARBLE_MARK
InstallReferrerHelper.refershInstallReferrer(this);
// TODO GARBLE_MARK
LibConfig.initLib(this);
// TODO GARBLE_MARK
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment