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
c1d9b600
Commit
c1d9b600
authored
Dec 26, 2018
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove remoteConfig
parent
d01fa264
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
build.gradle
+1
-1
src/main/java/tech/starwin/LibConfig.java
+8
-11
src/main/java/tech/starwin/utils/BitmapUtils.java
+7
-0
No files found.
build.gradle
View file @
c1d9b600
...
@@ -103,7 +103,7 @@ dependencies {
...
@@ -103,7 +103,7 @@ dependencies {
//firebase cloud message
//firebase cloud message
api
'com.google.firebase:firebase-messaging:17.3.2'
api
'com.google.firebase:firebase-messaging:17.3.2'
//firebase remoteConfig
//firebase remoteConfig
api
'com.google.firebase:firebase-config:16.0.0'
//
api 'com.google.firebase:firebase-config:16.0.0'
//facebook accountKit SDK
//facebook accountKit SDK
...
...
src/main/java/tech/starwin/LibConfig.java
View file @
c1d9b600
...
@@ -8,8 +8,6 @@ import android.view.View;
...
@@ -8,8 +8,6 @@ import android.view.View;
import
com.appsflyer.AppsFlyerLib
;
import
com.appsflyer.AppsFlyerLib
;
import
com.google.firebase.FirebaseApp
;
import
com.google.firebase.FirebaseApp
;
import
com.google.firebase.remoteconfig.FirebaseRemoteConfig
;
import
com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator
;
import
com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator
;
import
com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator
;
import
com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator
;
...
@@ -24,7 +22,6 @@ import org.litepal.LitePal;
...
@@ -24,7 +22,6 @@ import org.litepal.LitePal;
import
cn.fraudmetrix.octopus.aspirit.main.OctopusManager
;
import
cn.fraudmetrix.octopus.aspirit.main.OctopusManager
;
import
tech.starwin.network.Gateway
;
import
tech.starwin.network.Gateway
;
import
tech.starwin.utils.TrackEventHelper
;
import
tech.starwin.utils.PreferencesManager
;
import
tech.starwin.utils.PreferencesManager
;
import
tech.starwin.utils.ScreenAutoSize
;
import
tech.starwin.utils.ScreenAutoSize
;
import
tech.starwin.utils.collection.UploadManager
;
import
tech.starwin.utils.collection.UploadManager
;
...
@@ -135,14 +132,14 @@ public class LibConfig {
...
@@ -135,14 +132,14 @@ public class LibConfig {
/**
/**
* init FirebaseRemoteConfig
* init FirebaseRemoteConfig
*/
*/
private
static
void
initFirebaseRemoteConfig
()
{
//
private static void initFirebaseRemoteConfig() {
FirebaseRemoteConfig
.
getInstance
().
setConfigSettings
(
//
FirebaseRemoteConfig.getInstance().setConfigSettings(
new
FirebaseRemoteConfigSettings
.
Builder
()
//
new FirebaseRemoteConfigSettings.Builder()
.
setDeveloperModeEnabled
(
LibConfig
.
DEBUG
)
//
.setDeveloperModeEnabled(LibConfig.DEBUG)
.
build
()
//
.build()
);
//
);
TrackEventHelper
.
fetchRemoteConfig
();
//
TrackEventHelper.fetchRemoteConfig();
}
//
}
/**
/**
...
...
src/main/java/tech/starwin/utils/BitmapUtils.java
View file @
c1d9b600
...
@@ -67,6 +67,8 @@ public class BitmapUtils {
...
@@ -67,6 +67,8 @@ public class BitmapUtils {
*/
*/
public
static
Bitmap
loadBitmapCenterByPath
(
String
path
,
int
width
,
int
height
)
{
public
static
Bitmap
loadBitmapCenterByPath
(
String
path
,
int
width
,
int
height
)
{
Bitmap
bitmap
=
loadBitmapByPath
(
path
,
width
,
height
);
//先按比例缩小到最小倍数,然后加载图片到内存
Bitmap
bitmap
=
loadBitmapByPath
(
path
,
width
,
height
);
//先按比例缩小到最小倍数,然后加载图片到内存
if
(
bitmap
==
null
)
return
null
;
bitmap
=
scaleBitmap
(
bitmap
,
width
,
height
);
//再将加载好的图片缩放到指定大小
bitmap
=
scaleBitmap
(
bitmap
,
width
,
height
);
//再将加载好的图片缩放到指定大小
return
cropBitmapCenter
(
bitmap
,
width
,
height
);
return
cropBitmapCenter
(
bitmap
,
width
,
height
);
}
}
...
@@ -76,6 +78,7 @@ public class BitmapUtils {
...
@@ -76,6 +78,7 @@ public class BitmapUtils {
* 按指定尺寸加载SD卡 中的图片(指定宽高保持比例缩放)
* 按指定尺寸加载SD卡 中的图片(指定宽高保持比例缩放)
*/
*/
public
static
Bitmap
loadBitmapByPath
(
String
path
,
float
width
,
float
height
)
{
public
static
Bitmap
loadBitmapByPath
(
String
path
,
float
width
,
float
height
)
{
try
{
int
degree
=
readPictureDegree
(
path
);
int
degree
=
readPictureDegree
(
path
);
BitmapFactory
.
Options
options
=
new
BitmapFactory
.
Options
();
BitmapFactory
.
Options
options
=
new
BitmapFactory
.
Options
();
options
.
inJustDecodeBounds
=
true
;
//不加载bitmap到内存中
options
.
inJustDecodeBounds
=
true
;
//不加载bitmap到内存中
...
@@ -95,6 +98,10 @@ public class BitmapUtils {
...
@@ -95,6 +98,10 @@ public class BitmapUtils {
Bitmap
bitmap
=
BitmapFactory
.
decodeFile
(
path
,
options
);
Bitmap
bitmap
=
BitmapFactory
.
decodeFile
(
path
,
options
);
//把图片旋转为正的方向
//把图片旋转为正的方向
return
rotateBitmap
(
bitmap
,
degree
);
return
rotateBitmap
(
bitmap
,
degree
);
}
catch
(
NullPointerException
e
)
{
return
null
;
}
}
}
...
...
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