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
5e5692d7
authored
Sep 16, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整sop视频时间限制
parent
c64c666c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
baseSDK/src/main/java/com/dayu/base/ui/adapter/MediaChooseAdapter.java
baseSDK/src/main/res/layout/activity_camera_sop.xml
orderCenter/src/main/java/com/dayu/order/ui/activity/SopLocalActivity.java
baseSDK/src/main/java/com/dayu/base/ui/adapter/MediaChooseAdapter.java
View file @
5e5692d7
...
...
@@ -38,6 +38,7 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
private
OnItemClickListener
<
MediaChooseAdapter
.
Holder
,
Integer
>
listener
;
private
boolean
addEmpty
;
private
boolean
canEdit
=
true
;
private
boolean
showCamera
=
true
;
AdapterListener
adapterListener
;
...
...
@@ -93,6 +94,10 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
}
}
public
void
setShowCamera
(
boolean
showCamera
)
{
this
.
showCamera
=
showCamera
;
}
public
void
setVideoLength
(
int
videoLength
)
{
this
.
videoLength
=
videoLength
;
}
...
...
@@ -195,7 +200,7 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
.
imageSpanCount
(
4
)
// 每行显示个数 int
.
selectionMode
(
PictureConfig
.
MULTIPLE
)
// 多选 or 单选 PictureConfig.MULTIPLE or PictureConfig.SINGLE
.
previewImage
(
true
)
// 是否可预览图片 true or false
.
isCamera
(
true
)
// 是否显示拍照按钮 true or false
.
isCamera
(
showCamera
)
// 是否显示拍照按钮 true or false
.
recordVideoSecond
(
videoLength
)
.
videoMaxSecond
(
videoLength
)
.
isZoomAnim
(
true
)
// 图片列表点击 缩放效果 默认true
...
...
baseSDK/src/main/res/layout/activity_camera_sop.xml
View file @
5e5692d7
...
...
@@ -9,7 +9,7 @@
android:id=
"@+id/jcameraview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:duration_max=
"
3
1000"
app:duration_max=
"
6
1000"
app:iconLeft=
"@drawable/ic_back"
app:iconMargin=
"20dp"
app:iconRight=
"@null"
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/SopLocalActivity.java
View file @
5e5692d7
...
...
@@ -90,6 +90,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
@Override
public
void
initView
()
{
requestPermission
();
mBundle
=
getIntent
().
getBundleExtra
(
Constants
.
BUNDLE
);
canEdit
=
mBundle
.
getBoolean
(
Constants
.
SOP_CAN_EDIT
,
true
);
int
id
=
mBundle
.
getInt
(
Constants
.
ORDER_ID
);
...
...
@@ -124,8 +125,6 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
private
void
setAdapterListener
()
{
mAdapter
.
setAdapterListener
(()
->
{
mImages
.
clear
();
mVideos
.
clear
();
showChooseDailog
();
});
}
...
...
@@ -390,8 +389,9 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
mAdapter
=
new
MediaChooseAdapter
(
this
,
mVideos
,
1
,
PictureMimeType
.
ofVideo
(),
true
);
mAdapter
.
setCanEdit
(
canEdit
);
mAdapter
.
setShowCamera
(
false
);
mAdapter
.
setRequestCode
(
1002
);
mAdapter
.
setVideoLength
(
3
1
);
mAdapter
.
setVideoLength
(
6
1
);
mBind
.
photo
.
setAdapter
(
mAdapter
);
setAdapterListener
();
}
...
...
@@ -403,9 +403,11 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
list
.
add
(
"视频"
);
TextDialog
.
getInstance
().
showBottomDialog
(
mActivity
,
list
,
pos
->
{
if
(
pos
==
0
)
{
mImages
.
clear
();
setImgAdapter
();
mAdapter
.
showPicDialog
();
}
else
{
mVideos
.
clear
();
setVideoAdapter
();
showVideoDailog
();
}
...
...
@@ -451,6 +453,21 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
});
}
private
void
requestPermission
()
{
String
[]
mPerArr
=
new
String
[]{
Manifest
.
permission
.
RECORD_AUDIO
};
MPermissionUtils
.
requestPermissionsResult
(
mActivity
,
1
,
mPerArr
,
new
MPermissionUtils
.
OnPermissionListener
()
{
@SuppressLint
(
"CheckResult"
)
@Override
public
void
onPermissionGranted
()
{
}
@Override
public
void
onPermissionDenied
()
{
}
});
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
...
...
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