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
83a71781
authored
Nov 24, 2017
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单流程修改
parent
0f0b21cb
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
611 additions
and
1226 deletions
app/src/main/java/com/dayu/bigfish/api/APIService.java
app/src/main/java/com/dayu/bigfish/api/ApiWrapper.java
app/src/main/java/com/dayu/bigfish/base/BasePresenter.java
app/src/main/java/com/dayu/bigfish/bean/Order.java
app/src/main/java/com/dayu/bigfish/presenter/main/MainContract.java
app/src/main/java/com/dayu/bigfish/presenter/main/MainModel.java
app/src/main/java/com/dayu/bigfish/presenter/main/MainPresenter.java
app/src/main/java/com/dayu/bigfish/presenter/ordertab/OrderTabContract.java
app/src/main/java/com/dayu/bigfish/presenter/ordertab/OrderTabModel.java
app/src/main/java/com/dayu/bigfish/presenter/ordertab/OrderTabPresenter.java
app/src/main/java/com/dayu/bigfish/presenter/ordertwotab/OrderTwoTabContract.java
app/src/main/java/com/dayu/bigfish/presenter/ordertwotab/OrderTwoTabModel.java
app/src/main/java/com/dayu/bigfish/presenter/ordertwotab/OrderTwoTabPresenter.java
app/src/main/java/com/dayu/bigfish/presenter/worksRecord/WorksRecordModel.java
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
app/src/main/java/com/dayu/bigfish/ui/ProcessOrderActivity.java
app/src/main/java/com/dayu/bigfish/ui/ReceivingActivity.java
app/src/main/java/com/dayu/bigfish/ui/SubcribeTimeActivity.java
app/src/main/java/com/dayu/bigfish/ui/WorksRecordActivity.java
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderSecondTabAdapter.java → app/src/main/java/com/dayu/bigfish/ui/adapter/OrderDoingAdapter.java
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderFirstTabAdapter.java
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderFourTabAdapter.java
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderThreeTabAdapter.java
app/src/main/java/com/dayu/bigfish/ui/adapter/ReceiveAdapter.java
app/src/main/java/com/dayu/bigfish/ui/adapter/WorksheetAdapter.java
app/src/main/java/com/dayu/bigfish/ui/fragment/HomeSecondTabFragment.java → app/src/main/java/com/dayu/bigfish/ui/fragment/HomeOrderFragment.java
app/src/main/java/com/dayu/bigfish/ui/fragment/HomeFourTabFragment.java → app/src/main/java/com/dayu/bigfish/ui/fragment/HomePersonFragment.java
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderFirstTabFragment.java
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderFourTabFragment.java
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderSecondTabFragment.java
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderThreeTabFragment.java
app/src/main/java/com/dayu/bigfish/utils/LocationUtils.java
app/src/main/java/com/dayu/bigfish/utils/UtilsDate.java
app/src/main/res/layout/activity_home.xml
app/src/main/res/layout/activity_list.xml
app/src/main/res/layout/activity_listview_item.xml
app/src/main/res/layout/activity_receiving_item.xml
app/src/main/res/layout/empty_type.xml
app/src/main/res/layout/fragment_order_cancle_item.xml
app/src/main/res/layout/fragment_order_layout.xml → app/src/main/res/layout/fragment_order_error_item.xml
app/src/main/res/layout/fragment_tabtwo_item.xml → app/src/main/res/layout/fragment_orderdoing_item.xml
app/src/main/res/layout/fragment_tabend_item.xml
app/src/main/res/layout/fragment_tabthree_item.xml
app/src/main/java/com/dayu/bigfish/api/APIService.java
View file @
83a71781
...
@@ -102,9 +102,9 @@ public interface APIService {
...
@@ -102,9 +102,9 @@ public interface APIService {
@GET
(
"/api-order/"
+
"orders/findSimpleOrderVOByPage"
)
@GET
(
"/api-order/"
+
"orders/findSimpleOrderVOByPage"
)
Observable
<
BaseResponse
<
BasePageBean
<
Order
>>>
getReceiveOrders
(
@Query
(
"state"
)
int
state
,
Observable
<
BaseResponse
<
BasePageBean
<
Order
>>>
getReceiveOrders
(
@Query
(
"state"
)
int
state
,
@Query
(
"engineerId"
)
int
engineerId
,
@Query
(
"engineerId"
)
int
engineerId
,
@Query
(
"siteId"
)
int
siteId
,
@Query
(
"page"
)
int
page
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
,
@Query
(
"pageSize"
)
int
pageSize
);
@Query
(
"siteId"
)
int
siteId
);
/**
/**
* 获取异常订单列表.
* 获取异常订单列表.
...
...
app/src/main/java/com/dayu/bigfish/api/ApiWrapper.java
View file @
83a71781
...
@@ -73,15 +73,14 @@ public class ApiWrapper extends Api {
...
@@ -73,15 +73,14 @@ public class ApiWrapper extends Api {
}
}
//获取订单列表state, pageId, pageSize, siteId, userId
//获取订单列表state, pageId, pageSize, siteId, userId
public
Observable
<
BasePageBean
<
Order
>>
getReceiveOrders
(
int
state
,
int
page
,
int
pageSize
,
int
siteId
,
public
Observable
<
BasePageBean
<
Order
>>
getReceiveOrders
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
)
{
int
userId
)
{
return
getService
().
getReceiveOrders
(
state
,
userId
,
siteId
,
page
,
pageSize
)
return
getService
().
getReceiveOrders
(
state
,
userId
,
page
,
pageSize
,
siteId
)
.
compose
(
applySchedulers
());
.
compose
(
applySchedulers
());
}
}
//获取异常订单列表
//获取异常订单列表
public
Observable
<
List
<
ErrorOrder
>>
getErrorOrders
(
int
siteId
,
int
userId
)
{
public
Observable
<
List
<
ErrorOrder
>>
getErrorOrders
(
int
siteId
,
int
userId
)
{
return
getService
().
getErrorOrders
(
siteId
,
userId
)
return
getService
().
getErrorOrders
(
siteId
,
userId
)
.
compose
(
applySchedulers
());
.
compose
(
applySchedulers
());
}
}
...
@@ -215,11 +214,11 @@ public class ApiWrapper extends Api {
...
@@ -215,11 +214,11 @@ public class ApiWrapper extends Api {
@Override
@Override
public
ObservableSource
apply
(
Observable
upstream
)
{
public
ObservableSource
apply
(
Observable
upstream
)
{
return
upstream
.
doOnSubscribe
(
new
Consumer
<
Disposable
>()
{
return
upstream
.
doOnSubscribe
(
new
Consumer
<
Disposable
>()
{
@Override
@Override
public
void
accept
(
Disposable
disposable
)
throws
Exception
{
public
void
accept
(
Disposable
disposable
)
throws
Exception
{
}
}
})
})
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
flatMap
((
Function
)
(
response
)
->
flatResponse
((
BaseResponse
<
Object
>)
response
))
.
flatMap
((
Function
)
(
response
)
->
flatResponse
((
BaseResponse
<
Object
>)
response
))
...
...
app/src/main/java/com/dayu/bigfish/base/BasePresenter.java
View file @
83a71781
...
@@ -143,6 +143,7 @@ public abstract class BasePresenter<M, T> {
...
@@ -143,6 +143,7 @@ public abstract class BasePresenter<M, T> {
if
(
confirm
)
{
if
(
confirm
)
{
UserManager
.
getInstance
().
clearUserInfo
(
mContext
);
UserManager
.
getInstance
().
clearUserInfo
(
mContext
);
EMClient
.
getInstance
().
logout
(
true
);
EMClient
.
getInstance
().
logout
(
true
);
UserManager
.
getInstance
().
clearUserInfo
(
mContext
);
Intent
Intents
=
new
Intent
(
mContext
,
LoginActivity
.
class
);
Intent
Intents
=
new
Intent
(
mContext
,
LoginActivity
.
class
);
Intents
.
setFlags
(
Intents
.
setFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
|
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
|
...
...
app/src/main/java/com/dayu/bigfish/bean/Order.java
View file @
83a71781
...
@@ -45,6 +45,8 @@ public class Order {
...
@@ -45,6 +45,8 @@ public class Order {
private
int
anyContacts
;
private
int
anyContacts
;
private
String
spuName
;
private
String
spuName
;
private
String
spuId
;
private
String
spuId
;
private
int
excptionCode
;
private
String
appointmentTime
;
public
int
getSubStatus
()
{
public
int
getSubStatus
()
{
return
subStatus
;
return
subStatus
;
...
@@ -189,6 +191,7 @@ public class Order {
...
@@ -189,6 +191,7 @@ public class Order {
public
void
setAnyContacts
(
int
anyContacts
)
{
public
void
setAnyContacts
(
int
anyContacts
)
{
this
.
anyContacts
=
anyContacts
;
this
.
anyContacts
=
anyContacts
;
}
}
public
String
getSpuName
()
{
public
String
getSpuName
()
{
return
spuName
;
return
spuName
;
}
}
...
@@ -204,4 +207,21 @@ public class Order {
...
@@ -204,4 +207,21 @@ public class Order {
public
void
setSpuId
(
String
spuId
)
{
public
void
setSpuId
(
String
spuId
)
{
this
.
spuId
=
spuId
;
this
.
spuId
=
spuId
;
}
}
public
int
getExcptionCode
()
{
return
excptionCode
;
}
public
void
setExcptionCode
(
int
excptionCode
)
{
this
.
excptionCode
=
excptionCode
;
}
public
String
getAppointmentTime
()
{
return
appointmentTime
;
}
public
void
setAppointmentTime
(
String
appointmentTime
)
{
this
.
appointmentTime
=
appointmentTime
;
}
}
}
app/src/main/java/com/dayu/bigfish/presenter/main/MainContract.java
View file @
83a71781
...
@@ -22,7 +22,7 @@ public interface MainContract {
...
@@ -22,7 +22,7 @@ public interface MainContract {
Observable
<
Boolean
>
commitVersionInfo
(
RequestBody
body
);
Observable
<
Boolean
>
commitVersionInfo
(
RequestBody
body
);
Observable
<
BasePageBean
<
Order
>>
getReceiveOrder
(
int
state
,
int
pagerId
,
int
pagerSize
,
int
siteId
,
int
userId
);
Observable
<
BasePageBean
<
Order
>>
getReceiveOrder
(
int
state
,
int
userId
,
int
siteId
,
int
pagerId
,
int
pagerSize
);
}
}
interface
View
extends
BaseView
{
interface
View
extends
BaseView
{
...
@@ -45,6 +45,6 @@ public interface MainContract {
...
@@ -45,6 +45,6 @@ public interface MainContract {
public
abstract
void
commitVersionInfo
(
int
accoutId
,
String
imei
,
String
platform
,
String
versionCode
);
public
abstract
void
commitVersionInfo
(
int
accoutId
,
String
imei
,
String
platform
,
String
versionCode
);
public
abstract
void
getReceiveOrder
(
int
state
,
int
pagerId
,
int
pagerSize
,
int
siteId
,
int
userId
);
public
abstract
void
getReceiveOrder
(
int
state
,
int
userId
,
int
siteId
,
int
pagerId
,
int
pagerSize
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/presenter/main/MainModel.java
View file @
83a71781
...
@@ -31,7 +31,7 @@ public class MainModel implements MainContract.Model {
...
@@ -31,7 +31,7 @@ public class MainModel implements MainContract.Model {
}
}
@Override
@Override
public
Observable
<
BasePageBean
<
Order
>>
getReceiveOrder
(
int
state
,
int
pagerId
,
int
pagerSize
,
int
siteId
,
int
userId
)
{
public
Observable
<
BasePageBean
<
Order
>>
getReceiveOrder
(
int
state
,
int
userId
,
int
siteId
,
int
pagerId
,
int
pagerSize
)
{
return
mApiWrapper
.
getReceiveOrders
(
state
,
pagerId
,
pagerSize
,
siteId
,
userId
);
return
mApiWrapper
.
getReceiveOrders
(
state
,
userId
,
siteId
,
pagerId
,
pagerSize
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/presenter/main/MainPresenter.java
View file @
83a71781
...
@@ -72,8 +72,8 @@ public class MainPresenter extends MainContract.Presenter {
...
@@ -72,8 +72,8 @@ public class MainPresenter extends MainContract.Presenter {
}
}
@Override
@Override
public
void
getReceiveOrder
(
int
state
,
int
pagerId
,
int
pagerSize
,
int
siteId
,
int
userId
)
{
public
void
getReceiveOrder
(
int
state
,
int
userId
,
int
siteId
,
int
pagerId
,
int
pagerSize
)
{
mModel
.
getReceiveOrder
(
state
,
pagerId
,
pagerSize
,
siteId
,
userId
).
subscribe
(
baseObserver
(
new
Consumer
<
BasePageBean
<
Order
>>()
{
mModel
.
getReceiveOrder
(
state
,
userId
,
siteId
,
pagerId
,
pagerSize
).
subscribe
(
baseObserver
(
new
Consumer
<
BasePageBean
<
Order
>>()
{
@Override
@Override
public
void
accept
(
BasePageBean
<
Order
>
orders
)
throws
Exception
{
public
void
accept
(
BasePageBean
<
Order
>
orders
)
throws
Exception
{
mView
.
getReceiveOrderSuccess
(
orders
);
mView
.
getReceiveOrderSuccess
(
orders
);
...
...
app/src/main/java/com/dayu/bigfish/presenter/ordertab/OrderTabContract.java
View file @
83a71781
...
@@ -14,7 +14,7 @@ import io.reactivex.Observable;
...
@@ -14,7 +14,7 @@ import io.reactivex.Observable;
*/
*/
public
interface
OrderTabContract
{
public
interface
OrderTabContract
{
interface
Model
extends
BaseModel
{
interface
Model
extends
BaseModel
{
Observable
<
BasePageBean
<
Order
>>
getWatingOrder
(
int
state
,
int
pageId
,
int
pageSize
,
int
siteId
,
int
userId
);
Observable
<
BasePageBean
<
Order
>>
getWatingOrder
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
);
}
}
interface
View
extends
BaseView
{
interface
View
extends
BaseView
{
...
@@ -23,6 +23,6 @@ public interface OrderTabContract {
...
@@ -23,6 +23,6 @@ public interface OrderTabContract {
}
}
abstract
class
Presenter
extends
BasePresenter
<
Model
,
View
>
{
abstract
class
Presenter
extends
BasePresenter
<
Model
,
View
>
{
public
abstract
void
getWatingOrder
(
int
state
,
int
pageId
,
int
pageSize
,
int
siteId
,
int
userId
);
public
abstract
void
getWatingOrder
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/presenter/ordertab/OrderTabModel.java
View file @
83a71781
...
@@ -12,7 +12,7 @@ import io.reactivex.Observable;
...
@@ -12,7 +12,7 @@ import io.reactivex.Observable;
public
class
OrderTabModel
implements
OrderTabContract
.
Model
{
public
class
OrderTabModel
implements
OrderTabContract
.
Model
{
@Override
@Override
public
Observable
<
BasePageBean
<
Order
>>
getWatingOrder
(
int
state
,
int
pageId
,
int
pageSize
,
int
siteId
,
int
userId
)
{
public
Observable
<
BasePageBean
<
Order
>>
getWatingOrder
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
)
{
return
new
ApiWrapper
().
getReceiveOrders
(
state
,
pageId
,
pageSize
,
siteId
,
userId
);
return
new
ApiWrapper
().
getReceiveOrders
(
state
,
userId
,
siteId
,
page
,
pageSize
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/presenter/ordertab/OrderTabPresenter.java
View file @
83a71781
...
@@ -17,8 +17,8 @@ public class OrderTabPresenter extends OrderTabContract.Presenter {
...
@@ -17,8 +17,8 @@ public class OrderTabPresenter extends OrderTabContract.Presenter {
@Override
@Override
public
void
getWatingOrder
(
int
state
,
int
pageId
,
int
pageSize
,
int
siteId
,
int
userId
)
{
public
void
getWatingOrder
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
)
{
mModel
.
getWatingOrder
(
state
,
pageId
,
pageSize
,
siteId
,
userId
).
subscribe
(
baseObserver
(
new
Consumer
<
BasePageBean
<
Order
>>()
{
mModel
.
getWatingOrder
(
state
,
userId
,
siteId
,
page
,
pageSize
).
subscribe
(
baseObserver
(
new
Consumer
<
BasePageBean
<
Order
>>()
{
@Override
@Override
public
void
accept
(
BasePageBean
<
Order
>
orderBasePageBean
)
throws
Exception
{
public
void
accept
(
BasePageBean
<
Order
>
orderBasePageBean
)
throws
Exception
{
mView
.
getWatingOrderSuccess
(
orderBasePageBean
);
mView
.
getWatingOrderSuccess
(
orderBasePageBean
);
...
...
app/src/main/java/com/dayu/bigfish/presenter/ordertwotab/OrderTwoTabContract.java
View file @
83a71781
...
@@ -15,7 +15,7 @@ import okhttp3.RequestBody;
...
@@ -15,7 +15,7 @@ import okhttp3.RequestBody;
*/
*/
public
interface
OrderTwoTabContract
{
public
interface
OrderTwoTabContract
{
interface
Model
extends
BaseModel
{
interface
Model
extends
BaseModel
{
Observable
<
BasePageBean
<
Order
>>
getWatingOrder
(
int
state
,
int
pageId
,
int
pageSize
,
int
siteId
,
int
userId
);
Observable
<
BasePageBean
<
Order
>>
getWatingOrder
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
);
Observable
<
Integer
>
startOrder
(
RequestBody
body
);
Observable
<
Integer
>
startOrder
(
RequestBody
body
);
...
@@ -29,7 +29,7 @@ public interface OrderTwoTabContract {
...
@@ -29,7 +29,7 @@ public interface OrderTwoTabContract {
}
}
abstract
class
Presenter
extends
BasePresenter
<
Model
,
View
>
{
abstract
class
Presenter
extends
BasePresenter
<
Model
,
View
>
{
public
abstract
void
getWatingOrder
(
int
state
,
int
pageId
,
int
pageSize
,
int
siteId
,
int
userId
);
public
abstract
void
getWatingOrder
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
);
public
abstract
Observable
<
Integer
>
startOrder
(
int
orderId
,
double
latitude
,
double
longitude
);
public
abstract
Observable
<
Integer
>
startOrder
(
int
orderId
,
double
latitude
,
double
longitude
);
...
...
app/src/main/java/com/dayu/bigfish/presenter/ordertwotab/OrderTwoTabModel.java
View file @
83a71781
...
@@ -15,8 +15,8 @@ public class OrderTwoTabModel implements OrderTwoTabContract.Model {
...
@@ -15,8 +15,8 @@ public class OrderTwoTabModel implements OrderTwoTabContract.Model {
private
ApiWrapper
mWrapper
=
new
ApiWrapper
();
private
ApiWrapper
mWrapper
=
new
ApiWrapper
();
@Override
@Override
public
Observable
<
BasePageBean
<
Order
>>
getWatingOrder
(
int
state
,
int
pageId
,
int
pageSize
,
int
siteId
,
int
userId
)
{
public
Observable
<
BasePageBean
<
Order
>>
getWatingOrder
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
)
{
return
mWrapper
.
getReceiveOrders
(
state
,
pageId
,
pageSize
,
siteId
,
userId
);
return
mWrapper
.
getReceiveOrders
(
state
,
userId
,
siteId
,
page
,
pageSize
);
}
}
@Override
@Override
...
...
app/src/main/java/com/dayu/bigfish/presenter/ordertwotab/OrderTwoTabPresenter.java
View file @
83a71781
...
@@ -18,16 +18,14 @@ import okhttp3.RequestBody;
...
@@ -18,16 +18,14 @@ import okhttp3.RequestBody;
public
class
OrderTwoTabPresenter
extends
OrderTwoTabContract
.
Presenter
{
public
class
OrderTwoTabPresenter
extends
OrderTwoTabContract
.
Presenter
{
private
Observable
<
Integer
>
observable
;
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
}
}
@Override
@Override
public
void
getWatingOrder
(
int
state
,
int
pageId
,
int
pageSize
,
int
siteId
,
int
userId
)
{
public
void
getWatingOrder
(
int
state
,
int
userId
,
int
siteId
,
int
page
,
int
pageSize
)
{
mModel
.
getWatingOrder
(
state
,
pageId
,
pageSize
,
siteId
,
userId
).
subscribe
(
baseObserver
(
new
Consumer
<
BasePageBean
<
Order
>>()
{
mModel
.
getWatingOrder
(
state
,
userId
,
siteId
,
page
,
pageSize
).
subscribe
(
baseObserver
(
new
Consumer
<
BasePageBean
<
Order
>>()
{
@Override
@Override
public
void
accept
(
BasePageBean
<
Order
>
orderBasePageBean
)
throws
Exception
{
public
void
accept
(
BasePageBean
<
Order
>
orderBasePageBean
)
throws
Exception
{
mView
.
getWatingOrderSuccess
(
orderBasePageBean
);
mView
.
getWatingOrderSuccess
(
orderBasePageBean
);
...
...
app/src/main/java/com/dayu/bigfish/presenter/worksRecord/WorksRecordModel.java
View file @
83a71781
...
@@ -14,7 +14,7 @@ public class WorksRecordModel implements WroksRecordContract.Model {
...
@@ -14,7 +14,7 @@ public class WorksRecordModel implements WroksRecordContract.Model {
private
ApiWrapper
wrapper
=
new
ApiWrapper
();
private
ApiWrapper
wrapper
=
new
ApiWrapper
();
@Override
@Override
public
Observable
<
BasePageBean
<
Order
>>
getWorksRecord
(
int
state
,
int
engineerId
,
int
siteId
,
int
page
,
int
pageSize
)
{
public
Observable
<
BasePageBean
<
Order
>>
getWorksRecord
(
int
state
,
int
engineerId
,
int
siteId
,
int
page
,
int
pageSize
)
{
wrapper
=
new
ApiWrapper
();
wrapper
=
new
ApiWrapper
();
return
wrapper
.
getReceiveOrders
(
state
,
engineerId
,
siteId
,
page
,
pageSize
);
return
wrapper
.
getReceiveOrders
(
state
,
engineerId
,
siteId
,
page
,
pageSize
);
}
}
...
...
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
View file @
83a71781
...
@@ -35,9 +35,9 @@ import com.dayu.bigfish.rxbus.RefreshReceivingNum;
...
@@ -35,9 +35,9 @@ import com.dayu.bigfish.rxbus.RefreshReceivingNum;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.sqlbean.MessageSys
;
import
com.dayu.bigfish.sqlbean.MessageSys
;
import
com.dayu.bigfish.ui.fragment.HomeFirstTabFragment
;
import
com.dayu.bigfish.ui.fragment.HomeFirstTabFragment
;
import
com.dayu.bigfish.ui.fragment.Home
FourTab
Fragment
;
import
com.dayu.bigfish.ui.fragment.Home
Person
Fragment
;
import
com.dayu.bigfish.ui.fragment.HomeMessageTabFragment
;
import
com.dayu.bigfish.ui.fragment.HomeMessageTabFragment
;
import
com.dayu.bigfish.ui.fragment.Home
SecondTab
Fragment
;
import
com.dayu.bigfish.ui.fragment.Home
Order
Fragment
;
import
com.dayu.bigfish.utils.AppUtils
;
import
com.dayu.bigfish.utils.AppUtils
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.LocationUtils
;
import
com.dayu.bigfish.utils.LocationUtils
;
...
@@ -92,9 +92,9 @@ public class MainActivity extends BaseActivity<MainPresenter, MainModel> impleme
...
@@ -92,9 +92,9 @@ public class MainActivity extends BaseActivity<MainPresenter, MainModel> impleme
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
HomeFirstTabFragment
firstFragment
=
HomeFirstTabFragment
.
newInstance
();
HomeFirstTabFragment
firstFragment
=
HomeFirstTabFragment
.
newInstance
();
Home
SecondTabFragment
secondFragment
=
HomeSecondTab
Fragment
.
newInstance
();
Home
OrderFragment
secondFragment
=
HomeOrder
Fragment
.
newInstance
();
HomeMessageTabFragment
thirdFragment
=
HomeMessageTabFragment
.
newInstance
();
HomeMessageTabFragment
thirdFragment
=
HomeMessageTabFragment
.
newInstance
();
Home
FourTabFragment
fourFragment
=
HomeFourTab
Fragment
.
newInstance
();
Home
PersonFragment
fourFragment
=
HomePerson
Fragment
.
newInstance
();
mFragments
=
new
Fragment
[]{
firstFragment
,
secondFragment
,
thirdFragment
,
fourFragment
};
mFragments
=
new
Fragment
[]{
firstFragment
,
secondFragment
,
thirdFragment
,
fourFragment
};
addFragment
();
addFragment
();
mAccountId
=
GetUserInfo
.
getACCOUNT_ID
(
mContext
);
mAccountId
=
GetUserInfo
.
getACCOUNT_ID
(
mContext
);
...
@@ -102,7 +102,7 @@ public class MainActivity extends BaseActivity<MainPresenter, MainModel> impleme
...
@@ -102,7 +102,7 @@ public class MainActivity extends BaseActivity<MainPresenter, MainModel> impleme
String
imei
=
AppUtils
.
getIMEI
(
mContext
);
String
imei
=
AppUtils
.
getIMEI
(
mContext
);
mPresenter
.
commitVersionInfo
(
mAccountId
,
imei
,
"2"
,
getPackageNum
());
mPresenter
.
commitVersionInfo
(
mAccountId
,
imei
,
"2"
,
getPackageNum
());
mPresenter
.
getNewVersion
(
getPackageNum
());
mPresenter
.
getNewVersion
(
getPackageNum
());
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
1
,
20
,
mSiteId
,
mAccountId
);
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
mAccountId
,
mSiteId
,
1
,
20
);
//动态刷新主页接单数量-->显示
//动态刷新主页接单数量-->显示
RxBus
.
getDefault
().
toObservable
(
RefreReceiveData
.
class
)
RxBus
.
getDefault
().
toObservable
(
RefreReceiveData
.
class
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
...
@@ -110,7 +110,7 @@ public class MainActivity extends BaseActivity<MainPresenter, MainModel> impleme
...
@@ -110,7 +110,7 @@ public class MainActivity extends BaseActivity<MainPresenter, MainModel> impleme
@Override
@Override
public
void
accept
(
RefreReceiveData
refreReceiveData
)
throws
Exception
{
public
void
accept
(
RefreReceiveData
refreReceiveData
)
throws
Exception
{
if
(
refreReceiveData
.
getReceive
()
==
0
)
{
if
(
refreReceiveData
.
getReceive
()
==
0
)
{
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
1
,
20
,
mSiteId
,
mAccountId
);
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
mAccountId
,
mSiteId
,
1
,
20
);
}
}
}
}
});
});
...
@@ -123,7 +123,12 @@ public class MainActivity extends BaseActivity<MainPresenter, MainModel> impleme
...
@@ -123,7 +123,12 @@ public class MainActivity extends BaseActivity<MainPresenter, MainModel> impleme
if
(
mReceivingNum
<
0
)
{
if
(
mReceivingNum
<
0
)
{
mReceivingNum
=
0
;
mReceivingNum
=
0
;
}
}
mGetOrderTv
.
setText
(
mReceivingNum
+
""
);
if
(
refreshReceivingNum
.
getTabNum
()
!=
-
1
)
{
mGetOrderTv
.
setText
(
refreshReceivingNum
.
getTabNum
()
+
""
);
}
else
{
mGetOrderTv
.
setText
(
mReceivingNum
+
""
);
}
}
}
});
});
int
index
=
getIntent
().
getIntExtra
(
Constants
.
DUMP_INDEX
,
1
);
int
index
=
getIntent
().
getIntExtra
(
Constants
.
DUMP_INDEX
,
1
);
...
...
app/src/main/java/com/dayu/bigfish/ui/ProcessOrderActivity.java
View file @
83a71781
...
@@ -52,7 +52,7 @@ import static com.dayu.bigfish.R.id.et_input;
...
@@ -52,7 +52,7 @@ import static com.dayu.bigfish.R.id.et_input;
import
static
com
.
dayu
.
bigfish
.
R
.
id
.
et_up_input
;
import
static
com
.
dayu
.
bigfish
.
R
.
id
.
et_up_input
;
import
static
com
.
dayu
.
bigfish
.
R
.
id
.
image_switch
;
import
static
com
.
dayu
.
bigfish
.
R
.
id
.
image_switch
;
import
static
com
.
dayu
.
bigfish
.
R
.
id
.
text_six_value
;
import
static
com
.
dayu
.
bigfish
.
R
.
id
.
text_six_value
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
SecondTab
Fragment
.
ORDER_FINISH
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
Order
Fragment
.
ORDER_FINISH
;
import
static
com
.
dayu
.
bigfish
.
utils
.
SPUtils
.
get
;
import
static
com
.
dayu
.
bigfish
.
utils
.
SPUtils
.
get
;
/**
/**
...
...
app/src/main/java/com/dayu/bigfish/ui/ReceivingActivity.java
View file @
83a71781
...
@@ -8,7 +8,6 @@ import android.view.View;
...
@@ -8,7 +8,6 @@ import android.view.View;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.ui.adapter.ReceiveAdapter
;
import
com.dayu.bigfish.base.BaseActivity
;
import
com.dayu.bigfish.base.BaseActivity
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.bean.Order
;
...
@@ -18,6 +17,7 @@ import com.dayu.bigfish.presenter.receivingorder.ReceivingPresenter;
...
@@ -18,6 +17,7 @@ import com.dayu.bigfish.presenter.receivingorder.ReceivingPresenter;
import
com.dayu.bigfish.rxbus.RefreshReceivingNum
;
import
com.dayu.bigfish.rxbus.RefreshReceivingNum
;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.ui.adapter.OrderDoingAdapter
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ToastUtils
;
import
com.dayu.bigfish.utils.ToastUtils
;
...
@@ -45,7 +45,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
...
@@ -45,7 +45,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
private
int
mPage
=
1
;
private
int
mPage
=
1
;
private
int
mPageSize
=
10
;
private
int
mPageSize
=
10
;
private
int
mTotalPage
=
1
;
private
int
mTotalPage
=
1
;
private
Receive
Adapter
mAdapter
;
private
OrderDoing
Adapter
mAdapter
;
private
int
mRefreshState
=
1
;
//1:刷新,2:下拉加载
private
int
mRefreshState
=
1
;
//1:刷新,2:下拉加载
...
@@ -59,8 +59,8 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
...
@@ -59,8 +59,8 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
userId
=
GetUserInfo
.
getACCOUNT_ID
(
this
);
userId
=
GetUserInfo
.
getACCOUNT_ID
(
this
);
siteId
=
GetUserInfo
.
getSITE_ID
(
this
);
siteId
=
GetUserInfo
.
getSITE_ID
(
this
);
ProgressUtil
.
startLoad
(
mContext
);
ProgressUtil
.
startLoad
(
mContext
);
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
userId
,
siteId
,
mPage
,
mPageSize
);
mAdapter
=
new
ReceiveAdapter
(
R
.
layout
.
activity_receiving_item
);
mAdapter
=
new
OrderDoingAdapter
(
R
.
layout
.
fragment_orderdoing_item
,
mContext
);
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mRecyclerView
.
setAdapter
(
mAdapter
);
mRecyclerView
.
setAdapter
(
mAdapter
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
...
@@ -70,7 +70,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
...
@@ -70,7 +70,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
@Override
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
Order
order
=
(
Order
)
adapter
.
getItem
(
position
);
Order
order
=
(
Order
)
adapter
.
getItem
(
position
);
if
(
view
.
getId
()
==
R
.
id
.
i
mage_receiving
)
{
if
(
view
.
getId
()
==
R
.
id
.
i
tem_text_phone
)
{
mPresenter
.
receiveOrder
(
order
.
getId
(),
userId
);
mPresenter
.
receiveOrder
(
order
.
getId
(),
userId
);
}
}
}
}
...
@@ -79,7 +79,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
...
@@ -79,7 +79,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
@Override
@Override
public
void
onLoadMoreRequested
()
{
public
void
onLoadMoreRequested
()
{
mRefreshState
=
2
;
mRefreshState
=
2
;
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
},
mRecyclerView
);
},
mRecyclerView
);
}
}
...
@@ -94,6 +94,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
...
@@ -94,6 +94,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
public
void
getReceiveOrderSuccess
(
BasePageBean
<
Order
>
orders
)
{
public
void
getReceiveOrderSuccess
(
BasePageBean
<
Order
>
orders
)
{
mTotalPage
=
orders
.
getTotalPages
();
mTotalPage
=
orders
.
getTotalPages
();
mPageSize
=
orders
.
getPageSize
();
mPageSize
=
orders
.
getPageSize
();
RxBus
.
getDefault
().
post
(
new
RefreshReceivingNum
(
orders
.
getTotalRows
()));
if
(
orders
.
getData
()
!=
null
&&
orders
.
getData
().
size
()
!=
0
)
{
if
(
orders
.
getData
()
!=
null
&&
orders
.
getData
().
size
()
!=
0
)
{
if
(
mRefreshState
==
1
)
{
if
(
mRefreshState
==
1
)
{
mRefreshLayout
.
setRefreshing
(
false
);
mRefreshLayout
.
setRefreshing
(
false
);
...
@@ -124,7 +125,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
...
@@ -124,7 +125,7 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
ToastUtils
.
showShortToast
(
"接单成功"
);
ToastUtils
.
showShortToast
(
"接单成功"
);
//接单成功,刷新首页tab状态数量
//接单成功,刷新首页tab状态数量
RxBus
.
getDefault
().
post
(
new
RefreshTabNum
(
0
));
RxBus
.
getDefault
().
post
(
new
RefreshTabNum
(
0
));
RxBus
.
getDefault
().
post
(
new
RefreshReceivingNum
(
1
));
RxBus
.
getDefault
().
post
(
new
RefreshReceivingNum
(
-
1
));
finish
();
finish
();
}
}
...
@@ -137,11 +138,10 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
...
@@ -137,11 +138,10 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Receivin
public
void
onRefresh
()
{
public
void
onRefresh
()
{
mRefreshState
=
1
;
mRefreshState
=
1
;
mPage
=
1
;
mPage
=
1
;
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getReceiveOrder
(
Constants
.
WATING_ORDER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
@Override
@Override
public
void
finish
()
{
public
void
finish
()
{
super
.
finish
();
super
.
finish
();
...
...
app/src/main/java/com/dayu/bigfish/ui/SubcribeTimeActivity.java
View file @
83a71781
...
@@ -28,9 +28,9 @@ import butterknife.BindView;
...
@@ -28,9 +28,9 @@ import butterknife.BindView;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
static
com
.
dayu
.
bigfish
.
R
.
id
.
title_text
;
import
static
com
.
dayu
.
bigfish
.
R
.
id
.
title_text
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
SecondTabFragment
.
MODIFY_TIM
E
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
OrderFragment
.
ORDER_YUYU
E
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
SecondTab
Fragment
.
SUBCRIBE_TIME
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
Order
Fragment
.
SUBCRIBE_TIME
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
SecondTabFragment
.
UPDOOR_TIME
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
OrderFragment
.
ORDER_DOING
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
LONG_TIME_FORMAT_TWO
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
LONG_TIME_FORMAT_TWO
;
import
static
java
.
lang
.
Integer
.
parseInt
;
import
static
java
.
lang
.
Integer
.
parseInt
;
...
@@ -69,11 +69,11 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter, Su
...
@@ -69,11 +69,11 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter, Su
finshPosition
=
intent
.
getIntExtra
(
"position"
,
0
);
finshPosition
=
intent
.
getIntExtra
(
"position"
,
0
);
mState
=
intent
.
getIntExtra
(
Constants
.
ORDER_STATE
,
0
);
mState
=
intent
.
getIntExtra
(
Constants
.
ORDER_STATE
,
0
);
orderId
=
parseInt
(
value
);
orderId
=
parseInt
(
value
);
if
(
mState
==
0
)
{
if
(
mState
==
2
)
{
titleText
.
setText
(
getString
(
R
.
string
.
tv_home_tab_one_subscribe_time
));
titleText
.
setText
(
getString
(
R
.
string
.
tv_home_tab_one_subscribe_time
));
}
else
if
(
mState
==
MODIFY_TIME
)
{
}
else
if
(
mState
==
3
)
{
titleText
.
setText
(
getString
(
R
.
string
.
tv_home_tab_updata_subscribe_time
));
titleText
.
setText
(
getString
(
R
.
string
.
tv_home_tab_updata_subscribe_time
));
}
else
if
(
mState
==
UPDOOR_TIME
)
{
}
else
if
(
mState
==
4
)
{
titleText
.
setText
(
getString
(
R
.
string
.
item_restart
));
titleText
.
setText
(
getString
(
R
.
string
.
item_restart
));
}
}
}
}
...
@@ -85,8 +85,8 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter, Su
...
@@ -85,8 +85,8 @@ public class SubcribeTimeActivity extends BaseActivity<SubcribeTimePresenter, Su
if
(
mState
==
SUBCRIBE_TIME
)
{
if
(
mState
==
SUBCRIBE_TIME
)
{
ToastUtils
.
showShortToast
(
"预约时间成功,请移至待服务列表查看"
);
ToastUtils
.
showShortToast
(
"预约时间成功,请移至待服务列表查看"
);
RxBus
.
getDefault
().
post
(
new
RefreshTabNum
(
1
));
RxBus
.
getDefault
().
post
(
new
RefreshTabNum
(
1
));
}
else
if
(
mState
==
MODIFY_TIME
||
mState
==
UPDOOR_TIME
)
{
}
else
if
(
mState
==
ORDER_YUYUE
||
mState
==
ORDER_DOING
)
{
RxBus
.
getDefault
().
post
(
new
OrderState
(
MODIFY_TIM
E
,
finshPosition
));
RxBus
.
getDefault
().
post
(
new
OrderState
(
ORDER_YUYU
E
,
finshPosition
));
}
}
}
}
...
...
app/src/main/java/com/dayu/bigfish/ui/WorksRecordActivity.java
View file @
83a71781
...
@@ -14,13 +14,13 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
...
@@ -14,13 +14,13 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.ui.adapter.WorksheetAdapter
;
import
com.dayu.bigfish.base.BaseActivity
;
import
com.dayu.bigfish.base.BaseActivity
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.presenter.worksRecord.WorksRecordModel
;
import
com.dayu.bigfish.presenter.worksRecord.WorksRecordModel
;
import
com.dayu.bigfish.presenter.worksRecord.WorksRecordPresenter
;
import
com.dayu.bigfish.presenter.worksRecord.WorksRecordPresenter
;
import
com.dayu.bigfish.presenter.worksRecord.WroksRecordContract
;
import
com.dayu.bigfish.presenter.worksRecord.WroksRecordContract
;
import
com.dayu.bigfish.ui.adapter.OrderDoingAdapter
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ProgressUtil
;
...
@@ -48,7 +48,7 @@ public class WorksRecordActivity extends BaseActivity<WorksRecordPresenter, Work
...
@@ -48,7 +48,7 @@ public class WorksRecordActivity extends BaseActivity<WorksRecordPresenter, Work
public
ArrayList
<
Order
>
mList
=
new
ArrayList
<>();
public
ArrayList
<
Order
>
mList
=
new
ArrayList
<>();
private
int
siteId
=
GetUserInfo
.
getSITE_ID
(
MyApplication
.
getContext
());
private
int
siteId
=
GetUserInfo
.
getSITE_ID
(
MyApplication
.
getContext
());
private
int
userId
=
GetUserInfo
.
getACCOUNT_ID
(
MyApplication
.
getContext
());
private
int
userId
=
GetUserInfo
.
getACCOUNT_ID
(
MyApplication
.
getContext
());
private
Worksheet
Adapter
mAdapter
;
private
OrderDoing
Adapter
mAdapter
;
private
int
mPage
=
1
;
private
int
mPage
=
1
;
private
int
mPageSize
=
20
;
private
int
mPageSize
=
20
;
private
int
mTotalPage
=
1
;
private
int
mTotalPage
=
1
;
...
@@ -61,8 +61,8 @@ public class WorksRecordActivity extends BaseActivity<WorksRecordPresenter, Work
...
@@ -61,8 +61,8 @@ public class WorksRecordActivity extends BaseActivity<WorksRecordPresenter, Work
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
titleText
.
setText
(
"
工单记录
"
);
titleText
.
setText
(
"
历史工单
"
);
mAdapter
=
new
WorksheetAdapter
(
R
.
layout
.
activity_lis
t
);
mAdapter
=
new
OrderDoingAdapter
(
R
.
layout
.
fragment_orderdoing_item
,
mContex
t
);
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mRecyclerView
.
setHasFixedSize
(
true
);
mRecyclerView
.
setHasFixedSize
(
true
);
mRecyclerView
.
setAdapter
(
mAdapter
);
mRecyclerView
.
setAdapter
(
mAdapter
);
...
...
app/src/main/java/com/dayu/bigfish/ui/adapter/Order
SecondTab
Adapter.java
→
app/src/main/java/com/dayu/bigfish/ui/adapter/Order
Doing
Adapter.java
View file @
83a71781
package
com
.
dayu
.
bigfish
.
ui
.
adapter
;
package
com
.
dayu
.
bigfish
.
ui
.
adapter
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.res.AssetManager
;
import
android.content.res.AssetManager
;
import
android.graphics.Typeface
;
import
android.graphics.Typeface
;
...
@@ -20,12 +21,14 @@ import com.dayu.bigfish.utils.DateUtils;
...
@@ -20,12 +21,14 @@ import com.dayu.bigfish.utils.DateUtils;
import
com.dayu.bigfish.utils.LocationUtils
;
import
com.dayu.bigfish.utils.LocationUtils
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ToastUtils
;
import
com.dayu.bigfish.utils.ToastUtils
;
import
com.dayu.bigfish.utils.UtilsDate
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.functions.Consumer
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
HomeSecondTabFragment
.
MODIFY_TIME
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
FORMAT_ONE
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
HomeSecondTabFragment
.
UPDOOR_TIME
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
LONG_TIME_FORMAT_TWO
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
SHORT_DATE_FORMAT
;
/**
/**
...
@@ -33,15 +36,16 @@ import static com.dayu.bigfish.ui.fragment.HomeSecondTabFragment.UPDOOR_TIME;
...
@@ -33,15 +36,16 @@ import static com.dayu.bigfish.ui.fragment.HomeSecondTabFragment.UPDOOR_TIME;
* on 2017/9/11.
* on 2017/9/11.
*/
*/
public
class
OrderSecondTabAdapter
extends
BaseQuickAdapter
<
Order
,
BaseViewHolder
>
{
public
class
OrderDoingAdapter
extends
BaseQuickAdapter
<
Order
,
BaseViewHolder
>
{
private
final
OrderTwoTabPresenter
mPresenter
;
private
OrderTwoTabPresenter
mPresenter
;
private
final
Activity
mActivity
;
private
DateUtils
mDateUtils
;
private
DateUtils
mDateUtils
;
private
AMapLocation
mLocation
;
private
AMapLocation
mLocation
;
public
Order
SecondTabAdapter
(
int
layoutResId
,
OrderTwoTabPresenter
presenter
)
{
public
Order
DoingAdapter
(
int
layoutResId
,
Activity
activity
)
{
super
(
layoutResId
);
super
(
layoutResId
);
mDateUtils
=
new
DateUtils
();
mDateUtils
=
new
DateUtils
();
m
Presenter
=
presenter
;
m
Activity
=
activity
;
}
}
...
@@ -55,52 +59,144 @@ public class OrderSecondTabAdapter extends BaseQuickAdapter<Order, BaseViewHolde
...
@@ -55,52 +59,144 @@ public class OrderSecondTabAdapter extends BaseQuickAdapter<Order, BaseViewHolde
}
}
private
void
initData
(
BaseViewHolder
holder
,
Order
item
)
throws
Exception
{
private
void
initData
(
BaseViewHolder
holder
,
Order
item
)
throws
Exception
{
final
int
id
=
item
.
getId
();
boolean
haveCustomer
=
true
;
String
dateMD
=
mDateUtils
.
stringDateToDate
(
item
.
getCreateTime
());
String
dateTime
=
mDateUtils
.
stringTimeToDate
(
item
.
getCreateTime
());
AssetManager
mgr
=
mContext
.
getAssets
();
AssetManager
mgr
=
mContext
.
getAssets
();
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
holder
.
setText
(
R
.
id
.
item_tody
,
dateMD
);
holder
.
setText
(
R
.
id
.
item_time
,
dateTime
);
holder
.
setTypeface
(
R
.
id
.
item_time
,
tf
);
holder
.
setTypeface
(
R
.
id
.
item_time
,
tf
);
holder
.
setText
(
R
.
id
.
item_text_weixiu_leixing
,
item
.
getCategoryName
());
holder
.
setText
(
R
.
id
.
item_text_weixiu_leixing
,
item
.
getCategoryName
());
holder
.
setText
(
R
.
id
.
item_text_weixiu
,
item
.
getProviderName
());
holder
.
setText
(
R
.
id
.
item_text_weixiu
,
item
.
getProviderName
());
holder
.
setText
(
R
.
id
.
item_text_dizhi
,
item
.
getProvinceName
()
+
item
.
getCityName
()
+
holder
.
setText
(
R
.
id
.
item_text_dizhi
,
item
.
getProvinceName
()
+
item
.
getCityName
()
+
item
.
getDistrictName
()
+
item
.
getAddress
());
item
.
getDistrictName
()
+
item
.
getAddress
());
holder
.
setText
(
R
.
id
.
item_text_user_name
,
item
.
getCustomerName
());
holder
.
setText
(
R
.
id
.
item_text_user_phone
,
item
.
getCustomerMobile
());
holder
.
getView
(
R
.
id
.
item_updata_time
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
item_updata_time
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
item_text_phone
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
order_line_two
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
order_line_two
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
tv_error_state
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
tv_item_process
).
setVisibility
(
View
.
VISIBLE
);
final
int
id
=
item
.
getId
();
if
(
TextUtils
.
isEmpty
(
item
.
getAppointmentTime
()))
{
holder
.
setText
(
R
.
id
.
item_tody
,
"无预期"
);
holder
.
getView
(
R
.
id
.
item_time
).
setVisibility
(
View
.
GONE
);
}
else
{
String
dateMD
=
UtilsDate
.
changeFormat
(
item
.
getAppointmentTime
(),
FORMAT_ONE
,
SHORT_DATE_FORMAT
);
String
dateTime
=
UtilsDate
.
changeFormat
(
item
.
getAppointmentTime
(),
FORMAT_ONE
,
LONG_TIME_FORMAT_TWO
);
if
(
UtilsDate
.
IsToday
(
item
.
getAppointmentTime
()))
{
holder
.
setText
(
R
.
id
.
item_tody
,
"今天"
);
}
else
if
(
UtilsDate
.
IsNextday
(
item
.
getAppointmentTime
()))
{
holder
.
setText
(
R
.
id
.
item_tody
,
"明天"
);
}
else
{
holder
.
setText
(
R
.
id
.
item_tody
,
dateMD
);
}
holder
.
setText
(
R
.
id
.
item_time
,
dateTime
);
holder
.
getView
(
R
.
id
.
item_time
).
setVisibility
(
View
.
VISIBLE
);
}
if
(
TextUtils
.
isEmpty
(
item
.
getCustomerName
()))
{
holder
.
setText
(
R
.
id
.
item_text_user_name
,
"无联系人"
);
holder
.
getView
(
R
.
id
.
item_text_user_phone
).
setVisibility
(
View
.
GONE
);
haveCustomer
=
false
;
}
else
{
holder
.
setText
(
R
.
id
.
item_text_user_name
,
item
.
getCustomerName
());
holder
.
setText
(
R
.
id
.
item_text_user_phone
,
item
.
getCustomerMobile
());
holder
.
getView
(
R
.
id
.
item_text_user_phone
).
setVisibility
(
View
.
VISIBLE
);
haveCustomer
=
true
;
}
if
(
TextUtils
.
isEmpty
(
item
.
getSpuName
()))
{
if
(
TextUtils
.
isEmpty
(
item
.
getSpuName
()))
{
holder
.
getView
(
R
.
id
.
tv_order_detail
).
setVisibility
(
View
.
GONE
);
holder
.
setText
(
R
.
id
.
tv_order_detail
,
"无服务要求"
);
}
else
{
}
else
{
holder
.
getView
(
R
.
id
.
tv_order_detail
).
setVisibility
(
View
.
VISIBLE
);
holder
.
setText
(
R
.
id
.
tv_order_detail
,
item
.
getSpuName
());
holder
.
setText
(
R
.
id
.
tv_order_detail
,
item
.
getSpuName
());
}
}
if
(
item
.
getStatus
()
==
3
&&
item
.
getSubStatus
()
==
1
)
{
switch
(
item
.
getStatus
())
{
holder
.
setText
(
R
.
id
.
tv_item_process
,
"我已出发"
);
case
1
:
//待接单
}
else
if
(
item
.
getStatus
()
==
3
&&
item
.
getSubStatus
()
==
2
)
{
holder
.
getView
(
R
.
id
.
tv_item_process
).
setVisibility
(
View
.
GONE
);
holder
.
setText
(
R
.
id
.
tv_item_process
,
"开始服务"
);
holder
.
getView
(
R
.
id
.
item_updata_time
).
setVisibility
(
View
.
GONE
);
}
else
if
(
item
.
getStatus
()
==
4
&&
item
.
getSubStatus
()
==
6
)
{
holder
.
getView
(
R
.
id
.
order_line_two
).
setVisibility
(
View
.
GONE
);
holder
.
setText
(
R
.
id
.
tv_error_state
,
"[已完成]"
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
GONE
);
holder
.
setTextColor
(
R
.
id
.
tv_error_state
,
mContext
.
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
setText
(
R
.
id
.
item_text_phone
,
"接单"
);
holder
.
getView
(
R
.
id
.
tv_error_state
).
setVisibility
(
View
.
VISIBLE
);
holder
.
addOnClickListener
(
R
.
id
.
item_text_phone
);
holder
.
getView
(
R
.
id
.
item_updata_time
).
setVisibility
(
View
.
GONE
);
holder
.
setText
(
R
.
id
.
tv_order_time
,
"客户预期"
);
holder
.
getView
(
R
.
id
.
tv_item_process
).
setVisibility
(
View
.
GONE
);
break
;
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
GONE
);
case
2
:
//待预约
holder
.
getView
(
R
.
id
.
order_line_two
).
setVisibility
(
View
.
GONE
);
if
(!
haveCustomer
)
{
return
;
holder
.
getView
(
R
.
id
.
item_text_phone
).
setVisibility
(
View
.
GONE
);
}
else
if
(
item
.
getStatus
()
==
4
)
{
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
GONE
);
holder
.
setText
(
R
.
id
.
tv_item_process
,
"处理工单"
);
}
else
{
holder
.
getView
(
R
.
id
.
item_text_phone
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
VISIBLE
);
}
holder
.
getView
(
R
.
id
.
tv_item_process
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
order_line_two
).
setVisibility
(
View
.
GONE
);
holder
.
setText
(
R
.
id
.
item_updata_time
,
"预约时间"
);
holder
.
setText
(
R
.
id
.
tv_order_time
,
"客户预期"
);
break
;
case
3
:
//待服务
if
(!
haveCustomer
)
{
holder
.
getView
(
R
.
id
.
item_text_phone
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
getView
(
R
.
id
.
item_text_phone
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
VISIBLE
);
}
holder
.
setText
(
R
.
id
.
item_updata_time
,
"修改预约时间"
);
if
(
item
.
getSubStatus
()
==
1
)
{
holder
.
setText
(
R
.
id
.
tv_item_process
,
"我已出发"
);
}
else
if
(
item
.
getSubStatus
()
==
2
)
{
holder
.
setText
(
R
.
id
.
tv_item_process
,
"开始服务"
);
}
break
;
case
4
:
//待处理
holder
.
setText
(
R
.
id
.
item_updata_time
,
"需要再次上门"
);
holder
.
setText
(
R
.
id
.
tv_item_process
,
"处理工单"
);
if
(
item
.
getSubStatus
()
==
6
)
{
if
(!
haveCustomer
)
{
holder
.
getView
(
R
.
id
.
item_text_phone
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
getView
(
R
.
id
.
item_text_phone
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
VISIBLE
);
}
holder
.
setText
(
R
.
id
.
tv_error_state
,
"[等待验收]"
);
holder
.
setTextColor
(
R
.
id
.
tv_error_state
,
mActivity
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
getView
(
R
.
id
.
tv_error_state
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
item_updata_time
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
tv_item_process
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
order_line_two
).
setVisibility
(
View
.
GONE
);
if
(!
haveCustomer
)
{
holder
.
getView
(
R
.
id
.
ll_bottom
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
item_bottom_line
).
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
getView
(
R
.
id
.
ll_bottom
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
item_bottom_line
).
setVisibility
(
View
.
VISIBLE
);
}
}
break
;
case
5
:
//已完成
holder
.
setText
(
R
.
id
.
tv_error_state
,
"[已完成]"
);
holder
.
setTextColor
(
R
.
id
.
tv_error_state
,
mActivity
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
getView
(
R
.
id
.
tv_error_state
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
item_updata_time
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
tv_item_process
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
order_line_one
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
order_line_two
).
setVisibility
(
View
.
GONE
);
if
(!
haveCustomer
)
{
holder
.
getView
(
R
.
id
.
ll_bottom
).
setVisibility
(
View
.
GONE
);
holder
.
getView
(
R
.
id
.
item_bottom_line
).
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
getView
(
R
.
id
.
ll_bottom
).
setVisibility
(
View
.
VISIBLE
);
holder
.
getView
(
R
.
id
.
item_bottom_line
).
setVisibility
(
View
.
VISIBLE
);
}
break
;
default
:
break
;
}
}
if
(
item
.
getStatus
()
==
3
)
{
if
(
item
.
getExcptionCode
()
==
1
)
{
holder
.
setText
(
R
.
id
.
item_updata_time
,
"修改预约时间"
);
holder
.
setText
(
R
.
id
.
tv_error_state
,
"[接单超时]"
);
}
else
if
(
item
.
getStatus
()
==
4
)
{
}
else
if
(
item
.
getExcptionCode
()
==
2
)
{
holder
.
setText
(
R
.
id
.
item_updata_time
,
"需要再次上门"
);
holder
.
setText
(
R
.
id
.
tv_error_state
,
"[预约超时]"
);
}
else
if
(
item
.
getExcptionCode
()
==
3
)
{
holder
.
setText
(
R
.
id
.
tv_error_state
,
"[验收超时]"
);
}
}
holder
.
setOnClickListener
(
R
.
id
.
tv_item_process
,
new
View
.
OnClickListener
()
{
holder
.
getView
(
R
.
id
.
tv_item_process
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
processClick
(
item
,
holder
);
processClick
(
item
,
holder
);
...
@@ -109,27 +205,25 @@ public class OrderSecondTabAdapter extends BaseQuickAdapter<Order, BaseViewHolde
...
@@ -109,27 +205,25 @@ public class OrderSecondTabAdapter extends BaseQuickAdapter<Order, BaseViewHolde
holder
.
getView
(
R
.
id
.
item_updata_time
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
holder
.
getView
(
R
.
id
.
item_updata_time
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
if
(
item
.
getStatus
()
==
3
)
{
dumpSubcribeTimeActivity
(
id
,
holder
.
getAdapterPosition
(),
item
.
getStatus
());
dumpSubcribeTimeActivity
(
id
,
holder
.
getAdapterPosition
(),
MODIFY_TIME
);
}
else
if
(
item
.
getStatus
()
==
4
)
{
dumpSubcribeTimeActivity
(
id
,
holder
.
getAdapterPosition
(),
UPDOOR_TIME
);
}
}
});
holder
.
getView
(
R
.
id
.
item_text_phone
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_DIAL
);
intent
.
setData
(
Uri
.
parse
(
"tel:"
+
item
.
getCustomerMobile
()));
mContext
.
startActivity
(
intent
);
}
}
});
});
if
(
item
.
getStatus
()
!=
1
)
{
holder
.
getView
(
R
.
id
.
item_text_phone
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_DIAL
);
intent
.
setData
(
Uri
.
parse
(
"tel:"
+
item
.
getCustomerMobile
()));
mContext
.
startActivity
(
intent
);
}
});
}
}
}
private
void
processClick
(
Order
item
,
BaseViewHolder
holder
)
{
private
void
processClick
(
Order
item
,
BaseViewHolder
holder
)
{
int
position
=
holder
.
getAdapterPosition
();
int
position
=
holder
.
getAdapterPosition
();
if
(
item
.
getStatus
()
==
4
&&
item
.
getSubStatus
()
==
3
)
{
if
(
item
.
getStatus
()
==
4
&&
item
.
getSubStatus
()
==
3
)
{
dumpProcessActivity
(
item
.
getId
(),
position
);
dumpProcessActivity
(
item
.
getId
(),
position
);
}
else
if
(
item
.
getStatus
()
==
4
&&
item
.
getSubStatus
()
==
4
)
{
}
else
if
(
item
.
getStatus
()
==
4
&&
item
.
getSubStatus
()
==
4
)
{
ToastUtils
.
showShortToast
(
"sop未完成"
);
ToastUtils
.
showShortToast
(
"sop未完成"
);
}
else
if
(
item
.
getStatus
()
==
4
&&
item
.
getSubStatus
()
==
5
)
{
}
else
if
(
item
.
getStatus
()
==
4
&&
item
.
getSubStatus
()
==
5
)
{
...
@@ -193,4 +287,8 @@ public class OrderSecondTabAdapter extends BaseQuickAdapter<Order, BaseViewHolde
...
@@ -193,4 +287,8 @@ public class OrderSecondTabAdapter extends BaseQuickAdapter<Order, BaseViewHolde
intent
.
putExtra
(
"position"
,
adapterPosition
);
intent
.
putExtra
(
"position"
,
adapterPosition
);
mContext
.
startActivity
(
intent
);
mContext
.
startActivity
(
intent
);
}
}
public
void
initPresenter
(
OrderTwoTabPresenter
presenter
)
{
mPresenter
=
presenter
;
}
}
}
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderFirstTabAdapter.java
deleted
100755 → 0
View file @
0f0b21cb
package
com
.
dayu
.
bigfish
.
ui
.
adapter
;
import
android.content.Intent
;
import
android.content.res.AssetManager
;
import
android.graphics.Typeface
;
import
android.net.Uri
;
import
android.view.View
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.ui.SubcribeTimeActivity
;
import
com.dayu.bigfish.utils.DateUtils
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
HomeSecondTabFragment
.
SUBCRIBE_TIME
;
/**
* 未预约列表的适配器
* 2017/9/9.
*/
public
class
OrderFirstTabAdapter
extends
BaseQuickAdapter
<
Order
,
BaseViewHolder
>
{
private
DateUtils
mDateUtils
;
public
OrderFirstTabAdapter
(
int
layoutResId
)
{
super
(
layoutResId
);
mDateUtils
=
new
DateUtils
();
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
Order
item
)
{
try
{
initData
(
helper
,
item
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
private
void
initData
(
final
BaseViewHolder
holder
,
Order
item
)
throws
Exception
{
final
int
id
=
item
.
getId
();
String
dateMD
=
mDateUtils
.
stringDateToDate
(
item
.
getCreateTime
());
String
dateTime
=
mDateUtils
.
stringTimeToDate
(
item
.
getCreateTime
());
AssetManager
mgr
=
mContext
.
getAssets
();
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
holder
.
setText
(
R
.
id
.
item_tody
,
dateMD
);
holder
.
setText
(
R
.
id
.
item_time
,
dateTime
);
holder
.
setTypeface
(
R
.
id
.
item_time
,
tf
);
holder
.
setText
(
R
.
id
.
item_text_weixiu_leixing
,
item
.
getCategoryName
());
holder
.
setText
(
R
.
id
.
item_text_weixiu
,
item
.
getProviderName
());
holder
.
setText
(
R
.
id
.
item_text_dizhi
,
item
.
getProvinceName
()
+
item
.
getCityName
()
+
item
.
getDistrictName
()
+
item
.
getAddress
());
holder
.
setText
(
R
.
id
.
item_text_user_name
,
item
.
getCustomerName
());
holder
.
setText
(
R
.
id
.
item_text_user_phone
,
item
.
getCustomerMobile
());
holder
.
getView
(
R
.
id
.
item_text_phone
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_DIAL
);
intent
.
setData
(
Uri
.
parse
(
"tel:"
+
item
.
getCustomerMobile
()));
mContext
.
startActivity
(
intent
);
}
});
holder
.
getView
(
R
.
id
.
item_text_time
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
mContext
,
SubcribeTimeActivity
.
class
);
intent
.
putExtra
(
"orderId"
,
id
+
""
);
intent
.
putExtra
(
"position"
,
holder
.
getAdapterPosition
()
+
""
);
intent
.
putExtra
(
Constants
.
ORDER_STATE
,
SUBCRIBE_TIME
);
mContext
.
startActivity
(
intent
);
}
});
}
}
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderFourTabAdapter.java
View file @
83a71781
...
@@ -2,12 +2,19 @@ package com.dayu.bigfish.ui.adapter;
...
@@ -2,12 +2,19 @@ package com.dayu.bigfish.ui.adapter;
import
android.content.res.AssetManager
;
import
android.content.res.AssetManager
;
import
android.graphics.Typeface
;
import
android.graphics.Typeface
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.utils.DateUtils
;
import
com.dayu.bigfish.utils.DateUtils
;
import
com.dayu.bigfish.utils.UtilsDate
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
FORMAT_ONE
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
LONG_TIME_FORMAT_TWO
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
SHORT_DATE_FORMAT
;
/**
/**
* 已取消列表的适配器
* 已取消列表的适配器
...
@@ -37,20 +44,33 @@ public class OrderFourTabAdapter extends BaseQuickAdapter<Order, BaseViewHolder>
...
@@ -37,20 +44,33 @@ public class OrderFourTabAdapter extends BaseQuickAdapter<Order, BaseViewHolder>
private
void
initData
(
BaseViewHolder
helper
,
Order
item
)
{
private
void
initData
(
BaseViewHolder
helper
,
Order
item
)
{
try
{
try
{
dateMD
=
dateUtils
.
stringDateToDate
(
item
.
getCreateTime
());
if
(
TextUtils
.
isEmpty
(
item
.
getCreateTime
()))
{
dateTime
=
dateUtils
.
stringTimeToDate
(
item
.
getCreateTime
());
helper
.
setText
(
R
.
id
.
item_tody
,
"无预期"
);
helper
.
getView
(
R
.
id
.
item_time
).
setVisibility
(
View
.
GONE
);
}
else
{
String
dateMD
=
UtilsDate
.
changeFormat
(
item
.
getCreateTime
(),
FORMAT_ONE
,
SHORT_DATE_FORMAT
);
String
dateTime
=
UtilsDate
.
changeFormat
(
item
.
getCreateTime
(),
FORMAT_ONE
,
LONG_TIME_FORMAT_TWO
);
if
(
UtilsDate
.
IsToday
(
item
.
getCreateTime
()))
{
helper
.
setText
(
R
.
id
.
item_tody
,
"今天"
);
}
else
if
(
UtilsDate
.
IsNextday
(
item
.
getCreateTime
()))
{
helper
.
setText
(
R
.
id
.
item_tody
,
"明天"
);
}
else
{
helper
.
setText
(
R
.
id
.
item_tody
,
dateMD
);
}
helper
.
setText
(
R
.
id
.
item_time
,
dateTime
);
helper
.
getView
(
R
.
id
.
item_time
).
setVisibility
(
View
.
VISIBLE
);
}
AssetManager
mgr
=
mContext
.
getAssets
();
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
helper
.
setTypeface
(
R
.
id
.
item_time
,
tf
);
helper
.
setText
(
R
.
id
.
item_text_weixiu_leixing
,
item
.
getCategoryName
());
helper
.
setText
(
R
.
id
.
item_text_weixiu
,
item
.
getProviderName
());
helper
.
setText
(
R
.
id
.
item_text_dizhi
,
item
.
getProvinceName
()
+
item
.
getCityName
()
+
item
.
getDistrictName
()
+
item
.
getAddress
());
helper
.
setText
(
R
.
id
.
error_state
,
"[已取消]"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
AssetManager
mgr
=
mContext
.
getAssets
();
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
helper
.
setText
(
R
.
id
.
item_tody
,
dateMD
);
helper
.
setText
(
R
.
id
.
item_text_time
,
dateTime
);
helper
.
setTypeface
(
R
.
id
.
item_text_time
,
tf
);
helper
.
setText
(
R
.
id
.
item_text_weixiu
,
item
.
getProviderName
());
helper
.
setText
(
R
.
id
.
item_text_weixiu_leixing
,
item
.
getCategoryName
());
helper
.
setText
(
R
.
id
.
item_text_dizhi
,
item
.
getProvinceName
()
+
item
.
getCityName
()
+
item
.
getDistrictName
()
+
item
.
getAddress
());
}
}
}
}
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderThreeTabAdapter.java
View file @
83a71781
...
@@ -2,12 +2,19 @@ package com.dayu.bigfish.ui.adapter;
...
@@ -2,12 +2,19 @@ package com.dayu.bigfish.ui.adapter;
import
android.content.res.AssetManager
;
import
android.content.res.AssetManager
;
import
android.graphics.Typeface
;
import
android.graphics.Typeface
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.bean.ErrorOrder
;
import
com.dayu.bigfish.bean.ErrorOrder
;
import
com.dayu.bigfish.utils.DateUtils
;
import
com.dayu.bigfish.utils.DateUtils
;
import
com.dayu.bigfish.utils.UtilsDate
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
FORMAT_ONE
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
LONG_TIME_FORMAT_TWO
;
import
static
com
.
dayu
.
bigfish
.
utils
.
UtilsDate
.
SHORT_DATE_FORMAT
;
/**
/**
* 异常单列表的适配器
* 异常单列表的适配器
...
@@ -30,12 +37,24 @@ public class OrderThreeTabAdapter extends BaseQuickAdapter<ErrorOrder, BaseViewH
...
@@ -30,12 +37,24 @@ public class OrderThreeTabAdapter extends BaseQuickAdapter<ErrorOrder, BaseViewH
private
void
initData
(
BaseViewHolder
helper
,
ErrorOrder
item
)
{
private
void
initData
(
BaseViewHolder
helper
,
ErrorOrder
item
)
{
try
{
try
{
String
dateMD
=
mDateUtils
.
stringDateToDate
(
item
.
getCreateTime
());
if
(
TextUtils
.
isEmpty
(
item
.
getCreateTime
()))
{
String
dateTime
=
mDateUtils
.
stringTimeToDate
(
item
.
getCreateTime
());
helper
.
setText
(
R
.
id
.
item_tody
,
"无预期"
);
helper
.
getView
(
R
.
id
.
item_time
).
setVisibility
(
View
.
GONE
);
}
else
{
String
dateMD
=
UtilsDate
.
changeFormat
(
item
.
getCreateTime
(),
FORMAT_ONE
,
SHORT_DATE_FORMAT
);
String
dateTime
=
UtilsDate
.
changeFormat
(
item
.
getCreateTime
(),
FORMAT_ONE
,
LONG_TIME_FORMAT_TWO
);
if
(
UtilsDate
.
IsToday
(
item
.
getCreateTime
()))
{
helper
.
setText
(
R
.
id
.
item_tody
,
"今天"
);
}
else
if
(
UtilsDate
.
IsNextday
(
item
.
getCreateTime
()))
{
helper
.
setText
(
R
.
id
.
item_tody
,
"明天"
);
}
else
{
helper
.
setText
(
R
.
id
.
item_tody
,
dateMD
);
}
helper
.
setText
(
R
.
id
.
item_time
,
dateTime
);
helper
.
getView
(
R
.
id
.
item_time
).
setVisibility
(
View
.
VISIBLE
);
}
AssetManager
mgr
=
mContext
.
getAssets
();
AssetManager
mgr
=
mContext
.
getAssets
();
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
helper
.
setText
(
R
.
id
.
item_tody
,
dateMD
);
helper
.
setText
(
R
.
id
.
item_time
,
dateTime
);
helper
.
setTypeface
(
R
.
id
.
item_time
,
tf
);
helper
.
setTypeface
(
R
.
id
.
item_time
,
tf
);
helper
.
setText
(
R
.
id
.
item_text_weixiu_leixing
,
item
.
getCategoryName
());
helper
.
setText
(
R
.
id
.
item_text_weixiu_leixing
,
item
.
getCategoryName
());
helper
.
setText
(
R
.
id
.
item_text_weixiu
,
item
.
getProviderName
());
helper
.
setText
(
R
.
id
.
item_text_weixiu
,
item
.
getProviderName
());
...
...
app/src/main/java/com/dayu/bigfish/ui/adapter/ReceiveAdapter.java
deleted
100644 → 0
View file @
0f0b21cb
package
com
.
dayu
.
bigfish
.
ui
.
adapter
;
import
android.content.res.AssetManager
;
import
android.graphics.Typeface
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.utils.DateUtils
;
/**
* Created by luofan on 2017/11/16.
*/
public
class
ReceiveAdapter
extends
BaseQuickAdapter
<
Order
,
BaseViewHolder
>
{
private
DateUtils
dateUtils
=
new
DateUtils
();
public
ReceiveAdapter
(
int
layoutResId
)
{
super
(
layoutResId
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
Order
item
)
{
AssetManager
mgr
=
MyApplication
.
getContext
().
getAssets
();
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
try
{
String
dateMD
=
dateUtils
.
stringDateToDate
(
item
.
getCreateTime
());
String
dateTime
=
dateUtils
.
stringTimeToDate
(
item
.
getCreateTime
());
helper
.
setText
(
R
.
id
.
item_tody
,
dateMD
);
helper
.
setText
(
R
.
id
.
item_time
,
dateTime
);
helper
.
setTypeface
(
R
.
id
.
item_time
,
tf
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
helper
.
setText
(
R
.
id
.
item_text_weixiu
,
item
.
getProviderName
());
helper
.
setText
(
R
.
id
.
item_text_weixiu_leixing
,
item
.
getCategoryName
());
helper
.
setText
(
R
.
id
.
item_text_dizhi
,
item
.
getProvinceName
()
+
item
.
getCityName
()
+
item
.
getDistrictName
()
+
item
.
getAddress
());
helper
.
addOnClickListener
(
R
.
id
.
image_receiving
);
}
}
app/src/main/java/com/dayu/bigfish/ui/adapter/WorksheetAdapter.java
deleted
100755 → 0
View file @
0f0b21cb
package
com
.
dayu
.
bigfish
.
ui
.
adapter
;
import
android.content.res.AssetManager
;
import
android.graphics.Typeface
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.utils.DateUtils
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
/**
* 已完成工单的适配器
* on 2017/9/29.
*/
public
class
WorksheetAdapter
extends
BaseQuickAdapter
<
Order
,
WorksheetAdapter
.
WorksheetHolder
>
{
private
String
dateMD
=
null
;
private
String
dateTime
=
null
;
private
DateUtils
dateUtils
=
new
DateUtils
();
private
int
myOrderStatu
;
public
WorksheetAdapter
(
int
layoutResId
)
{
super
(
layoutResId
);
}
@Override
protected
void
convert
(
WorksheetHolder
holder
,
Order
item
)
{
try
{
dateMD
=
dateUtils
.
stringDateToDate
(
item
.
getCreateTime
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
holder
.
itemTody
.
setText
(
dateMD
);
try
{
dateTime
=
dateUtils
.
stringTimeToDate
(
item
.
getCreateTime
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
holder
.
itemTime
.
setText
(
dateTime
);
//服务类型
holder
.
itemTextWeixiu
.
setText
(
item
.
getProviderName
());
// 维修类型
holder
.
itemTextWeixiuLeixing
.
setText
(
item
.
getCategoryName
());
holder
.
itemTextUserPhone
.
setText
(
item
.
getCustomerMobile
());
holder
.
itemTextUserName
.
setText
(
item
.
getCustomerName
());
holder
.
itemTextDizhi
.
setText
(
item
.
getProvinceName
()
+
item
.
getCityName
()
+
item
.
getDistrictName
()
+
item
.
getAddress
());
myOrderStatu
=
item
.
getStatus
();
if
(
myOrderStatu
==
1
)
{
holder
.
orderTv
.
setText
(
"未接单"
);
}
else
if
(
myOrderStatu
==
2
)
{
holder
.
orderTv
.
setText
(
"未预约"
);
}
else
if
(
myOrderStatu
==
3
)
{
holder
.
orderTv
.
setText
(
"已预约"
);
}
else
if
(
myOrderStatu
==
4
)
{
holder
.
orderTv
.
setText
(
"进行中"
);
}
else
if
(
myOrderStatu
==
5
)
{
holder
.
orderTv
.
setText
(
"已完成"
);
}
else
if
(
myOrderStatu
==
6
)
{
holder
.
orderTv
.
setText
(
"已取消"
);
}
else
if
(
myOrderStatu
==
7
)
{
holder
.
orderTv
.
setText
(
"订单关闭"
);
}
}
public
class
WorksheetHolder
extends
BaseViewHolder
{
@BindView
(
R
.
id
.
item_line
)
ImageView
itemLine
;
@BindView
(
R
.
id
.
item_tody
)
TextView
itemTody
;
@BindView
(
R
.
id
.
item_time
)
TextView
itemTime
;
@BindView
(
R
.
id
.
item_text_user_name
)
TextView
itemTextUserName
;
@BindView
(
R
.
id
.
item_text_user_phone
)
TextView
itemTextUserPhone
;
@BindView
(
R
.
id
.
item_text_weixiu
)
TextView
itemTextWeixiu
;
@BindView
(
R
.
id
.
item_text_weixiu_leixing
)
TextView
itemTextWeixiuLeixing
;
@BindView
(
R
.
id
.
item_text_dizhi
)
TextView
itemTextDizhi
;
@BindView
(
R
.
id
.
order_tv
)
TextView
orderTv
;
@BindView
(
R
.
id
.
item
)
RelativeLayout
item
;
public
WorksheetHolder
(
View
itemView
)
{
super
(
itemView
);
ButterKnife
.
bind
(
this
,
itemView
);
AssetManager
mgr
=
mContext
.
getAssets
();
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
itemTime
.
setTypeface
(
tf
);
}
}
}
app/src/main/java/com/dayu/bigfish/ui/fragment/Home
SecondTab
Fragment.java
→
app/src/main/java/com/dayu/bigfish/ui/fragment/Home
Order
Fragment.java
View file @
83a71781
...
@@ -14,7 +14,6 @@ import android.widget.LinearLayout;
...
@@ -14,7 +14,6 @@ import android.widget.LinearLayout;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.ui.adapter.FragmentHomeAdapter
;
import
com.dayu.bigfish.base.BaseFragment
;
import
com.dayu.bigfish.base.BaseFragment
;
import
com.dayu.bigfish.bean.Tab
;
import
com.dayu.bigfish.bean.Tab
;
import
com.dayu.bigfish.presenter.homesecondtab.HomeSecondContract
;
import
com.dayu.bigfish.presenter.homesecondtab.HomeSecondContract
;
...
@@ -23,6 +22,7 @@ import com.dayu.bigfish.presenter.homesecondtab.HomeSecondPresenter;
...
@@ -23,6 +22,7 @@ import com.dayu.bigfish.presenter.homesecondtab.HomeSecondPresenter;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.ui.WorksRecordActivity
;
import
com.dayu.bigfish.ui.WorksRecordActivity
;
import
com.dayu.bigfish.ui.adapter.FragmentHomeAdapter
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.UtilsScreen
;
import
com.dayu.bigfish.utils.UtilsScreen
;
...
@@ -42,7 +42,7 @@ import static com.dayu.bigfish.R.id.tabicon;
...
@@ -42,7 +42,7 @@ import static com.dayu.bigfish.R.id.tabicon;
* Created by luofan on 2017/11/20.
* Created by luofan on 2017/11/20.
*/
*/
public
class
Home
SecondTab
Fragment
extends
BaseFragment
<
HomeSecondPresenter
,
HomeSecondModel
>
implements
HomeSecondContract
.
View
{
public
class
Home
Order
Fragment
extends
BaseFragment
<
HomeSecondPresenter
,
HomeSecondModel
>
implements
HomeSecondContract
.
View
{
@BindView
(
R
.
id
.
home_tabLayout
)
@BindView
(
R
.
id
.
home_tabLayout
)
TabLayout
homeTabLayout
;
TabLayout
homeTabLayout
;
@BindView
(
R
.
id
.
view_pager
)
@BindView
(
R
.
id
.
view_pager
)
...
@@ -58,21 +58,16 @@ public class HomeSecondTabFragment extends BaseFragment<HomeSecondPresenter, Hom
...
@@ -58,21 +58,16 @@ public class HomeSecondTabFragment extends BaseFragment<HomeSecondPresenter, Hom
private
TextView
mTabTextTv
;
private
TextView
mTabTextTv
;
private
int
mSelectedTab
;
private
int
mSelectedTab
;
private
boolean
isFirstAddTab
=
true
;
private
boolean
isFirstAddTab
=
true
;
public
final
static
int
SUBCRIBE_TIME
=
0
;
//预约上门时间
public
final
static
int
SUBCRIBE_TIME
=
2
;
//预约上门时间
public
final
static
int
MODIFY_TIME
=
1
;
//修改预约时间
public
final
static
int
ORDER_YUYUE
=
3
;
//修改预约时间
public
final
static
int
UPDOOR_TIME
=
2
;
//再次上门时间
public
final
static
int
ORDER_DOING
=
4
;
//再次上门时间
public
final
static
int
ORDER_FINISH
=
3
;
public
final
static
int
ORDER_FINISH
=
5
;
//已完成
public
final
static
int
TAB_ONE
=
0
;
public
final
static
int
TAB_TWO
=
1
;
public
final
static
int
TAB_THREE
=
2
;
public
final
static
int
TAB_FOUR
=
3
;
private
int
mTabIndex
;
private
int
mTabIndex
;
private
Activity
mActivity
;
private
Activity
mActivity
;
public
static
Home
SecondTab
Fragment
newInstance
()
{
public
static
Home
Order
Fragment
newInstance
()
{
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
Home
SecondTabFragment
fragment
=
new
HomeSecondTab
Fragment
();
Home
OrderFragment
fragment
=
new
HomeOrder
Fragment
();
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
return
fragment
;
return
fragment
;
}
}
...
...
app/src/main/java/com/dayu/bigfish/ui/fragment/Home
FourTab
Fragment.java
→
app/src/main/java/com/dayu/bigfish/ui/fragment/Home
Person
Fragment.java
View file @
83a71781
...
@@ -45,7 +45,7 @@ import butterknife.OnClick;
...
@@ -45,7 +45,7 @@ import butterknife.OnClick;
* Created by luofan on 2017/11/20.
* Created by luofan on 2017/11/20.
*/
*/
public
class
Home
FourTab
Fragment
extends
BaseFragment
<
HomeFourPresenter
,
HomeFourModel
>
implements
HomeFourContract
.
View
{
public
class
Home
Person
Fragment
extends
BaseFragment
<
HomeFourPresenter
,
HomeFourModel
>
implements
HomeFourContract
.
View
{
@BindView
(
R
.
id
.
person_circle
)
@BindView
(
R
.
id
.
person_circle
)
CircleImageView
personCircle
;
CircleImageView
personCircle
;
@BindView
(
R
.
id
.
person_name
)
@BindView
(
R
.
id
.
person_name
)
...
@@ -80,9 +80,9 @@ public class HomeFourTabFragment extends BaseFragment<HomeFourPresenter, HomeFou
...
@@ -80,9 +80,9 @@ public class HomeFourTabFragment extends BaseFragment<HomeFourPresenter, HomeFou
private
String
evaluate
;
private
String
evaluate
;
private
int
mAccountBalance
;
private
int
mAccountBalance
;
public
static
Home
FourTab
Fragment
newInstance
()
{
public
static
Home
Person
Fragment
newInstance
()
{
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
Home
FourTabFragment
fragment
=
new
HomeFourTab
Fragment
();
Home
PersonFragment
fragment
=
new
HomePerson
Fragment
();
fragment
.
setArguments
(
args
);
fragment
.
setArguments
(
args
);
return
fragment
;
return
fragment
;
}
}
...
...
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderFirstTabFragment.java
View file @
83a71781
...
@@ -10,7 +10,6 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
...
@@ -10,7 +10,6 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.ui.adapter.OrderFirstTabAdapter
;
import
com.dayu.bigfish.base.BaseFragment
;
import
com.dayu.bigfish.base.BaseFragment
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.bean.Order
;
...
@@ -21,6 +20,7 @@ import com.dayu.bigfish.rxbus.RefreshReceivingNum;
...
@@ -21,6 +20,7 @@ import com.dayu.bigfish.rxbus.RefreshReceivingNum;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.ui.OrderDetailsActivity
;
import
com.dayu.bigfish.ui.OrderDetailsActivity
;
import
com.dayu.bigfish.ui.adapter.OrderDoingAdapter
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ProgressUtil
;
...
@@ -38,7 +38,7 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
...
@@ -38,7 +38,7 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
SwipeRefreshLayout
mRefreshLayout
;
SwipeRefreshLayout
mRefreshLayout
;
@BindView
(
R
.
id
.
recyle_tab_one
)
@BindView
(
R
.
id
.
recyle_tab_one
)
RecyclerView
mRecyclerView
;
RecyclerView
mRecyclerView
;
private
Order
FirstTab
Adapter
mAdapter
;
private
Order
Doing
Adapter
mAdapter
;
private
int
siteId
=
GetUserInfo
.
getSITE_ID
(
MyApplication
.
getContext
());
private
int
siteId
=
GetUserInfo
.
getSITE_ID
(
MyApplication
.
getContext
());
private
int
userId
=
GetUserInfo
.
getACCOUNT_ID
(
MyApplication
.
getContext
());
private
int
userId
=
GetUserInfo
.
getACCOUNT_ID
(
MyApplication
.
getContext
());
private
int
mTotalPage
;
private
int
mTotalPage
;
...
@@ -49,7 +49,7 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
...
@@ -49,7 +49,7 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
@Override
@Override
public
View
initView
(
View
view
)
{
public
View
initView
(
View
view
)
{
mAdapter
=
new
Order
FirstTabAdapter
(
R
.
layout
.
activity_listview_item
);
mAdapter
=
new
Order
DoingAdapter
(
R
.
layout
.
fragment_orderdoing_item
,
getActivity
()
);
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mRecyclerView
.
setAdapter
(
mAdapter
);
mRecyclerView
.
setAdapter
(
mAdapter
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
...
@@ -62,7 +62,7 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
...
@@ -62,7 +62,7 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
@Override
@Override
protected
void
lazyLoad
()
{
protected
void
lazyLoad
()
{
ProgressUtil
.
startLoad
(
mContext
);
ProgressUtil
.
startLoad
(
mContext
);
mPresenter
.
getWatingOrder
(
Constants
.
APPOIMENT_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
APPOIMENT_ORDER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
@Override
@Override
...
@@ -78,9 +78,18 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
...
@@ -78,9 +78,18 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
@Override
@Override
public
void
accept
(
RefreshReceivingNum
refreshReceivingNum
)
throws
Exception
{
public
void
accept
(
RefreshReceivingNum
refreshReceivingNum
)
throws
Exception
{
ProgressUtil
.
startLoad
(
mContext
);
ProgressUtil
.
startLoad
(
mContext
);
mPresenter
.
getWatingOrder
(
Constants
.
APPOIMENT_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
APPOIMENT_ORDER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
});
});
mAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
Order
order
=
(
Order
)
adapter
.
getItem
(
position
);
Intent
intent
=
new
Intent
(
mContext
,
OrderDetailsActivity
.
class
);
intent
.
putExtra
(
"orderId"
,
order
.
getId
()
+
""
);
startActivity
(
intent
);
}
});
mAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
mAdapter
.
setOnItemChildClickListener
(
new
BaseQuickAdapter
.
OnItemChildClickListener
()
{
@Override
@Override
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemChildClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
...
@@ -97,7 +106,7 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
...
@@ -97,7 +106,7 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
RxBus
.
getDefault
().
post
(
new
RefreshTabNum
(-
1
));
RxBus
.
getDefault
().
post
(
new
RefreshTabNum
(-
1
));
mTotalPage
=
data
.
getTotalPages
();
mTotalPage
=
data
.
getTotalPages
();
mPageSize
=
data
.
getPageSize
();
mPageSize
=
data
.
getPageSize
();
if
(
data
.
getData
()
!=
null
&&
data
.
getData
().
size
()
!=
0
)
{
if
(
data
.
getData
()
!=
null
&&
data
.
getData
().
size
()
!=
0
)
{
if
(
mRefreshState
==
1
)
{
if
(
mRefreshState
==
1
)
{
mRefreshLayout
.
setRefreshing
(
false
);
mRefreshLayout
.
setRefreshing
(
false
);
mAdapter
.
setNewData
(
data
.
getData
());
mAdapter
.
setNewData
(
data
.
getData
());
...
@@ -129,13 +138,13 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
...
@@ -129,13 +138,13 @@ public class OrderFirstTabFragment extends BaseFragment<OrderTabPresenter, Order
public
void
onRefresh
()
{
public
void
onRefresh
()
{
mRefreshState
=
1
;
mRefreshState
=
1
;
mPage
=
1
;
mPage
=
1
;
mPresenter
.
getWatingOrder
(
Constants
.
APPOIMENT_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
APPOIMENT_ORDER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
@Override
@Override
public
void
onLoadMoreRequested
()
{
public
void
onLoadMoreRequested
()
{
mRefreshState
=
2
;
mRefreshState
=
2
;
mPresenter
.
getWatingOrder
(
Constants
.
APPOIMENT_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
APPOIMENT_ORDER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderFourTabFragment.java
View file @
83a71781
...
@@ -10,7 +10,6 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
...
@@ -10,7 +10,6 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.ui.adapter.OrderFourTabAdapter
;
import
com.dayu.bigfish.base.BaseFragment
;
import
com.dayu.bigfish.base.BaseFragment
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.bean.Order
;
...
@@ -20,6 +19,7 @@ import com.dayu.bigfish.presenter.ordertab.OrderTabPresenter;
...
@@ -20,6 +19,7 @@ import com.dayu.bigfish.presenter.ordertab.OrderTabPresenter;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.ui.OrderDetailsActivity
;
import
com.dayu.bigfish.ui.OrderDetailsActivity
;
import
com.dayu.bigfish.ui.adapter.OrderFourTabAdapter
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ProgressUtil
;
...
@@ -46,7 +46,7 @@ public class OrderFourTabFragment extends BaseFragment<OrderTabPresenter, OrderT
...
@@ -46,7 +46,7 @@ public class OrderFourTabFragment extends BaseFragment<OrderTabPresenter, OrderT
@Override
@Override
public
View
initView
(
View
view
)
{
public
View
initView
(
View
view
)
{
mAdapter
=
new
OrderFourTabAdapter
(
R
.
layout
.
fragment_
tabend
_item
);
mAdapter
=
new
OrderFourTabAdapter
(
R
.
layout
.
fragment_
order_cancle
_item
);
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mRecyclerView
.
setAdapter
(
mAdapter
);
mRecyclerView
.
setAdapter
(
mAdapter
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
...
@@ -68,7 +68,7 @@ public class OrderFourTabFragment extends BaseFragment<OrderTabPresenter, OrderT
...
@@ -68,7 +68,7 @@ public class OrderFourTabFragment extends BaseFragment<OrderTabPresenter, OrderT
protected
void
initData
()
{
protected
void
initData
()
{
ProgressUtil
.
startLoad
(
mContext
);
ProgressUtil
.
startLoad
(
mContext
);
mPresenter
.
getWatingOrder
(
Constants
.
CANCLE_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
CANCLE_ORDER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
public
void
initListener
()
{
public
void
initListener
()
{
...
@@ -118,12 +118,12 @@ public class OrderFourTabFragment extends BaseFragment<OrderTabPresenter, OrderT
...
@@ -118,12 +118,12 @@ public class OrderFourTabFragment extends BaseFragment<OrderTabPresenter, OrderT
public
void
onRefresh
()
{
public
void
onRefresh
()
{
mRefreshState
=
1
;
mRefreshState
=
1
;
mPage
=
1
;
mPage
=
1
;
mPresenter
.
getWatingOrder
(
Constants
.
CANCLE_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
CANCLE_ORDER
,
siteId
,
userId
,
mPage
,
mPageSize
);
}
}
@Override
@Override
public
void
onLoadMoreRequested
()
{
public
void
onLoadMoreRequested
()
{
mRefreshState
=
2
;
mRefreshState
=
2
;
mPresenter
.
getWatingOrder
(
Constants
.
CANCLE_ORDER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
CANCLE_ORDER
,
siteId
,
userId
,
mPage
,
mPageSize
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderSecondTabFragment.java
View file @
83a71781
...
@@ -10,7 +10,6 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
...
@@ -10,7 +10,6 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.ui.adapter.OrderSecondTabAdapter
;
import
com.dayu.bigfish.base.BaseFragment
;
import
com.dayu.bigfish.base.BaseFragment
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.base.BasePageBean
;
import
com.dayu.bigfish.bean.Order
;
import
com.dayu.bigfish.bean.Order
;
...
@@ -21,6 +20,7 @@ import com.dayu.bigfish.rxbus.OrderState;
...
@@ -21,6 +20,7 @@ import com.dayu.bigfish.rxbus.OrderState;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RefreshTabNum
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.rxbus.RxBus
;
import
com.dayu.bigfish.ui.OrderDetailsActivity
;
import
com.dayu.bigfish.ui.OrderDetailsActivity
;
import
com.dayu.bigfish.ui.adapter.OrderDoingAdapter
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.GetUserInfo
;
import
com.dayu.bigfish.utils.ProgressUtil
;
import
com.dayu.bigfish.utils.ProgressUtil
;
...
@@ -31,8 +31,8 @@ import butterknife.BindView;
...
@@ -31,8 +31,8 @@ import butterknife.BindView;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.functions.Consumer
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
SecondTabFragment
.
MODIFY_TIM
E
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
OrderFragment
.
ORDER_YUYU
E
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
SecondTab
Fragment
.
ORDER_FINISH
;
import
static
com
.
dayu
.
bigfish
.
ui
.
fragment
.
Home
Order
Fragment
.
ORDER_FINISH
;
/**
/**
...
@@ -45,18 +45,19 @@ public class OrderSecondTabFragment extends BaseFragment<OrderTwoTabPresenter, O
...
@@ -45,18 +45,19 @@ public class OrderSecondTabFragment extends BaseFragment<OrderTwoTabPresenter, O
SwipeRefreshLayout
mRefreshLayout
;
SwipeRefreshLayout
mRefreshLayout
;
@BindView
(
R
.
id
.
recyle_tab_one
)
@BindView
(
R
.
id
.
recyle_tab_one
)
RecyclerView
mRecyclerView
;
RecyclerView
mRecyclerView
;
private
Order
SecondTab
Adapter
mAdapter
;
private
Order
Doing
Adapter
mAdapter
;
private
int
siteId
=
GetUserInfo
.
getSITE_ID
(
MyApplication
.
getContext
());
private
int
siteId
=
GetUserInfo
.
getSITE_ID
(
MyApplication
.
getContext
());
private
int
userId
=
GetUserInfo
.
getACCOUNT_ID
(
MyApplication
.
getContext
());
private
int
userId
=
GetUserInfo
.
getACCOUNT_ID
(
MyApplication
.
getContext
());
private
int
mTotalPage
;
private
int
mTotalPage
;
private
int
mPageSize
=
10
;
private
int
mPageSize
=
5
;
private
int
mPage
=
1
;
private
int
mPage
=
1
;
private
int
mRefreshState
=
1
;
//1:刷新,private int mRefreshState;
private
int
mRefreshState
=
1
;
//1:刷新,private int mRefreshState;
private
List
<
Order
>
mDatas
;
private
List
<
Order
>
mDatas
;
@Override
@Override
public
View
initView
(
View
view
)
{
public
View
initView
(
View
view
)
{
mAdapter
=
new
OrderSecondTabAdapter
(
R
.
layout
.
fragment_tabtwo_item
,
mPresenter
);
mAdapter
=
new
OrderDoingAdapter
(
R
.
layout
.
fragment_orderdoing_item
,
getActivity
());
mAdapter
.
initPresenter
(
mPresenter
);
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mRecyclerView
.
setAdapter
(
mAdapter
);
mRecyclerView
.
setAdapter
(
mAdapter
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
...
@@ -88,7 +89,7 @@ public class OrderSecondTabFragment extends BaseFragment<OrderTwoTabPresenter, O
...
@@ -88,7 +89,7 @@ public class OrderSecondTabFragment extends BaseFragment<OrderTwoTabPresenter, O
@Override
@Override
public
void
accept
(
OrderState
orderState
)
throws
Exception
{
public
void
accept
(
OrderState
orderState
)
throws
Exception
{
Order
order
=
mDatas
.
get
(
orderState
.
getPosition
());
Order
order
=
mDatas
.
get
(
orderState
.
getPosition
());
if
(
orderState
.
getState
()
==
MODIFY_TIM
E
)
{
if
(
orderState
.
getState
()
==
ORDER_YUYU
E
)
{
order
.
setSubStatus
(
1
);
order
.
setSubStatus
(
1
);
order
.
setStatus
(
3
);
order
.
setStatus
(
3
);
}
else
if
(
orderState
.
getState
()
==
ORDER_FINISH
)
{
}
else
if
(
orderState
.
getState
()
==
ORDER_FINISH
)
{
...
@@ -109,7 +110,7 @@ public class OrderSecondTabFragment extends BaseFragment<OrderTwoTabPresenter, O
...
@@ -109,7 +110,7 @@ public class OrderSecondTabFragment extends BaseFragment<OrderTwoTabPresenter, O
@Override
@Override
protected
void
lazyLoad
()
{
protected
void
lazyLoad
()
{
ProgressUtil
.
startLoad
(
mContext
);
ProgressUtil
.
startLoad
(
mContext
);
mPresenter
.
getWatingOrder
(
Constants
.
WATING_SERVER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
WATING_SERVER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
@Override
@Override
...
@@ -153,12 +154,12 @@ public class OrderSecondTabFragment extends BaseFragment<OrderTwoTabPresenter, O
...
@@ -153,12 +154,12 @@ public class OrderSecondTabFragment extends BaseFragment<OrderTwoTabPresenter, O
public
void
onRefresh
()
{
public
void
onRefresh
()
{
mRefreshState
=
1
;
mRefreshState
=
1
;
mPage
=
1
;
mPage
=
1
;
mPresenter
.
getWatingOrder
(
Constants
.
WATING_SERVER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
WATING_SERVER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
@Override
@Override
public
void
onLoadMoreRequested
()
{
public
void
onLoadMoreRequested
()
{
mRefreshState
=
2
;
mRefreshState
=
2
;
mPresenter
.
getWatingOrder
(
Constants
.
WATING_SERVER
,
mPage
,
mPageSize
,
siteId
,
userId
);
mPresenter
.
getWatingOrder
(
Constants
.
WATING_SERVER
,
userId
,
siteId
,
mPage
,
mPageSize
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderThreeTabFragment.java
View file @
83a71781
...
@@ -43,7 +43,7 @@ public class OrderThreeTabFragment extends BaseFragment<OrderErrorTabPresenter,
...
@@ -43,7 +43,7 @@ public class OrderThreeTabFragment extends BaseFragment<OrderErrorTabPresenter,
@Override
@Override
public
View
initView
(
View
view
)
{
public
View
initView
(
View
view
)
{
mAdapter
=
new
OrderThreeTabAdapter
(
R
.
layout
.
fragment_
tabthree
_item
);
mAdapter
=
new
OrderThreeTabAdapter
(
R
.
layout
.
fragment_
order_error
_item
);
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mRecyclerView
.
setAdapter
(
mAdapter
);
mRecyclerView
.
setAdapter
(
mAdapter
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
mAdapter
.
disableLoadMoreIfNotFullPage
(
mRecyclerView
);
...
...
app/src/main/java/com/dayu/bigfish/utils/LocationUtils.java
View file @
83a71781
...
@@ -85,6 +85,9 @@ public class LocationUtils {
...
@@ -85,6 +85,9 @@ public class LocationUtils {
}
else
{
}
else
{
//获取定位数据失败
//获取定位数据失败
ToastUtils
.
showShortToast
(
"获取定位失败"
);
ToastUtils
.
showShortToast
(
"获取定位失败"
);
location
.
setLatitude
(
0
);
location
.
setLongitude
(
0
);
listener
.
result
(
location
);
mlocationClient
.
stopLocation
();
mlocationClient
.
stopLocation
();
}
}
}
}
...
...
app/src/main/java/com/dayu/bigfish/utils/UtilsDate.java
View file @
83a71781
...
@@ -13,6 +13,7 @@ import java.text.SimpleDateFormat;
...
@@ -13,6 +13,7 @@ import java.text.SimpleDateFormat;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.GregorianCalendar
;
import
java.util.GregorianCalendar
;
import
java.util.Locale
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
@SuppressLint
(
"SimpleDateFormat"
)
@SuppressLint
(
"SimpleDateFormat"
)
...
@@ -294,7 +295,6 @@ public class UtilsDate {
...
@@ -294,7 +295,6 @@ public class UtilsDate {
/**
/**
* 比较指定日期与当前日期的差
* 比较指定日期与当前日期的差
*
*
* @param befor
* @param after
* @param after
* @return
* @return
*/
*/
...
@@ -1511,4 +1511,69 @@ public class UtilsDate {
...
@@ -1511,4 +1511,69 @@ public class UtilsDate {
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
return
format
.
format
(
date
);
return
format
.
format
(
date
);
}
}
/**
* 判断是否为今天(效率比较高)
*
* @param day 传入的 时间 "2016-06-28 10:10:30" "2016-06-28" 都可以
* @return true今天 false不是
* @throws ParseException
*/
public
static
boolean
IsToday
(
String
day
)
throws
ParseException
{
Calendar
pre
=
Calendar
.
getInstance
();
Date
predate
=
new
Date
(
System
.
currentTimeMillis
());
pre
.
setTime
(
predate
);
Calendar
cal
=
Calendar
.
getInstance
();
Date
date
=
getDateFormat
().
parse
(
day
);
cal
.
setTime
(
date
);
if
(
cal
.
get
(
Calendar
.
YEAR
)
==
(
pre
.
get
(
Calendar
.
YEAR
)))
{
int
diffDay
=
cal
.
get
(
Calendar
.
DAY_OF_YEAR
)
-
pre
.
get
(
Calendar
.
DAY_OF_YEAR
);
if
(
diffDay
==
0
)
{
return
true
;
}
}
return
false
;
}
/**
* 判断是否为明天(效率比较高)
*
* @param day 传入的 时间 "2016-06-28 10:10:30" "2016-06-28" 都可以
* @return true今天 false不是
* @throws ParseException
*/
public
static
boolean
IsNextday
(
String
day
)
throws
ParseException
{
Calendar
pre
=
Calendar
.
getInstance
();
Date
predate
=
new
Date
(
System
.
currentTimeMillis
());
pre
.
setTime
(
predate
);
Calendar
cal
=
Calendar
.
getInstance
();
Date
date
=
getDateFormat
().
parse
(
day
);
cal
.
setTime
(
date
);
if
(
cal
.
get
(
Calendar
.
YEAR
)
==
(
pre
.
get
(
Calendar
.
YEAR
)))
{
int
diffDay
=
cal
.
get
(
Calendar
.
DAY_OF_YEAR
)
-
pre
.
get
(
Calendar
.
DAY_OF_YEAR
);
if
(
diffDay
==
1
)
{
return
true
;
}
}
return
false
;
}
public
static
SimpleDateFormat
getDateFormat
()
{
if
(
null
==
DateLocal
.
get
())
{
DateLocal
.
set
(
new
SimpleDateFormat
(
"yyyy-MM-dd"
,
Locale
.
CHINA
));
}
return
DateLocal
.
get
();
}
private
static
ThreadLocal
<
SimpleDateFormat
>
DateLocal
=
new
ThreadLocal
<
SimpleDateFormat
>();
}
}
app/src/main/res/layout/activity_home.xml
View file @
83a71781
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
android:id=
"@+id/title_right"
android:id=
"@+id/title_right"
style=
"@style/title_right_text"
style=
"@style/title_right_text"
android:text=
"@string/order_history"
android:text=
"@string/order_history"
android:textSize=
"@dimen/dp_13.3"
android:textColor=
"#3faafc"
android:textColor=
"#3faafc"
/>
/>
</RelativeLayout>
</RelativeLayout>
...
...
app/src/main/res/layout/activity_list.xml
deleted
100755 → 0
View file @
0f0b21cb
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/item"
android:layout_width=
"@dimen/dp_333"
android:layout_height=
"@dimen/dp_133"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"13dp"
android:background=
"@drawable/item_shape"
>
<ImageView
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"@dimen/size_order_item_line_height"
android:layout_marginLeft=
"220dp"
android:background=
"@color/cl_order_item_line_bg"
/>
<TextView
android:id=
"@+id/item_tody"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignLeft=
"@id/item_line"
android:layout_marginLeft=
"@dimen/size_order_item_time_mr"
android:layout_marginTop=
"@dimen/size_order_item_time_mt"
android:text=
"@string/tv_order_item_time"
android:textSize=
"@dimen/size_order_item_time_text"
/>
<TextView
android:id=
"@+id/item_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignLeft=
"@+id/item_tody"
android:layout_alignStart=
"@+id/item_tody"
android:layout_below=
"@id/item_tody"
android:text=
"@string/tv_order_item_date"
android:textSize=
"@dimen/size_order_item_data_text"
/>
<TextView
android:id=
"@+id/item_text_user_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_18"
android:layout_marginTop=
"@dimen/dp_18"
android:ellipsize=
"end"
android:maxEms=
"5"
android:maxLines=
"1"
android:text=
"我是谁"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_16"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/item_text_user_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_9"
android:layout_marginTop=
"@dimen/dp_23"
android:layout_toRightOf=
"@id/item_text_user_name"
android:text=
"@string/tv_order_item_user_phone"
android:textColor=
"@color/cl_tab_init"
android:textSize=
"@dimen/sp_12"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/item_text_weixiu_leixing"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_18"
android:layout_marginTop=
"43dp"
android:drawableLeft=
"@mipmap/shouye_liebiao_weixiu_icon"
android:drawablePadding=
"5dp"
android:text=
"安装"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/item_text_weixiu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"43dp"
android:layout_toRightOf=
"@+id/item_text_weixiu_leixing"
android:ellipsize=
"end"
android:maxEms=
"10"
android:maxLines=
"1"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/item_text_dizhi"
android:layout_width=
"200dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_18"
android:layout_marginTop=
"67dp"
android:drawableLeft=
"@mipmap/shouye_liebiao_dizhi_icon"
android:drawablePadding=
"5dp"
android:ellipsize=
"end"
android:maxLines=
"2"
android:text=
"@string/tv_order_item_gps_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/order_tv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@+id/item_text_dizhi"
android:layout_alignEnd=
"@+id/item_time"
android:layout_alignLeft=
"@+id/item_time"
android:layout_alignRight=
"@+id/item_time"
android:layout_alignStart=
"@+id/item_time"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
""
/>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/activity_listview_item.xml
deleted
100755 → 0
View file @
0f0b21cb
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/item"
android:layout_width=
"@dimen/dp_333"
android:layout_height=
"@dimen/dp_160"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"13dp"
android:background=
"@drawable/item_shape"
>
<ImageView
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"@dimen/size_order_item_line_height"
android:layout_marginLeft=
"@dimen/size_order_item_line_ml"
android:background=
"@color/cl_order_item_line_bg"
/>
<TextView
android:id=
"@+id/item_tody"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/item_line"
android:layout_marginRight=
"@dimen/size_order_item_time_mr"
android:layout_marginTop=
"@dimen/size_order_item_time_mt"
android:text=
"@string/tv_order_item_time"
android:textColor=
"@color/cl_order_item_date"
android:textSize=
"@dimen/size_order_item_time_text"
/>
<TextView
android:id=
"@+id/item_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/item_line"
android:layout_below=
"@id/item_tody"
android:layout_marginRight=
"@dimen/size_order_item_data_mr"
android:text=
"@string/tv_order_item_date"
android:textColor=
"@color/cl_order_item_date"
android:textSize=
"@dimen/size_order_item_data_text"
/>
<ImageView
android:id=
"@+id/item_image_user"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginTop=
"@dimen/size_order_item_tool_mt"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_user_icon"
/>
<TextView
android:id=
"@+id/item_text_user_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:layout_marginTop=
"19dp"
android:layout_toRightOf=
"@id/item_image_user"
android:text=
"@string/tv_order_item_user_name"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/item_text_user_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:layout_marginTop=
"19dp"
android:layout_toRightOf=
"@id/item_text_user_name"
android:text=
"@string/tv_order_item_user_phone"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/item_image_weixiu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginTop=
"46dp"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_weixiu_icon"
/>
<ImageView
android:id=
"@+id/item_image_dizhi"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_gps_ml"
android:layout_marginTop=
"71dp"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_dizhi_icon"
/>
<TextView
android:id=
"@+id/item_text_weixiu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:layout_marginTop=
"43dp"
android:layout_toRightOf=
"@id/item_image_weixiu"
android:text=
"@string/tv_order_item_tool_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/text_line"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"43dp"
android:layout_toRightOf=
"@id/item_text_weixiu"
android:text=
" -- "
/>
<TextView
android:id=
"@+id/item_text_weixiu_leixing"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"43dp"
android:layout_toRightOf=
"@id/text_line"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/item_text_dizhi"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_gpstext_ml"
android:layout_marginTop=
"67dp"
android:layout_toRightOf=
"@id/item_image_dizhi"
android:text=
"@string/tv_order_item_gps_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"@dimen/dp_333"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/item"
android:layout_centerHorizontal=
"true"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/item_text_phone"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:background=
"@drawable/btn_left_selector"
android:gravity=
"center"
android:text=
"@string/tv_home_tab_one_phone"
android:textColor=
"@color/cl_white"
android:textSize=
"@dimen/sp_15"
/>
<ImageView
android:layout_width=
"@dimen/dp_0.7"
android:layout_height=
"match_parent"
android:background=
"@color/cl_home_button"
/>
<TextView
android:id=
"@+id/item_text_time"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:background=
"@drawable/btn_right_selector"
android:gravity=
"center"
android:text=
"@string/tv_home_tab_one_subscribe_time"
android:textColor=
"@color/cl_white"
android:textSize=
"@dimen/sp_15"
/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/activity_receiving_item.xml
deleted
100755 → 0
View file @
0f0b21cb
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/item"
android:layout_width=
"333dp"
android:layout_height=
"100dp"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"13dp"
android:background=
"@drawable/item_shape"
>
<ImageView
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"@dimen/size_order_item_line_height"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"@dimen/size_order_item_line_ml"
android:background=
"@color/cl_order_item_line_bg"
/>
<TextView
android:id=
"@+id/item_tody"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/item_line"
android:layout_marginRight=
"@dimen/size_order_item_time_mr"
android:layout_marginTop=
"@dimen/size_order_item_time_mt"
android:text=
"@string/tv_order_item_time"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/size_order_item_time_text"
/>
<TextView
android:id=
"@+id/item_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/item_line"
android:layout_below=
"@id/item_tody"
android:layout_marginRight=
"@dimen/size_order_item_data_mr"
android:text=
"@string/tv_order_item_date"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/size_order_item_data_text"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/item_image_weixiu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginTop=
"@dimen/size_order_item_tool_mt"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_weixiu_icon"
/>
<ImageView
android:id=
"@+id/item_image_dizhi"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_gps_ml"
android:layout_marginTop=
"@dimen/size_order_item_gps_mt"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_dizhi_icon"
/>
<TextView
android:id=
"@+id/item_text_weixiu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:layout_marginTop=
"@dimen/size_order_item_tooltext_mt"
android:layout_toRightOf=
"@id/item_image_weixiu"
android:text=
"@string/tv_order_item_tool_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/text_line"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_order_item_tooltext_mt"
android:layout_toRightOf=
"@id/item_text_weixiu"
android:text=
" -- "
/>
<TextView
android:id=
"@+id/item_text_weixiu_leixing"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_order_item_tooltext_mt"
android:layout_toRightOf=
"@id/text_line"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/item_text_dizhi"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_gpstext_ml"
android:layout_marginTop=
"@dimen/size_order_item_gpstext_mt"
android:layout_toRightOf=
"@id/item_image_dizhi"
android:text=
"@string/tv_order_item_gps_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:elevation=
"4dp"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_receiving"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/dp_105"
android:translationZ=
"10dp"
android:elevation=
"4dp"
android:background=
"@drawable/receiving_image_selector"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/empty_type.xml
deleted
100755 → 0
View file @
0f0b21cb
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/icon"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:scaleType=
"centerInside"
android:src=
"@mipmap/nomessage"
/>
<TextView
android:id=
"@+id/description"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"6dp"
android:text=
"暂无数据"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_order_cancle_item.xml
0 → 100755
View file @
83a71781
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_13.3"
android:background=
"@drawable/item_shape"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_marginBottom=
"@dimen/dp_13.3"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_order_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"25.3dp"
android:layout_marginTop=
"@dimen/dp_16.7"
android:text=
"预约时间"
android:textColor=
"@color/cl_order_item_line_bg"
android:textSize=
"13.3sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/item_tody"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"5.7dp"
android:text=
"@string/tv_order_item_time"
android:textColor=
"@color/cl_order_item_line_bg"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:id=
"@+id/item_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:text=
"@string/tv_order_item_date"
android:textColor=
"@color/cl_order_item_line_bg"
android:textSize=
"@dimen/size_order_item_data_text"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"13.3dp"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"@dimen/dp_21.3"
android:background=
"@color/cl_order_item_line_bg"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"9.3dp"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/item_text_weixiu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_16.7"
android:ellipsize=
"end"
android:maxEms=
"3"
android:maxLines=
"1"
android:text=
"@string/tv_order_item_tool_text"
android:textColor=
"@color/cl_order_item_line_bg"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/text_line"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_16.7"
android:text=
" - "
android:textColor=
"@color/cl_order_item_line_bg"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/item_text_weixiu_leixing"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_16.7"
android:ellipsize=
"end"
android:maxEms=
"7"
android:maxLines=
"1"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:textColor=
"@color/cl_order_item_line_bg"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
/>
</LinearLayout>
<TextView
android:id=
"@+id/error_state"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"@dimen/dp_16.7"
android:textColor=
"@color/cl_order_item_line_bg"
android:textSize=
"@dimen/size_login_hint_text"
android:visibility=
"visible"
/>
</LinearLayout>
<TextView
android:id=
"@+id/item_text_dizhi"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"13.3dp"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginRight=
"40dp"
android:layout_marginTop=
"10dp"
android:ellipsize=
"end"
android:maxLines=
"2"
android:text=
"@string/tv_order_item_gps_text"
android:textColor=
"@color/cl_order_item_line_bg"
android:textSize=
"@dimen/size_login_hint_text"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_order_
layout
.xml
→
app/src/main/res/layout/fragment_order_
error_item
.xml
View file @
83a71781
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
180dp
"
android:layout_height=
"
wrap_content
"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_13.3"
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:layout_marginBottom=
"@dimen/dp_13.3"
>
>
<LinearLayout
<LinearLayout
...
@@ -41,7 +42,7 @@
...
@@ -41,7 +42,7 @@
android:layout_gravity=
"right"
android:layout_gravity=
"right"
android:layout_marginTop=
"5.7dp"
android:layout_marginTop=
"5.7dp"
android:text=
"@string/tv_order_item_time"
android:text=
"@string/tv_order_item_time"
android:textColor=
"@color/cl_
receiving_order_item_data
"
android:textColor=
"@color/cl_
tab_read
"
android:textSize=
"@dimen/sp_13.3"
/>
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
<TextView
...
@@ -50,7 +51,7 @@
...
@@ -50,7 +51,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_gravity=
"right"
android:text=
"@string/tv_order_item_date"
android:text=
"@string/tv_order_item_date"
android:textColor=
"@color/cl_
receiving_order_item_data
"
android:textColor=
"@color/cl_
tab_read
"
android:textSize=
"@dimen/size_order_item_data_text"
/>
android:textSize=
"@dimen/size_order_item_data_text"
/>
</LinearLayout>
</LinearLayout>
...
@@ -58,14 +59,16 @@
...
@@ -58,14 +59,16 @@
<ImageView
<ImageView
android:id=
"@+id/item_line"
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"@dimen/size_order_item_line_height"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"13.3dp"
android:layout_marginLeft=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"@dimen/dp_21.3"
android:layout_marginTop=
"@dimen/dp_21.3"
android:background=
"@color/cl_order_item_line_bg"
/>
android:background=
"@color/cl_order_item_line_bg"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"9.3dp"
android:orientation=
"vertical"
android:orientation=
"vertical"
>
>
...
@@ -87,6 +90,9 @@
...
@@ -87,6 +90,9 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_16.7"
android:layout_marginTop=
"@dimen/dp_16.7"
android:ellipsize=
"end"
android:maxEms=
"3"
android:maxLines=
"1"
android:text=
"@string/tv_order_item_tool_text"
android:text=
"@string/tv_order_item_tool_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textSize=
"@dimen/size_login_hint_text"
...
@@ -106,6 +112,9 @@
...
@@ -106,6 +112,9 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_16.7"
android:layout_marginTop=
"@dimen/dp_16.7"
android:ellipsize=
"end"
android:maxEms=
"7"
android:maxLines=
"1"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textSize=
"@dimen/size_login_hint_text"
...
@@ -114,7 +123,7 @@
...
@@ -114,7 +123,7 @@
</LinearLayout>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/
tv_order_time_mor
e"
android:id=
"@+id/
error_stat
e"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:layout_marginRight=
"10dp"
...
@@ -126,126 +135,23 @@
...
@@ -126,126 +135,23 @@
/>
/>
</LinearLayout>
</LinearLayout>
<TextView
android:id=
"@+id/tv_order_detail"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_14"
android:layout_marginTop=
"5dp"
android:text=
"7*24响应笔记本电脑无配件"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/item_text_user_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:text=
"@string/tv_order_item_user_name"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/item_text_user_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:text=
"@string/tv_order_item_user_phone"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/item_text_dizhi"
android:id=
"@+id/item_text_dizhi"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"13.3dp"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"40dp"
android:layout_toRightOf=
"@id/item_line"
android:layout_marginTop=
"10dp"
android:ellipsize=
"end"
android:maxLines=
"2"
android:text=
"@string/tv_order_item_gps_text"
android:text=
"@string/tv_order_item_gps_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
android:textSize=
"@dimen/size_login_hint_text"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<ImageView
android:id=
"@+id/item_bottom_line"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_order_item_line_width"
android:background=
"@color/cl_order_item_line_bg"
/>
<LinearLayout
android:layout_width=
"333.3dp"
android:layout_height=
"40dp"
android:layout_alignParentBottom=
"true"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/item_text_phone"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"28.7dp"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"@string/tv_home_tab_one_phone"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/sp_15"
/>
<ImageView
android:id=
"@+id/order_line_one"
android:layout_width=
"@dimen/dp_0.7"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"11.7dp"
android:layout_marginTop=
"11.7dp"
android:background=
"@color/cl_receiving_order_item_data"
/>
<TextView
android:id=
"@+id/item_updata_time"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"@string/tv_home_tab_updata_subscribe_time"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/sp_15"
/>
<ImageView
android:id=
"@+id/order_line_two"
android:layout_width=
"@dimen/dp_0.7"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"11.7dp"
android:layout_marginTop=
"11.7dp"
android:background=
"@color/cl_receiving_order_item_data"
/>
<TextView
android:id=
"@+id/tv_item_process"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"@string/tv_home_tab_start"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/sp_15"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_
tabtwo
_item.xml
→
app/src/main/res/layout/fragment_
orderdoing
_item.xml
View file @
83a71781
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
180dp
"
android:layout_height=
"
wrap_content
"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_13.3"
...
@@ -58,15 +58,17 @@
...
@@ -58,15 +58,17 @@
<ImageView
<ImageView
android:id=
"@+id/item_line"
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"@dimen/size_order_item_line_height"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"25dp"
android:layout_marginLeft=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"@dimen/dp_21.3"
android:layout_marginTop=
"@dimen/dp_21.3"
android:background=
"@color/cl_order_item_line_bg"
/>
android:background=
"@color/cl_order_item_line_bg"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
match_par
ent"
android:layout_height=
"
wrap_cont
ent"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:layout_marginBottom=
"9.3dp"
>
>
<LinearLayout
<LinearLayout
...
@@ -87,6 +89,9 @@
...
@@ -87,6 +89,9 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_16.7"
android:layout_marginTop=
"@dimen/dp_16.7"
android:ellipsize=
"end"
android:maxEms=
"3"
android:maxLines=
"1"
android:text=
"@string/tv_order_item_tool_text"
android:text=
"@string/tv_order_item_tool_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textSize=
"@dimen/size_login_hint_text"
...
@@ -106,6 +111,9 @@
...
@@ -106,6 +111,9 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_16.7"
android:layout_marginTop=
"@dimen/dp_16.7"
android:ellipsize=
"end"
android:maxEms=
"7"
android:maxLines=
"1"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textSize=
"@dimen/size_login_hint_text"
...
@@ -129,11 +137,14 @@
...
@@ -129,11 +137,14 @@
<TextView
<TextView
android:id=
"@+id/tv_order_detail"
android:id=
"@+id/tv_order_detail"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_14"
android:layout_marginLeft=
"@dimen/dp_14"
android:layout_marginRight=
"40dp"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
android:text=
"7*24响应笔记本电脑无配件"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
"7*24响应笔记本电脑无配件fajfjafljfffaf"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
android:textStyle=
"bold"
...
@@ -151,6 +162,9 @@
...
@@ -151,6 +162,9 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:ellipsize=
"end"
android:maxEms=
"5"
android:maxLines=
"1"
android:text=
"@string/tv_order_item_user_name"
android:text=
"@string/tv_order_item_user_name"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textSize=
"@dimen/size_login_hint_text"
...
@@ -161,24 +175,28 @@
...
@@ -161,24 +175,28 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:maxLines=
"1"
android:text=
"@string/tv_order_item_user_phone"
android:text=
"@string/tv_order_item_user_phone"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textSize=
"@dimen/size_login_hint_text"
/>
/>
</LinearLayout>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/item_text_dizhi"
android:id=
"@+id/item_text_dizhi"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginRight=
"40dp"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
android:layout_toRightOf=
"@id/item_line"
android:ellipsize=
"end"
android:maxLines=
"2"
android:text=
"@string/tv_order_item_gps_text"
android:text=
"@string/tv_order_item_gps_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
android:textSize=
"@dimen/size_login_hint_text"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
...
@@ -190,7 +208,8 @@
...
@@ -190,7 +208,8 @@
android:background=
"@color/cl_order_item_line_bg"
/>
android:background=
"@color/cl_order_item_line_bg"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"333.3dp"
android:id=
"@+id/ll_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_height=
"40dp"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -212,7 +231,6 @@
...
@@ -212,7 +231,6 @@
android:layout_width=
"@dimen/dp_0.7"
android:layout_width=
"@dimen/dp_0.7"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"11.7dp"
android:layout_marginBottom=
"11.7dp"
android:layout_marginRight=
"3dp"
android:layout_marginTop=
"11.7dp"
android:layout_marginTop=
"11.7dp"
android:background=
"@color/cl_receiving_order_item_data"
/>
android:background=
"@color/cl_receiving_order_item_data"
/>
...
@@ -221,6 +239,8 @@
...
@@ -221,6 +239,8 @@
android:id=
"@+id/item_updata_time"
android:id=
"@+id/item_updata_time"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"@string/tv_home_tab_updata_subscribe_time"
android:text=
"@string/tv_home_tab_updata_subscribe_time"
...
@@ -233,7 +253,6 @@
...
@@ -233,7 +253,6 @@
android:layout_width=
"@dimen/dp_0.7"
android:layout_width=
"@dimen/dp_0.7"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"11.7dp"
android:layout_marginBottom=
"11.7dp"
android:layout_marginLeft=
"3dp"
android:layout_marginTop=
"11.7dp"
android:layout_marginTop=
"11.7dp"
android:background=
"@color/cl_receiving_order_item_data"
android:background=
"@color/cl_receiving_order_item_data"
/>
/>
...
...
app/src/main/res/layout/fragment_tabend_item.xml
deleted
100755 → 0
View file @
0f0b21cb
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/item"
android:layout_width=
"@dimen/size_order_item_width"
android:layout_height=
"@dimen/size_order_item_height"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/size_order_item_mt"
android:background=
"@drawable/item_shape"
>
<ImageView
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"@dimen/size_order_item_line_height"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"@dimen/size_order_item_line_ml"
android:background=
"@color/cl_order_item_line_bg"
/>
<TextView
android:id=
"@+id/item_tody"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/item_line"
android:layout_marginRight=
"@dimen/size_order_item_time_mr"
android:layout_marginTop=
"@dimen/size_order_item_time_mt"
android:text=
"@string/tv_order_item_time"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/size_order_item_time_text"
/>
<TextView
android:id=
"@+id/item_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/item_line"
android:layout_below=
"@id/item_tody"
android:layout_marginRight=
"@dimen/size_order_item_data_mr"
android:text=
"@string/tv_order_item_date"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/size_order_item_data_text"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/item_image_weixiu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginTop=
"@dimen/size_order_item_tool_mt"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_weixiu_icon"
/>
<ImageView
android:id=
"@+id/item_image_dizhi"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_gps_ml"
android:layout_marginTop=
"@dimen/size_order_item_gps_mt"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_dizhi_icon"
/>
<TextView
android:id=
"@+id/item_text_weixiu"
android:layout_toRightOf=
"@id/item_image_weixiu"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:layout_marginTop=
"@dimen/size_order_item_tooltext_mt"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/size_login_hint_text"
android:textColor=
"@color/cl_selector_hui"
android:text=
"@string/tv_order_item_tool_text"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/text_line"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_20"
android:layout_toRightOf=
"@id/item_text_weixiu"
android:textColor=
"@color/cl_selector_hui"
android:text=
" -- "
/>
<TextView
android:id=
"@+id/item_text_weixiu_leixing"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_20"
android:layout_toRightOf=
"@id/text_line"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/item_text_dizhi"
android:layout_toRightOf=
"@id/item_image_dizhi"
android:layout_marginLeft=
"@dimen/size_order_item_gpstext_ml"
android:layout_marginTop=
"@dimen/size_order_item_gpstext_mt"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/size_login_hint_text"
android:textColor=
"@color/cl_selector_hui"
android:text=
"@string/tv_order_item_gps_text"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_tabthree_item.xml
deleted
100755 → 0
View file @
0f0b21cb
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/item"
android:layout_width=
"@dimen/size_order_item_width"
android:layout_height=
"@dimen/size_order_item_height"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/size_order_item_mt"
android:background=
"@drawable/item_shape"
>
<ImageView
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"@dimen/dp_80"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"@dimen/dp_89"
android:background=
"@color/cl_order_item_line_bg"
/>
<TextView
android:id=
"@+id/item_tody"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/item_line"
android:layout_marginRight=
"@dimen/size_order_item_time_mr"
android:layout_marginTop=
"@dimen/size_order_item_time_mt"
android:text=
"@string/tv_order_item_time"
android:textColor=
"@color/cl_tab_read"
android:textSize=
"@dimen/size_order_item_time_text"
/>
<TextView
android:id=
"@+id/item_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/item_line"
android:layout_below=
"@id/item_tody"
android:layout_marginRight=
"@dimen/size_order_item_data_mr"
android:text=
"@string/tv_order_item_date"
android:textColor=
"@color/cl_tab_read"
android:textSize=
"@dimen/size_order_item_data_text"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/error_state"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"[未按时到达]"
android:textColor=
"@color/cl_tab_read"
android:layout_below=
"@id/item_time"
android:textSize=
"@dimen/sp_10"
android:layout_marginRight=
"@dimen/size_order_item_data_mr"
android:layout_marginTop=
"@dimen/dp_9"
android:layout_alignRight=
"@id/item_line"
/>
<ImageView
android:id=
"@+id/item_image_weixiu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_tool_ml"
android:layout_marginTop=
"@dimen/size_order_item_tool_mt"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_weixiu_icon"
/>
<ImageView
android:id=
"@+id/item_image_dizhi"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_order_item_gps_ml"
android:layout_marginTop=
"@dimen/size_order_item_gps_mt"
android:layout_toRightOf=
"@id/item_line"
android:src=
"@mipmap/shouye_liebiao_dizhi_icon"
/>
<TextView
android:id=
"@+id/item_text_weixiu"
android:layout_toRightOf=
"@id/item_image_weixiu"
android:layout_marginLeft=
"@dimen/size_order_item_tooltext_ml"
android:layout_marginTop=
"@dimen/size_order_item_tooltext_mt"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/size_login_hint_text"
android:textColor=
"@color/cl_home_title_text_color"
android:text=
"@string/tv_order_item_tool_text"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/text_line"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_20"
android:layout_toRightOf=
"@id/item_text_weixiu"
android:text=
" -- "
/>
<TextView
android:id=
"@+id/item_text_weixiu_leixing"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_20"
android:textStyle=
"bold"
android:layout_toRightOf=
"@id/text_line"
android:text=
"@string/tv_order_item_tool_text_leixing"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
/>
<TextView
android:id=
"@+id/item_text_dizhi"
android:layout_toRightOf=
"@id/item_image_dizhi"
android:layout_marginLeft=
"@dimen/size_order_item_gpstext_ml"
android:layout_marginTop=
"@dimen/size_order_item_gpstext_mt"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/size_login_hint_text"
android:textColor=
"@color/cl_home_title_text_color"
android:text=
"@string/tv_order_item_gps_text"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
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