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
26d5d87d
authored
May 11, 2021
by
luofan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理工单bug修改
parent
4ff4f6af
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
53 deletions
baseSDK/src/main/java/com/dayu/utils/MediaChooseUtils.java
orderCenter/src/main/java/com/dayu/order/api/protocol/OrderDetail.java
orderCenter/src/main/java/com/dayu/order/ui/activity/MultiProcessOrderActivity.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderServerAdapter.java
baseSDK/src/main/java/com/dayu/utils/MediaChooseUtils.java
View file @
26d5d87d
...
...
@@ -17,10 +17,11 @@ public class MediaChooseUtils {
* 选择单张图片
*/
public
static
void
chooseSigleImg
(
Activity
activity
)
{
chooseMedia
(
activity
,
PictureMimeType
.
ofImage
(),
1
,
0
);
chooseMedia
(
activity
,
PictureMimeType
.
ofImage
(),
1
,
0
);
}
public
static
void
chooseLiveImg
(
Activity
activity
)
{
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
PictureMimeType
.
ofImage
(),
1
,
0
);
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
PictureMimeType
.
ofImage
(),
1
,
0
,
0
);
selector
.
enableCrop
(
true
)
//是否裁剪
.
withAspectRatio
(
3
,
2
)
.
freeStyleCropEnabled
(
true
);
...
...
@@ -31,7 +32,7 @@ public class MediaChooseUtils {
* 选择头像图片并裁剪
*/
public
static
void
chooseAvatarImg
(
Activity
activity
)
{
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
PictureMimeType
.
ofImage
(),
1
,
0
);
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
PictureMimeType
.
ofImage
(),
1
,
0
,
0
);
selector
.
enableCrop
(
true
)
//是否裁剪
.
withAspectRatio
(
1
,
1
)
.
freeStyleCropEnabled
(
false
);
...
...
@@ -41,68 +42,70 @@ public class MediaChooseUtils {
/**
* 选择多张图片
*/
public
static
void
chooseImgs
(
Activity
activity
,
int
maxCount
)
{
chooseMedia
(
activity
,
PictureMimeType
.
ofImage
(),
maxCount
,
0
);
public
static
void
chooseImgs
(
Activity
activity
,
int
maxCount
)
{
chooseMedia
(
activity
,
PictureMimeType
.
ofImage
(),
maxCount
,
0
);
}
/**
* 选择单个视频
*/
public
static
void
chooseSigleVideo
(
Activity
activity
,
int
videoLength
)
{
public
static
void
chooseSigleVideo
(
Activity
activity
,
int
videoLength
)
{
// chooseMedia(activity,PictureMimeType.ofVideo(),1,videoLength);
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
PictureMimeType
.
ofVideo
(),
1
,
videoLength
);
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
PictureMimeType
.
ofVideo
(),
1
,
videoLength
,
videoLength
);
selector
.
isCamera
(
false
).
forResult
(
PictureConfig
.
CHOOSE_REQUEST
);
}
/**
* 选择单个视频
*/
public
static
void
chooseOneVideo
(
Activity
activity
,
int
videoLength
,
int
code
)
{
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
PictureMimeType
.
ofVideo
(),
1
,
video
Length
);
public
static
void
chooseOneVideo
(
Activity
activity
,
int
videoLength
,
int
minLength
,
int
code
)
{
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
PictureMimeType
.
ofVideo
(),
1
,
videoLength
,
min
Length
);
selector
.
isCamera
(
false
).
forResult
(
code
);
}
/**
* 选择多个视频
*/
public
static
void
chooseVideos
(
Activity
activity
,
int
maxCount
,
int
videoLength
)
{
chooseMedia
(
activity
,
PictureMimeType
.
ofVideo
(),
maxCount
,
videoLength
);
public
static
void
chooseVideos
(
Activity
activity
,
int
maxCount
,
int
videoLength
)
{
chooseMedia
(
activity
,
PictureMimeType
.
ofVideo
(),
maxCount
,
videoLength
);
}
/**
* 选择多媒体文件
*
* @param activity
* @param type
* @param maxCount
* @param videoLength
*/
public
static
void
chooseMedia
(
Activity
activity
,
int
type
,
int
maxCount
,
int
videoLength
)
{
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
type
,
maxCount
,
videoLength
);
public
static
void
chooseMedia
(
Activity
activity
,
int
type
,
int
maxCount
,
int
videoLength
)
{
PictureSelectionModel
selector
=
getPictureSelectionModel
(
activity
,
type
,
maxCount
,
videoLength
,
videoLength
);
selector
.
forResult
(
PictureConfig
.
CHOOSE_REQUEST
);
}
public
static
PictureSelectionModel
getPictureSelectionModel
(
Activity
activity
,
int
type
,
int
maxCount
,
int
videoLength
)
{
public
static
PictureSelectionModel
getPictureSelectionModel
(
Activity
activity
,
int
type
,
int
maxCount
,
int
videoLength
,
int
minLength
)
{
return
PictureSelector
.
create
(
activity
)
.
openGallery
(
type
)
//全部.PictureMimeType.ofAll()、图片.ofImage()、视频.ofVideo()
.
maxSelectNum
(
maxCount
)
// 最大图片选择数量 int
.
imageSpanCount
(
4
)
// 每行显示个数 int
.
selectionMode
(
PictureConfig
.
MULTIPLE
)
// 多选 or 单选 PictureConfig.MULTIPLE or PictureConfig.SINGLE
.
previewImage
(
true
)
// 是否可预览图片 true or false
.
isCamera
(
true
)
// 是否显示拍照按钮 true or false
.
recordVideoSecond
(
videoLength
)
//最大视频长度(秒)
.
videoMaxSecond
(
videoLength
)
//最大视频长度(秒)
.
isZoomAnim
(
true
)
// 图片列表点击 缩放效果 默认true
.
sizeMultiplier
(
0.1f
)
// glide 加载图片大小 0~1之间 如设置 .glideOverride()无效
.
setOutputCameraPath
(
"/CustomPath"
)
// 自定义拍、照保存路径,可不填
.
compress
(
true
)
// 是否压缩 true or false
.
glideOverride
(
300
,
500
)
// int glide 加载宽高,越小图片列表越流畅,但会影响列表图片浏览的清晰度
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
.
minimumCompressSize
(
Constants
.
MINIMUM_COMPRESSSIZE
)
// 小于100kb的图片不压缩
// .enableCrop(true)//是否裁剪
// .freeStyleCropEnabled(true)
.
synOrAsy
(
true
);
.
openGallery
(
type
)
//全部.PictureMimeType.ofAll()、图片.ofImage()、视频.ofVideo()
.
maxSelectNum
(
maxCount
)
// 最大图片选择数量 int
.
imageSpanCount
(
4
)
// 每行显示个数 int
.
selectionMode
(
PictureConfig
.
MULTIPLE
)
// 多选 or 单选 PictureConfig.MULTIPLE or PictureConfig.SINGLE
.
previewImage
(
true
)
// 是否可预览图片 true or false
.
isCamera
(
true
)
// 是否显示拍照按钮 true or false
.
recordVideoSecond
(
videoLength
)
//最大视频长度(秒)
.
videoMaxSecond
(
videoLength
)
//最大视频长度(秒)
.
videoMinSecond
(
minLength
)
.
isZoomAnim
(
true
)
// 图片列表点击 缩放效果 默认true
.
sizeMultiplier
(
0.1f
)
// glide 加载图片大小 0~1之间 如设置 .glideOverride()无效
.
setOutputCameraPath
(
"/CustomPath"
)
// 自定义拍、照保存路径,可不填
.
compress
(
true
)
// 是否压缩 true or false
.
glideOverride
(
300
,
500
)
// int glide 加载宽高,越小图片列表越流畅,但会影响列表图片浏览的清晰度
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
.
minimumCompressSize
(
Constants
.
MINIMUM_COMPRESSSIZE
)
// 小于100kb的图片不压缩
// .enableCrop(true)//是否裁剪
// .freeStyleCropEnabled(true)
.
synOrAsy
(
true
);
}
public
static
String
getPath
()
{
...
...
orderCenter/src/main/java/com/dayu/order/api/protocol/OrderDetail.java
View file @
26d5d87d
...
...
@@ -84,6 +84,15 @@ public class OrderDetail implements Serializable {
private
int
version
;
private
int
alerted
;
private
int
isCheck
;
private
String
shortVideoUrl
;
public
String
getShortVideoUrl
()
{
return
shortVideoUrl
;
}
public
void
setShortVideoUrl
(
String
shortVideoUrl
)
{
this
.
shortVideoUrl
=
shortVideoUrl
;
}
public
int
getIsCheck
()
{
return
isCheck
;
...
...
@@ -758,15 +767,6 @@ public class OrderDetail implements Serializable {
private
double
latitude
;
private
double
longitude
;
private
String
address
;
private
String
shortVideoUrl
;
public
String
getShortVideoUrl
()
{
return
shortVideoUrl
;
}
public
void
setShortVideoUrl
(
String
shortVideoUrl
)
{
this
.
shortVideoUrl
=
shortVideoUrl
;
}
public
String
getAddress
()
{
return
address
;
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/MultiProcessOrderActivity.java
View file @
26d5d87d
...
...
@@ -73,6 +73,7 @@ public class MultiProcessOrderActivity extends BaseActivity<MultiProcessOrderPre
@Override
public
void
initView
()
{
showSnView
(
false
);
setListener
();
}
private
void
setSnAdapter
()
{
...
...
@@ -110,12 +111,6 @@ public class MultiProcessOrderActivity extends BaseActivity<MultiProcessOrderPre
}
};
mBind
.
rvSn
.
setAdapter
(
snAdapter
);
mBind
.
rlVideo
.
setOnClickListener
(
v
->
chooseVideo
());
mBind
.
ivDelete
.
setOnClickListener
(
v
->
{
videoPath
=
""
;
setVideoView
();
});
mBind
.
jzVideo
.
setOnClickListener
(
v
->
showToast
(
"click"
));
}
protected
void
chooseVideo
()
{
...
...
@@ -124,6 +119,15 @@ public class MultiProcessOrderActivity extends BaseActivity<MultiProcessOrderPre
}
}
private
void
setListener
()
{
mBind
.
rlVideo
.
setOnClickListener
(
v
->
chooseVideo
());
mBind
.
ivDelete
.
setOnClickListener
(
v
->
{
videoPath
=
""
;
setVideoView
();
});
mBind
.
jzVideo
.
setOnClickListener
(
v
->
showToast
(
"click"
));
}
//选中视频弹框
private
void
showVideoDailog
()
{
List
<
String
>
list
=
new
ArrayList
<>();
...
...
@@ -133,7 +137,7 @@ public class MultiProcessOrderActivity extends BaseActivity<MultiProcessOrderPre
if
(
pos
==
0
)
{
recordVideo
();
}
else
{
MediaChooseUtils
.
chooseOneVideo
(
this
,
10
,
PictureConfig
.
TYPE_VIDEO
);
MediaChooseUtils
.
chooseOneVideo
(
this
,
10
,
5
,
PictureConfig
.
TYPE_VIDEO
);
}
});
}
...
...
@@ -151,8 +155,8 @@ public class MultiProcessOrderActivity extends BaseActivity<MultiProcessOrderPre
.
subscribe
(
aLong
->
{
Intent
intent
=
new
Intent
(
MultiProcessOrderActivity
.
this
,
CameraActivity
.
class
);
intent
.
putExtra
(
Constants
.
ONLY_VIDEO
,
true
);
intent
.
putExtra
(
Constants
.
MIN_TIME
,
5
*
1000
);
intent
.
putExtra
(
Constants
.
MAX_TIME
,
10
*
1000
);
intent
.
putExtra
(
Constants
.
MIN_TIME
,
5
*
1000
);
intent
.
putExtra
(
Constants
.
MAX_TIME
,
10
*
1000
);
startActivityForResult
(
intent
,
Constants
.
CAMERA_CODE
);
});
}
...
...
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderServerAdapter.java
View file @
26d5d87d
...
...
@@ -125,7 +125,7 @@ public class OrderServerAdapter extends CoreAdapter<OrderDetail.RecordBean, Serv
if
(
UIUtils
.
getString
(
R
.
string
.
user_chcek
).
equals
(
item
.
getOperation
()))
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
{
ArrayList
<
String
>
list
=
new
ArrayList
<>();
list
.
add
(
item
.
getShortVideoUrl
());
list
.
add
(
mDetail
.
getShortVideoUrl
());
Intent
intent
=
new
Intent
(
mContext
,
VideoPreviewActivty
.
class
);
intent
.
putStringArrayListExtra
(
Constants
.
BUNDLE_KEY_ID
,
list
);
mContext
.
startActivity
(
intent
);
...
...
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