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
9dcd6e29
authored
Sep 07, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单sop改造
parent
375ba106
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
154 additions
and
77 deletions
baseSDK/src/main/java/com/dayu/base/ui/adapter/MediaChooseAdapter.java
baseSDK/src/main/java/com/dayu/common/Constants.java
baseSDK/src/main/res/layout/item_picture_select_multi.xml
orderCenter/src/main/java/com/dayu/order/api/protocol/OrderDetail.java
orderCenter/src/main/java/com/dayu/order/presenter/orderserver/OrderServerPresenter.java
orderCenter/src/main/java/com/dayu/order/ui/activity/SopLocalActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/SopWebViewActivity.java
orderCenter/src/main/res/layout/activity_sop_local.xml
baseSDK/src/main/java/com/dayu/base/ui/adapter/MediaChooseAdapter.java
View file @
9dcd6e29
...
...
@@ -37,6 +37,7 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
private
int
requestCode
=
PictureConfig
.
CHOOSE_REQUEST
;
private
OnItemClickListener
<
MediaChooseAdapter
.
Holder
,
Integer
>
listener
;
private
boolean
addEmpty
;
private
boolean
canEdit
=
true
;
AdapterListener
adapterListener
;
...
...
@@ -85,16 +86,24 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
this
.
requestCode
=
requestCode
;
}
public
void
setCanEdit
(
boolean
canEdit
)
{
this
.
canEdit
=
canEdit
;
if
(
list
.
size
()
>
0
&&
list
.
contains
(
"add"
)
&&
!
canEdit
)
{
list
.
remove
(
"add"
);
}
}
public
void
setVideoLength
(
int
videoLength
)
{
this
.
videoLength
=
videoLength
;
}
public
void
setData
(
ArrayList
<
String
>
list
)
{
this
.
list
=
list
;
if
(
list
.
size
()
<
maxCount
&&
!
list
.
contains
(
"add"
))
if
(
list
.
size
()
<
maxCount
&&
!
list
.
contains
(
"add"
)
&&
canEdit
)
list
.
add
(
"add"
);
notifyDataSetChanged
();
}
public
void
setDataNoChange
(
ArrayList
<
String
>
list
)
{
this
.
list
=
list
;
}
...
...
@@ -109,7 +118,7 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
@NonNull
@Override
public
Holder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
View
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
item_picture_select
,
parent
,
false
);
View
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
item_picture_select
_multi
,
parent
,
false
);
view
.
setLayoutParams
(
new
RelativeLayout
.
LayoutParams
(
mIvSize
,
mIvSize
));
view
.
setPadding
(
0
,
0
,
10
,
10
);
return
new
Holder
(
view
);
...
...
@@ -124,23 +133,23 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
holder
.
picture
.
setImageResource
(
R
.
drawable
.
icon_submit_photo
);
}
holder
.
delete
.
setVisibility
(
View
.
GONE
);
holder
.
picture
.
setOnClickListener
(
v
->{
if
(
list
.
size
()
==
1
&&
adapterListener
!=
null
){
holder
.
picture
.
setOnClickListener
(
v
->
{
if
(
list
.
size
()
==
1
&&
adapterListener
!=
null
)
{
adapterListener
.
onFirstAddClick
();
}
else
{
}
else
{
showPicDialog
();
}
});
}
else
{
GlideImageLoader
.
load
(
context
,
list
.
get
(
position
),
holder
.
picture
);
holder
.
delete
.
setVisibility
(
View
.
VISIBL
E
);
holder
.
delete
.
setVisibility
(
canEdit
?
View
.
VISIBLE
:
View
.
GON
E
);
holder
.
delete
.
setOnClickListener
(
v
->
removeItem
(
position
));
holder
.
picture
.
setOnClickListener
(
v
->
{
ArrayList
temp
=
new
ArrayList
();
temp
.
addAll
(
list
);
temp
.
remove
(
"add"
);
dumpPic
(
temp
,
position
);
dumpPic
(
temp
,
position
);
});
}
}
...
...
@@ -153,7 +162,8 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
private
void
removeItem
(
int
position
)
{
if
(
list
.
size
()
==
maxCount
&&
!
list
.
contains
(
"add"
))
{
list
.
remove
(
position
);
list
.
add
(
"add"
);
if
(
canEdit
)
list
.
add
(
"add"
);
}
else
{
list
.
remove
(
position
);
}
...
...
@@ -213,16 +223,16 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
}
private
void
dumpPic
(
ArrayList
<
String
>
list
,
int
position
)
{
if
(
mimeType
==
PictureMimeType
.
ofVideo
()){
if
(
mimeType
==
PictureMimeType
.
ofVideo
())
{
Intent
intent
=
new
Intent
(
context
,
VideoPreviewActivty
.
class
);
intent
.
putStringArrayListExtra
(
Constants
.
BUNDLE_KEY_ID
,
list
);
context
.
startActivity
(
intent
);
}
else
{
ImgGalleryActivty
.
launch
(
context
,
list
.
get
(
position
));
}
else
{
ImgGalleryActivty
.
launch
(
context
,
list
.
get
(
position
));
}
}
public
interface
AdapterListener
{
public
interface
AdapterListener
{
void
onFirstAddClick
();
}
}
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
9dcd6e29
...
...
@@ -203,6 +203,8 @@ public class Constants {
public
final
static
String
ORDER_POSTION
=
"order_position"
;
public
final
static
String
SOP_RID
=
"sop_rid"
;
public
final
static
String
IS_SOP_VIDEO
=
"is_sop_video"
;
public
final
static
String
SOP_CAN_EDIT
=
"sop_can_edit"
;
public
final
static
String
SOP_OLD
=
"sop_old"
;
//是否显示去设置alipay账户de对话框
public
final
static
String
IS_SHOW_ALIPAY_DILAOG
=
"is_show_alipay_dialog"
;
//上个版本号
...
...
baseSDK/src/main/res/layout/item_picture_select_multi.xml
0 → 100644
View file @
9dcd6e29
<?xml version="1.0" encoding="utf-8"?>
<layout>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"75dp"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_picture"
android:scaleType=
"centerCrop"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<ImageView
android:id=
"@+id/iv_picture_delete"
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignParentRight=
"true"
android:layout_alignParentTop=
"true"
android:src=
"@drawable/img_photo_delete"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/java/com/dayu/order/api/protocol/OrderDetail.java
View file @
9dcd6e29
...
...
@@ -81,6 +81,15 @@ public class OrderDetail implements Serializable {
private
double
price
;
private
double
subsidyPrice
;
private
int
createProviderId
;
private
int
version
;
public
int
getVersion
()
{
return
version
;
}
public
void
setVersion
(
int
version
)
{
this
.
version
=
version
;
}
public
int
getCreateProviderId
()
{
return
createProviderId
;
...
...
orderCenter/src/main/java/com/dayu/order/presenter/orderserver/OrderServerPresenter.java
View file @
9dcd6e29
...
...
@@ -64,7 +64,14 @@ public class OrderServerPresenter extends OrderServerContract.Presenter {
}
bundle
.
putInt
(
OrderConstant
.
CREATEDSOURCE
,
mDetails
.
getCreatedSource
());
bundle
.
putInt
(
ORDER_STATE
,
ORDER_SOP_FINISH
);
bundle
.
putInt
(
Constants
.
SOP_RID
,
0
);
if
(
mDetails
.
getVersion
()>
1
&&
mDetails
.
getSpus
()!=
null
&&
mDetails
.
getSpus
().
size
()>
0
){
bundle
.
putInt
(
Constants
.
SOP_RID
,
mDetails
.
getSpus
().
get
(
0
).
getId
());
bundle
.
putBoolean
(
Constants
.
SOP_OLD
,
false
);
}
else
{
bundle
.
putInt
(
Constants
.
SOP_RID
,
0
);
bundle
.
putBoolean
(
Constants
.
SOP_OLD
,
true
);
}
bundle
.
putBoolean
(
Constants
.
SOP_CAN_EDIT
,
false
);
mView
.
startActivity
(
SopWebViewActivity
.
class
,
bundle
);
}
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/SopLocalActivity.java
View file @
9dcd6e29
...
...
@@ -57,6 +57,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
private
boolean
isSeted
;
//是否已设置过
private
boolean
isEdit
;
//是否编辑过
Bundle
mBundle
;
boolean
canEdit
=
true
;
private
int
step
=
1
;
...
...
@@ -88,6 +89,11 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
@Override
public
void
initView
()
{
mBundle
=
getIntent
().
getBundleExtra
(
Constants
.
BUNDLE
);
canEdit
=
mBundle
.
getBoolean
(
Constants
.
SOP_CAN_EDIT
,
true
);
int
id
=
mBundle
.
getInt
(
Constants
.
ORDER_ID
);
setInitStatus
();
// showToast("edit: "+canEdit);
// showToast("id: "+id);
mBind
.
titleBack
.
setOnClickListener
(
view
->
{
EventBus
.
getDefault
().
post
(
new
FinishSopEvent
());
});
...
...
@@ -98,11 +104,20 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
}
mBind
.
btnCancel
.
setText
(
step
==
1
?
"取消"
:
"上一步"
);
mBind
.
rbNo
.
setChecked
(
true
);
initData
();
mBind
.
photo
.
addItemDecoration
(
new
SpacesItemDecoration
(
10
));
mBind
.
photo
.
setLayoutManager
(
new
GridLayoutManager
(
mActivity
,
5
));
setImgAdapter
();
initData
();
}
//设置页面是否可编辑
private
void
setInitStatus
()
{
mBind
.
edtRemark
.
setEnabled
(
canEdit
);
mBind
.
rbYes
.
setEnabled
(
canEdit
);
mBind
.
rbNo
.
setEnabled
(
canEdit
);
}
private
void
setAdapterListener
()
{
...
...
@@ -130,6 +145,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
//填充页面数据
private
void
setStepData
()
{
mBind
.
btnNext
.
setText
(
step
==
OrderConstant
.
sopListData
.
size
()
?
"完成"
:
"下一步"
);
if
(
OrderConstant
.
sopListData
.
size
()
>=
step
)
{
currentSop
=
OrderConstant
.
sopListData
.
get
(
step
-
1
);
mBind
.
tvSort
.
setText
(
currentSop
.
getSortNum
()
+
""
);
...
...
@@ -141,6 +157,11 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
mBind
.
tvExample
.
setVisibility
(
View
.
GONE
);
mBind
.
rlExample
.
setVisibility
(
View
.
GONE
);
}
if
(
currentSop
.
getRadioResult
()
==
1
)
{
mBind
.
rbYes
.
setChecked
(
true
);
}
else
{
mBind
.
rbNo
.
setChecked
(
true
);
}
setAnswerStatuView
();
}
mBind
.
btnNext
.
setOnClickListener
(
view
->
{
...
...
@@ -150,31 +171,27 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
//根据是否已设置sop判断布局显示
private
void
setAnswerStatuView
()
{
if
(
isSeted
&&
!
isEdit
)
{
if
(
TextUtils
.
isEmpty
(
currentSop
.
getTextResult
()))
{
// mBind.tvRemark.setVisibility(View.GONE);
// mBind.edtRemark.setVisibility(View.GONE);
}
else
{
mBind
.
tvRemark
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
edtRemark
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
edtRemark
.
setText
(
currentSop
.
getTextResult
());
}
mImages
=
(
ArrayList
<
String
>)
CommonUtils
.
string2ListUrl
(
currentSop
.
getPhotoResult
());
mVideos
=
(
ArrayList
<
String
>)
CommonUtils
.
string2ListUrl
(
currentSop
.
getVideoResult
());
if
(
mImages
.
size
()
==
0
&&
mVideos
.
size
()
==
0
)
{
// mBind.photo.setVisibility(View.GONE);
}
else
{
mBind
.
photo
.
setVisibility
(
View
.
VISIBLE
);
if
(
mImages
.
size
()
>
0
)
{
setImgAdapter
();
}
else
{
setVideoAdapter
();
}
}
if
(
TextUtils
.
isEmpty
(
currentSop
.
getTextResult
())
&&
!
canEdit
)
{
mBind
.
tvRemark
.
setVisibility
(
View
.
GONE
);
mBind
.
edtRemark
.
setVisibility
(
View
.
GONE
);
}
else
{
mBind
.
tvRemark
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
edtRemark
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
edtRemark
.
setText
(
currentSop
.
getTextResult
());
}
mImages
=
(
ArrayList
<
String
>)
CommonUtils
.
string2ListUrl
(
currentSop
.
getPhotoResult
());
mVideos
=
(
ArrayList
<
String
>)
CommonUtils
.
string2ListUrl
(
currentSop
.
getVideoResult
());
if
(
mImages
.
size
()
==
0
&&
mVideos
.
size
()
==
0
&&
!
canEdit
)
{
mBind
.
llPhoto
.
setVisibility
(
View
.
GONE
);
mBind
.
photo
.
setVisibility
(
View
.
GONE
);
}
else
{
mBind
.
llPhoto
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
photo
.
setVisibility
(
View
.
VISIBLE
);
if
(
mImages
.
size
()
>
0
)
{
setImgAdapter
();
}
else
{
setVideoAdapter
();
}
}
}
...
...
@@ -190,7 +207,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
}
else
{
mBind
.
jzVideo
.
setVisibility
(
View
.
GONE
);
mBind
.
ivExample
.
setVisibility
(
View
.
VISIBLE
);
GlideImageLoader
.
load
(
this
,
example
,
mBind
.
ivE
xample
);
GlideImageLoader
.
load
Fit
(
this
,
mBind
.
ivExample
,
e
xample
);
}
}
...
...
@@ -216,6 +233,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
if
(
isSeted
&&
!
isEdit
)
{
toNext
();
}
else
{
currentSop
.
setRadioResult
(
radioStatus
);
if
(
TextUtils
.
isEmpty
(
remark
.
trim
())
&&
currentSop
.
getTextOption
()
==
2
)
{
showToast
(
"请输入备注信息"
);
return
;
...
...
@@ -224,24 +242,24 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
showToast
(
"请补全拍照信息"
);
return
;
}
//传"
-
"后服务器会清空该字段数据
//传""后服务器会清空该字段数据
if
(
isSeted
&&
isEdit
&&
TextUtils
.
isEmpty
(
remark
.
trim
()))
{
currentSop
.
setTextResult
(
"
-
"
);
currentSop
.
setTextResult
(
""
);
}
currentSop
.
setTextResult
(
remark
);
if
(
mImages
.
size
()
==
0
&&
mVideos
.
size
()
==
0
)
{
if
(
isSeted
&&
isEdit
)
{
currentSop
.
setPhotoResult
(
"
-
"
);
currentSop
.
setVideoResult
(
"
-
"
);
currentSop
.
setPhotoResult
(
""
);
currentSop
.
setVideoResult
(
""
);
}
saveSop
();
}
else
if
(
mImages
.
size
()
>
0
)
{
if
(
isSeted
&&
isEdit
)
currentSop
.
setVideoResult
(
"
-
"
);
currentSop
.
setVideoResult
(
""
);
uploadImgs
();
}
else
if
(
mVideos
.
size
()
>
0
)
{
if
(
isSeted
&&
isEdit
)
currentSop
.
setPhotoResult
(
"
-
"
);
currentSop
.
setPhotoResult
(
""
);
uploadVideo
();
}
}
...
...
@@ -253,9 +271,9 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
List
<
String
>
tempList
=
new
ArrayList
<>();
List
<
String
>
localList
=
new
ArrayList
<>();
for
(
String
str
:
mImages
)
{
if
(
CommonUtils
.
isNetUrl
(
str
)){
if
(
CommonUtils
.
isNetUrl
(
str
))
{
tempList
.
add
(
str
);
}
else
{
}
else
{
localList
.
add
(
str
);
}
}
...
...
@@ -309,32 +327,34 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
if
(
step
<
OrderConstant
.
sopListData
.
size
())
{
SopLocalActivity
.
launch
(
this
,
mSopRid
,
step
+
1
,
mBundle
);
}
else
{
i
nt
mOrderId
=
mBundle
.
getInt
(
Constants
.
ORDER_ID
,
0
);
int
mPositon
=
mBundle
.
getInt
(
Constants
.
ORDER_POSTION
,
0
);
int
mSpuState
=
mBundle
.
getInt
(
Constants
.
STATE
,
0
);
Spu
mSpu
=
(
Spu
)
mBundle
.
getSerializable
(
OrderConstant
.
SPU
);
ArrayList
<
Spu
>
mSpus
=
mBundle
.
getParcelableArrayList
(
OrderConstant
.
SPUS
);
if
(
mSpu
!=
null
)
{
Intent
intent
=
new
Intent
(
mActivity
,
MultiProcessOrderActivity
.
class
);
Bundle
bundle
=
new
Bundle
(
);
bundle
.
putSerializable
(
OrderConstant
.
SPU
,
mSpu
);
bundle
.
putParcelableArrayList
(
OrderConstant
.
SPUS
,
mSpus
);
bundle
.
putInt
(
Constants
.
ORDER_POSTION
,
0
);
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
STATE
,
mSpuState
);
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundl
e
);
startActivity
(
intent
);
EventBus
.
getDefault
().
post
(
new
FinishSopEvent
()
);
}
else
{
EventBus
.
getDefault
().
post
(
new
OrderState
(
ORDER_SOP_FINISH
,
mPositon
));
Intent
intent
=
new
Intent
(
mActivity
,
ProcessOrderActivity
.
class
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
ORDER_POSTION
,
mPositon
);
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
startActivity
(
intent
);
EventBus
.
getDefault
().
post
(
new
FinishSopEvent
());
i
f
(
canEdit
)
{
int
mOrderId
=
mBundle
.
getInt
(
Constants
.
ORDER_ID
,
0
);
int
mPositon
=
mBundle
.
getInt
(
Constants
.
ORDER_POSTION
,
0
);
int
mSpuState
=
mBundle
.
getInt
(
Constants
.
STATE
,
0
);
Spu
mSpu
=
(
Spu
)
mBundle
.
getSerializable
(
OrderConstant
.
SPU
);
ArrayList
<
Spu
>
mSpus
=
mBundle
.
getParcelableArrayList
(
OrderConstant
.
SPUS
);
if
(
mSpu
!=
null
)
{
Intent
intent
=
new
Intent
(
mActivity
,
MultiProcessOrderActivity
.
class
);
Bundle
bundle
=
new
Bundle
(
);
bundle
.
putSerializable
(
OrderConstant
.
SPU
,
mSpu
);
bundle
.
putParcelableArrayList
(
OrderConstant
.
SPUS
,
mSpus
);
bundle
.
putInt
(
Constants
.
ORDER_POSTION
,
0
);
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
STATE
,
mSpuStat
e
);
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
startActivity
(
intent
);
}
else
{
EventBus
.
getDefault
().
post
(
new
OrderState
(
ORDER_SOP_FINISH
,
mPositon
));
Intent
intent
=
new
Intent
(
mActivity
,
ProcessOrderActivity
.
class
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
ORDER_POSTION
,
mPositon
);
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
startActivity
(
intent
);
}
}
EventBus
.
getDefault
().
post
(
new
FinishSopEvent
());
}
}
...
...
@@ -343,6 +363,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
isChooseImg
=
true
;
mAdapter
=
new
MediaChooseAdapter
(
this
,
mImages
,
3
,
PictureMimeType
.
ofImage
(),
true
);
mAdapter
.
setCanEdit
(
canEdit
);
mAdapter
.
setRequestCode
(
1001
);
mBind
.
photo
.
setAdapter
(
mAdapter
);
setAdapterListener
();
...
...
@@ -353,6 +374,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
isChooseImg
=
false
;
mAdapter
=
new
MediaChooseAdapter
(
this
,
mVideos
,
1
,
PictureMimeType
.
ofVideo
(),
true
);
mAdapter
.
setCanEdit
(
canEdit
);
mAdapter
.
setRequestCode
(
1002
);
mAdapter
.
setVideoLength
(
31
);
mBind
.
photo
.
setAdapter
(
mAdapter
);
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/SopWebViewActivity.java
View file @
9dcd6e29
...
...
@@ -63,15 +63,17 @@ public class SopWebViewActivity extends BaseActivity<SopPresenter, ActivitySopWe
private
ArrayList
<
Spu
>
mSpus
;
private
int
mCreatedSource
;
private
int
mSpuState
;
private
int
sopRid
;
// private int sopRid;
private
boolean
isOld
;
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
Bundle
bundle
=
getIntent
().
getBundleExtra
(
Constants
.
BUNDLE
);
// mOrderId = bundle.getInt(Constants.ORDER_ID, 0);
sopRid
=
bundle
.
getInt
(
Constants
.
SOP_RID
,
0
);
if
(
sopRid
>
0
)
{
SopLocalActivity
.
launch
(
this
,
sopRid
,
bundle
);
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
,
0
);
// sopRid = bundle.getInt(Constants.SOP_RID, 0);
isOld
=
bundle
.
getBoolean
(
Constants
.
SOP_CAN_EDIT
,
false
);
if
(!
isOld
)
{
SopLocalActivity
.
launch
(
this
,
mOrderId
,
bundle
);
finish
();
}
super
.
onCreate
(
savedInstanceState
);
...
...
@@ -84,7 +86,7 @@ public class SopWebViewActivity extends BaseActivity<SopPresenter, ActivitySopWe
@Override
public
void
initView
()
{
if
(
sopRid
<=
0
)
{
if
(
isOld
)
{
initData
();
initWebView
();
}
...
...
@@ -364,7 +366,7 @@ public class SopWebViewActivity extends BaseActivity<SopPresenter, ActivitySopWe
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
if
(
sopRid
<=
0
)
{
if
(
isOld
)
{
clearCach
();
}
}
...
...
orderCenter/src/main/res/layout/activity_sop_local.xml
View file @
9dcd6e29
...
...
@@ -163,7 +163,7 @@
android:visibility=
"gone"
android:id=
"@+id/rl_example"
android:layout_width=
"match_parent"
android:layout_height=
"1
5
0dp"
android:layout_height=
"1
6
0dp"
android:layout_marginLeft=
"15dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"15dp"
...
...
@@ -180,6 +180,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:src=
"@drawable/icon_video_default"
android:background=
"@color/color_53"
/>
</RelativeLayout>
...
...
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