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
1a965b10
Commit
1a965b10
authored
Dec 02, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove mark
parent
a040e986
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
47 deletions
+47
-47
src/main/java/com/common/base/BaseActivity.java
+33
-33
src/main/java/com/common/base/BaseApplication.java
+14
-14
No files found.
src/main/java/com/common/base/BaseActivity.java
View file @
1a965b10
...
@@ -92,21 +92,21 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -92,21 +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
}
}
}
}
...
@@ -134,7 +134,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -134,7 +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
();
}
}
...
@@ -241,59 +241,59 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -241,59 +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
}
}
/**
/**
...
...
src/main/java/com/common/base/BaseApplication.java
View file @
1a965b10
...
@@ -58,28 +58,28 @@ public abstract class BaseApplication extends MultiDexApplication {
...
@@ -58,28 +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();
...
@@ -87,12 +87,12 @@ public abstract class BaseApplication extends MultiDexApplication {
...
@@ -87,12 +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
}
}
...
...
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