Commit a040e986 by sikang

add garble mark

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