Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0c50c0f8
authored
May 28, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增多任务
parent
6faa6c8a
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
44 deletions
app/release/app-release.apk
app/release/output.json
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
baseSDK/src/main/java/com/dayu/base/ui/adapter/CoreAdapter.java
baseSDK/src/main/java/com/dayu/base/ui/presenter/BasePresenter.java
baseSDK/src/main/java/com/dayu/common/Constants.java
baseSDK/src/main/java/com/dayu/utils/GlideImageLoader.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity/IdentityCertificationActivity.java
app/release/app-release.apk
View file @
0c50c0f8
No preview for this file type
app/release/output.json
View file @
0c50c0f8
[{
"outputType"
:{
"type"
:
"APK"
},
"apkInfo"
:{
"type"
:
"MAIN"
,
"splits"
:[],
"versionCode"
:
10
},
"path"
:
"app-release.apk"
,
"properties"
:{
"packageId"
:
"com.dayu.bigfis"
,
"split"
:
""
,
"minSdkVersion"
:
"16"
}}]
\ No newline at end of file
[{
"outputType"
:{
"type"
:
"APK"
},
"apkInfo"
:{
"type"
:
"MAIN"
,
"splits"
:[],
"versionCode"
:
10
},
"path"
:
"app-release.apk"
,
"properties"
:{
"packageId"
:
"com.dayu.bigfish"
,
"split"
:
""
,
"minSdkVersion"
:
"16"
}}]
\ No newline at end of file
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
View file @
0c50c0f8
...
...
@@ -169,7 +169,12 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
(
dialog1
,
confirm
)
->
{
if
(
confirm
)
{
File
sdDir
=
Environment
.
getExternalStorageDirectory
();
File
file
=
new
File
(
sdDir
+
"/dayu/"
,
"dayu"
+
".apk"
);
File
file
;
file
=
new
File
(
sdDir
+
"/dayu/"
);
if
(!
file
.
exists
())
{
file
.
mkdirs
();
}
file
=
new
File
(
file
,
"dayu"
+
".apk"
);
if
(
Environment
.
getExternalStorageState
().
equals
(
Environment
.
MEDIA_MOUNTED
))
{
showToast
(
R
.
string
.
on_download
);
initNotification
();
...
...
baseSDK/src/main/java/com/dayu/base/ui/adapter/CoreAdapter.java
View file @
0c50c0f8
...
...
@@ -47,21 +47,10 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
@Override
public
BaseViewHolder
onCreateViewHolder
(
ViewGroup
parent
,
int
viewType
)
{
this
.
mContext
=
parent
.
getContext
();
for
(
Item
item
:
mFootTypeDatas
)
{
if
(
item
.
type
==
viewType
)
{
View
view
=
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
viewType
,
parent
,
false
);
mFootViews
.
add
(
view
);
}
}
for
(
Item
item
:
mHeadTypeDatas
)
{
if
(
item
.
type
==
viewType
)
{
View
view
=
DataBindingUtil
.
inflate
(
LayoutInflater
.
from
(
parent
.
getContext
()),
viewType
,
parent
,
false
).
getRoot
();
mHeadViews
.
add
(
view
);
}
}
return
new
BaseViewHolder
(
DataBindingUtil
.
inflate
(
LayoutInflater
.
from
(
parent
.
getContext
()),
viewType
,
parent
,
false
));
}
public
CoreAdapter
(
boolean
needFoot
)
{
isNeedFoot
=
needFoot
;
if
(
needFoot
)
{
...
...
baseSDK/src/main/java/com/dayu/base/ui/presenter/BasePresenter.java
View file @
0c50c0f8
...
...
@@ -59,6 +59,7 @@ public abstract class BasePresenter<V> {
@Override
public
void
onError
(
Throwable
e
)
{
Log
.
d
(
"Photoerror******"
,
e
.
toString
());
ProgressUtil
.
stopLoad
();
processException
(
e
);
}
...
...
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
0c50c0f8
...
...
@@ -12,16 +12,16 @@ public class Constants {
/**
* 测试环境配置.
*/
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
final
String
ENVIROMENT
=
"debug"
;
public
static
final
String
BASE_URL
=
"http://47.94.101.239:3112"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"http://47.94.101.239:9004/#/sop"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manySop"
;
public
final
static
String
WEB_SOP_DETAIL
=
"http://47.94.101.239:9004/#/sopdetail"
;
public
final
static
String
WEB_ZHI_SHI
=
"http://47.94.101.239:9004/#/detail"
;
public
static
final
boolean
IS_DEBUG
=
true
;
//
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static final String ENVIROMENT = "debug";
//
public static final String BASE_URL = "http://47.94.101.239:3112";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
//
public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
//
public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
//
public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
//
public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
//
public static final boolean IS_DEBUG = true;
/**
* uat环境配置.
...
...
@@ -38,16 +38,16 @@ public class Constants {
/**
* 正式环境.
*/
//
public static final String ENVIROMENT = "release";
// public static final int LOG_LEVEL = LogUtils.LEVEL_OFF
;
//
public static final String BASE_URL = "https://mobile.kf.ai";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
//
public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
//
public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
//
public final static String CHECK_MULTI_WEB_SOP = "http://192.168.2.181:8080/#/manyServiceResult";
//
public final static String MULTI_WEB_SOP = "http://192.168.2.181:8080/#/manySop";
//
public static final boolean IS_DEBUG = false;
public
static
final
String
ENVIROMENT
=
"release"
;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
final
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
public
final
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
public
final
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"http://192.168.2.181:8080/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"http://192.168.2.181:8080/#/manySop"
;
public
static
final
boolean
IS_DEBUG
=
false
;
/**
* 演示环境
...
...
baseSDK/src/main/java/com/dayu/utils/GlideImageLoader.java
View file @
0c50c0f8
package
com
.
dayu
.
utils
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.os.Environment
;
...
...
@@ -13,7 +14,6 @@ import com.dayu.baselibrary.R;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
...
...
@@ -50,7 +50,7 @@ public class GlideImageLoader {
*
* @param bitmap
*/
public
static
File
compressImage
(
Bitmap
bitmap
,
String
name
)
{
public
static
File
compressImage
(
Bitmap
bitmap
,
String
name
,
Activity
activity
)
{
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
();
bitmap
.
compress
(
Bitmap
.
CompressFormat
.
JPEG
,
100
,
baos
);
//质量压缩方法,这里100表示不压缩,把压缩后的数据存放到baos中
int
options
=
100
;
...
...
@@ -62,18 +62,38 @@ public class GlideImageLoader {
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
Date
date
=
new
Date
(
System
.
currentTimeMillis
());
String
filename
=
format
.
format
(
date
);
File
file
=
new
File
(
Environment
.
getExternalStorageDirectory
()
+
"/dayu/"
,
filename
+
name
+
".jpg"
);
try
{
FileOutputStream
fos
=
new
FileOutputStream
(
file
);
boolean
sdCardExist
=
Environment
.
getExternalStorageState
()
.
equals
(
android
.
os
.
Environment
.
MEDIA_MOUNTED
);
//判断sd卡是否存在
File
file
;
if
(
sdCardExist
)
{
file
=
new
File
(
Environment
.
getExternalStorageDirectory
()
+
"/dayu/"
);
if
(!
file
.
exists
())
{
file
.
mkdirs
();
}
file
=
new
File
(
file
,
filename
+
name
+
".jpg"
);
}
else
{
file
=
new
File
(
activity
.
getCacheDir
()
+
"/dayu/"
);
if
(!
file
.
exists
())
{
file
.
mkdirs
();
}
file
=
new
File
(
file
,
filename
+
name
+
".jpg"
);
}
FileOutputStream
fos
=
null
;
try
{
fos
=
new
FileOutputStream
(
file
);
fos
.
write
(
baos
.
toByteArray
());
fos
.
flush
();
fos
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
null
!=
fos
)
{
try
{
fos
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
}
return
file
;
}
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity/IdentityCertificationActivity.java
View file @
0c50c0f8
...
...
@@ -201,8 +201,8 @@ public class IdentityCertificationActivity extends BaseActivity<CertificaitonPre
@Override
public
List
<
File
>
getFile
()
{
ArrayList
<
File
>
list
=
new
ArrayList
<>();
list
.
add
(
compressImage
(
mFrontBitmap
,
"front"
));
list
.
add
(
compressImage
(
mSideBitmap
,
"back"
));
list
.
add
(
compressImage
(
mFrontBitmap
,
"front"
,
mActivity
));
list
.
add
(
compressImage
(
mSideBitmap
,
"back"
,
mActivity
));
return
list
;
}
}
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