Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
a040e986
Commit
a040e986
authored
Dec 02, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add garble mark
parent
12df1d95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
3 deletions
+47
-3
src/main/java/com/common/base/BaseActivity.java
+33
-1
src/main/java/com/common/base/BaseApplication.java
+14
-2
No files found.
src/main/java/com/common/base/BaseActivity.java
View file @
a040e986
...
...
@@ -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
}
/**
...
...
src/main/java/com/common/base/BaseApplication.java
View file @
a040e986
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment