Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
2064a893
Commit
2064a893
authored
Jul 08, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
租车和rxbus修复
parent
2954eb86
Changes
36
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
493 additions
and
223 deletions
+493
-223
StarBar.java
MyFrame/src/main/java/com/frame/base/view/StarBar.java
+5
-0
attrs.xml
MyFrame/src/main/res/values/attrs.xml
+2
-0
build.gradle
RvClient/build.gradle
+2
-2
TravelFragmentCommitOrder.java
...ava/com/rv/travel/fragment/TravelFragmentCommitOrder.java
+22
-22
BaseWrapperActivity.java
.../java/com/ruiwenliu/wrapper/base/BaseWrapperActivity.java
+10
-0
BaseWrapperFragment.java
.../java/com/ruiwenliu/wrapper/base/BaseWrapperFragment.java
+10
-0
colors.xml
RvWrapper/src/main/res/values/colors.xml
+1
-0
LoginRvActivity.java
.../java/com/rv/home/rv/module/ui/login/LoginRvActivity.java
+2
-2
CarRentalActivity.java
...com/rv/home/rv/module/ui/main/home/CarRentalActivity.java
+2
-2
CarRentalListActivity.java
...rv/home/rv/module/ui/main/home/CarRentalListActivity.java
+48
-15
ConfirmOrderActivity.java
.../rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
+10
-8
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+5
-5
HomePageFragment.java
.../com/rv/home/rv/module/ui/main/home/HomePageFragment.java
+2
-2
SelectLocationActivity.java
...v/home/rv/module/ui/main/home/SelectLocationActivity.java
+123
-31
CarRentalListAdapter.java
.../rv/module/ui/main/home/adapter/CarRentalListAdapter.java
+15
-2
CarTypeListBean.java
.../rv/home/rv/module/ui/main/home/bean/CarTypeListBean.java
+18
-0
ForPaymentFragment.java
...home/rv/module/ui/main/home/order/ForPaymentFragment.java
+5
-2
OrderDetailActivity.java
...ome/rv/module/ui/main/home/order/OrderDetailActivity.java
+4
-2
ToTravelFragment.java
...v/home/rv/module/ui/main/home/order/ToTravelFragment.java
+3
-2
TravelOrderDetailsActivity.java
...module/ui/main/home/order/TravelOrderDetailsActivity.java
+3
-2
CompletedAdapter.java
...v/module/ui/main/home/order/adapter/CompletedAdapter.java
+1
-1
ForPaymentAdapter.java
.../module/ui/main/home/order/adapter/ForPaymentAdapter.java
+1
-1
HaveToTravelAdapter.java
...odule/ui/main/home/order/adapter/HaveToTravelAdapter.java
+1
-1
OrderListAdapter.java
...v/module/ui/main/home/order/adapter/OrderListAdapter.java
+1
-1
ToTravelAdapter.java
...rv/module/ui/main/home/order/adapter/ToTravelAdapter.java
+1
-1
OrderListBean.java
...home/rv/module/ui/main/home/order/bean/OrderListBean.java
+15
-0
icon_home_item_car_rental_sold_out.png
...res/drawable-xhdpi/icon_home_item_car_rental_sold_out.png
+0
-0
fragment_home.xml
module_home/src/main/res/layout/fragment_home.xml
+1
-1
rv_act_confim_order.xml
module_home/src/main/res/layout/rv_act_confim_order.xml
+8
-7
rv_act_select_location.xml
module_home/src/main/res/layout/rv_act_select_location.xml
+60
-27
rv_item_car_rental_list.xml
module_home/src/main/res/layout/rv_item_car_rental_list.xml
+94
-71
strings.xml
module_home/src/main/res/values/strings.xml
+1
-0
MineFragment.java
module_mine/src/main/java/com/rv/rvmine/MineFragment.java
+8
-6
CollectionActivity.java
.../main/java/com/rv/rvmine/traveler/CollectionActivity.java
+1
-1
DeletePopupWindow.java
...e/src/main/java/com/rv/rvmine/view/DeletePopupWindow.java
+1
-2
TravelerConfirmOrderActivity.java
...va/com/rv/tourism/other/TravelerConfirmOrderActivity.java
+7
-4
No files found.
MyFrame/src/main/java/com/frame/base/view/StarBar.java
View file @
2064a893
...
...
@@ -23,6 +23,7 @@ public class StarBar extends View {
private
OnStarChangeListener
onStarChangeListener
;
//监听星星变化接口
private
Paint
paint
;
//绘制星星画笔
private
boolean
integerMark
=
false
;
private
boolean
isOnclick
=
false
;
public
StarBar
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
init
(
context
,
attrs
);
...
...
@@ -47,6 +48,7 @@ public class StarBar extends View {
this
.
starCount
=
mTypedArray
.
getInteger
(
R
.
styleable
.
RatingBar_starCount
,
5
);
this
.
starEmptyDrawable
=
mTypedArray
.
getDrawable
(
R
.
styleable
.
RatingBar_starEmpty
);
this
.
starFillBitmap
=
drawableToBitmap
(
mTypedArray
.
getDrawable
(
R
.
styleable
.
RatingBar_starFill
));
this
.
isOnclick
=
mTypedArray
.
getBoolean
(
R
.
styleable
.
RatingBar_isClick
,
false
);
mTypedArray
.
recycle
();
paint
=
new
Paint
();
...
...
@@ -146,6 +148,9 @@ public class StarBar extends View {
int
x
=
(
int
)
event
.
getX
();
if
(
x
<
0
)
x
=
0
;
if
(
x
>
getMeasuredWidth
())
x
=
getMeasuredWidth
();
if
(
isOnclick
){
return
false
;
}
switch
(
event
.
getAction
()){
case
MotionEvent
.
ACTION_DOWN
:
{
setStarMark
(
x
*
1.0f
/
(
getMeasuredWidth
()*
1.0f
/
starCount
));
...
...
MyFrame/src/main/res/values/attrs.xml
View file @
2064a893
...
...
@@ -11,6 +11,8 @@
<attr
format=
"reference"
name=
"starEmpty"
/>
<!--星星满图-->
<attr
format=
"reference"
name=
"starFill"
/>
<!--星星是否点击-->
<attr
format=
"boolean"
name=
"isClick"
/>
</declare-styleable>
</resources>
\ No newline at end of file
RvClient/build.gradle
View file @
2064a893
...
...
@@ -7,8 +7,8 @@ android {
applicationId
"com.test.rv"
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
10
3
versionName
"1.0.
3
"
versionCode
10
4
versionName
"1.0.
4
"
multiDexEnabled
true
//新版Gradle 是 implementation 为了兼容compile,写上这句话
...
...
RvTravel/src/main/java/com/rv/travel/fragment/TravelFragmentCommitOrder.java
View file @
2064a893
...
...
@@ -255,29 +255,29 @@ public class TravelFragmentCommitOrder extends BaseFragment {
@SuppressLint
(
"CheckResult"
)
private
void
initRxBus
()
{
RxBus
.
tObservable
(
PaymentSuccessfulEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
PaymentSuccessfulEvent
>()
{
@Override
public
void
accept
(
PaymentSuccessfulEvent
payEvent
)
throws
Exception
{
getActivity
().
finish
();
}
});
RxBus
.
tObservable
(
PaymentFailedEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
Consumer
<
PaymentFailedEvent
>()
{
@Override
public
void
accept
(
PaymentFailedEvent
payEvent
)
throws
Exception
{
// showToast("333333");
// if (baseContext.getClass().equals(TravelFragmentCommitOrder.class)) {
// startActivity(OrderListActivity.getIntent(getActivity(), 0));
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_ORDERLIST
).
navigation
();
// RxBus.tObservable(PaymentSuccessfulEvent.class)
// .observeOn(Schedulers.newThread())
// .subscribe(new Consumer<PaymentSuccessfulEvent>() {
// @Override
// public void accept(PaymentSuccessfulEvent payEvent) throws Exception {
// getActivity().finish();
// }
}
});
// }
// });
//
// RxBus.tObservable(PaymentFailedEvent.class)
// .observeOn(Schedulers.newThread())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(new Consumer<PaymentFailedEvent>() {
// @Override
// public void accept(PaymentFailedEvent payEvent) throws Exception {
//// showToast("333333");
//// if (baseContext.getClass().equals(TravelFragmentCommitOrder.class)) {
//// startActivity(OrderListActivity.getIntent(getActivity(), 0));
// ARouter.getInstance().build(Constance.ACTIVITY_URL_ORDERLIST).navigation();
//// getActivity().finish();
//// }
// }
// });
}
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/base/BaseWrapperActivity.java
View file @
2064a893
...
...
@@ -19,6 +19,7 @@ import com.ruiwenliu.wrapper.weight.TitleView;
import
com.ruiwenliu.wrapper.weight.ToastView
;
import
butterknife.ButterKnife
;
import
io.reactivex.disposables.CompositeDisposable
;
import
me.yokeyword.fragmentation.SupportActivity
;
/**
...
...
@@ -36,11 +37,15 @@ public abstract class BaseWrapperActivity extends SupportActivity {
protected
FrameLayout
frameLayout
;
private
LinearLayout
rootView
;
protected
AppCompatActivity
mActivity
;
protected
CompositeDisposable
disposable
;
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
ARouter
.
getInstance
().
inject
(
this
);
if
(
disposable
==
null
||
disposable
.
isDisposed
())
{
disposable
=
new
CompositeDisposable
();
}
//获取类名
// RuiwenAppliction.getInstance().activityName=this.getClass().getSimpleName();
handleBeforeSetLayout
();
//设置布局之前的操作
...
...
@@ -49,6 +54,7 @@ public abstract class BaseWrapperActivity extends SupportActivity {
intiBaseData
();
ButterKnife
.
bind
(
this
);
initView
(
savedInstanceState
,
titleView
,
getIntent
());
}
...
...
@@ -76,6 +82,10 @@ public abstract class BaseWrapperActivity extends SupportActivity {
frameLayout
.
removeAllViews
();
frameLayout
=
null
;
}
if
(
disposable
!=
null
)
{
disposable
.
clear
();
}
}
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/base/BaseWrapperFragment.java
View file @
2064a893
...
...
@@ -21,6 +21,7 @@ import java.lang.reflect.ParameterizedType;
import
butterknife.ButterKnife
;
import
butterknife.Unbinder
;
import
io.reactivex.disposables.CompositeDisposable
;
import
me.yokeyword.fragmentation.SupportFragment
;
/**
...
...
@@ -35,6 +36,7 @@ public abstract class BaseWrapperFragment<P extends MvpPresenter> extends Suppor
private
LoadingDialog
mLoadingDialog
;
private
View
contentView
;
private
Unbinder
unbinder
;
protected
CompositeDisposable
disposable
;
@Override
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
...
@@ -48,9 +50,14 @@ public abstract class BaseWrapperFragment<P extends MvpPresenter> extends Suppor
}
catch
(
java
.
lang
.
InstantiationException
e
)
{
e
.
printStackTrace
();
}
if
(
disposable
==
null
||
disposable
.
isDisposed
())
{
disposable
=
new
CompositeDisposable
();
}
mPresenter
.
attachView
(
this
);
mLoadingDialog
=
createLoadingDialog
();
ARouter
.
getInstance
().
inject
(
this
);
}
...
...
@@ -89,6 +96,9 @@ public abstract class BaseWrapperFragment<P extends MvpPresenter> extends Suppor
mLoadingDialog
=
null
;
mPresenter
.
detachView
();
mPresenter
=
null
;
if
(
disposable
!=
null
)
{
disposable
.
clear
();
}
}
...
...
RvWrapper/src/main/res/values/colors.xml
View file @
2064a893
...
...
@@ -37,6 +37,7 @@
<color
name=
"gray_EEEEEE"
>
#EEEEEE
</color>
<color
name=
"gray_ba242525"
>
#ba242525
</color>
<color
name=
"gray_f8f3c9"
>
#F8F3C9
</color>
<color
name=
"gray_30000000"
>
#30000000
</color>
<!--end-->
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/login/LoginRvActivity.java
View file @
2064a893
...
...
@@ -91,9 +91,9 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
private
void
initRxbus
()
{
RxBus
.
tObservable
(
LoginSuccessfulEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
LoginSuccessfulEvent
>(
)
{
.
subscribe
(
new
com
.
frame
.
base
.
bus
.
Observer
<
LoginSuccessfulEvent
>(
disposable
)
{
@Override
public
void
accept
(
LoginSuccessfulEvent
event
)
throws
Exception
{
public
void
onNext
(
LoginSuccessfulEvent
event
)
{
finish
();
}
});
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/CarRentalActivity.java
View file @
2064a893
...
...
@@ -306,7 +306,7 @@ public class CarRentalActivity extends BaseStatusActivity<CommonPresenter> {
// if (getSwitchType == 0) {
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 1,"",getCity.equals(nowCity) && mLatLng!=null?mLatLng.latitude:0,getCity.equals(nowCity)&& mLatLng!=null?mLatLng.longitude:0), TYPE_REQUEST_SHOP);
// } else {
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
mActivity
,
1
,
getCity
,
latLatitude
,
lonLongitude
,
nowCity
),
TYPE_REQUEST_ADDRESS
);
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
mActivity
,
1
,
getCity
,
latLatitude
,
lonLongitude
,
nowCity
,
0
),
TYPE_REQUEST_ADDRESS
);
// }
}
else
if
(
v
.
getId
()==
R
.
id
.
tv_out_address
){
...
...
@@ -314,7 +314,7 @@ public class CarRentalActivity extends BaseStatusActivity<CommonPresenter> {
// if (outSwitchType == 0) {
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 2,"",outCity.equals(nowCity)&& mLatLng!=null?mLatLng.latitude:0,outCity.equals(nowCity)&& mLatLng!=null?mLatLng.longitude:0), TYPE_REQUEST_SHOP);
// } else {
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
mActivity
,
2
,
outCity
,
outLatitude
,
outLongitude
,
nowCity
),
TYPE_REQUEST_ADDRESS
);
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
mActivity
,
2
,
outCity
,
outLatitude
,
outLongitude
,
nowCity
,
0
),
TYPE_REQUEST_ADDRESS
);
// }
}
else
if
(
v
.
getId
()==
R
.
id
.
tv_get_time
){
if
(
mapGetTime
==
null
)
{
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/CarRentalListActivity.java
View file @
2064a893
...
...
@@ -81,12 +81,12 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
private
String
begDate
;
private
String
endDate
;
public
static
Intent
getIntent
(
Context
context
,
double
lat
,
double
lon
,
double
outLatitude
,
double
outLongitude
,
boolean
bool
,
OrderDataBean
bean
,
String
startTime
,
String
endTime
)
{
public
static
Intent
getIntent
(
Context
context
,
double
lat
,
double
lon
,
double
outLatitude
,
double
outLongitude
,
boolean
bool
,
OrderDataBean
bean
,
String
startTime
,
String
endTime
)
{
return
new
Intent
(
context
,
CarRentalListActivity
.
class
)
.
putExtra
(
"lat"
,
lat
)
.
putExtra
(
"lon"
,
lon
)
.
putExtra
(
"outLatitude"
,
outLatitude
)
.
putExtra
(
"outLongitude"
,
outLongitude
)
.
putExtra
(
"outLatitude"
,
outLatitude
)
.
putExtra
(
"outLongitude"
,
outLongitude
)
.
putExtra
(
"bean"
,
bean
)
.
putExtra
(
"bool"
,
bool
)
.
putExtra
(
"startTime"
,
startTime
)
...
...
@@ -94,8 +94,6 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
}
;
@Override
protected
int
setLayout
()
{
return
R
.
layout
.
rv_act_car_rental_list
;
...
...
@@ -110,8 +108,8 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
listScreeningId
=
new
ArrayList
<>();
mLat
=
intent
.
getDoubleExtra
(
"lat"
,
0
);
mLon
=
intent
.
getDoubleExtra
(
"lon"
,
0
);
outLatitude
=
intent
.
getDoubleExtra
(
"outLatitude"
,
0
);
outLongitude
=
intent
.
getDoubleExtra
(
"outLongitude"
,
0
);
outLatitude
=
intent
.
getDoubleExtra
(
"outLatitude"
,
0
);
outLongitude
=
intent
.
getDoubleExtra
(
"outLongitude"
,
0
);
mBool
=
intent
.
getBooleanExtra
(
"bool"
,
false
);
titleView
.
setImageResource
(
R
.
id
.
iv_title_right
,
R
.
drawable
.
rv_rentingcar_icon_plat
);
titleView
.
setChildClickListener
(
R
.
id
.
iv_title_right
,
new
View
.
OnClickListener
()
{
...
...
@@ -134,15 +132,15 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
CarTypeListBean
.
DataBeanX
.
DataBean
bean
=
mAdapter
.
getItem
(
position
);
if
(
dataBean
!=
null
)
{
dataBean
.
setModelId
(
bean
.
getVehicleModel
().
getId
());
dataBean
.
setStartCompanyId
(
bean
.
getCompany
().
getId
());
if
(
"1"
.
equals
(
bean
.
getHasVehicle
()))
{
if
(
dataBean
!=
null
)
{
dataBean
.
setModelId
(
bean
.
getVehicleModel
().
getId
());
dataBean
.
setStartCompanyId
(
bean
.
getCompany
().
getId
());
}
startActivity
(
CarDetailActivity
.
getIntent
(
mActivity
,
dataBean
,
bean
,
getIntent
().
getStringExtra
(
"startTime"
),
getIntent
().
getStringExtra
(
"endTime"
)));
}
startActivity
(
CarDetailActivity
.
getIntent
(
mActivity
,
dataBean
,
bean
,
getIntent
().
getStringExtra
(
"startTime"
),
getIntent
().
getStringExtra
(
"endTime"
)));
}
});
}
@Override
...
...
@@ -200,11 +198,11 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
}
else
if
(
id
==
R
.
id
.
ll_item_get_address
)
{
//取车地址
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
mActivity
,
1
,
dataBean
.
getStartCityName
(),
mLat
,
mLon
,
""
),
110
);
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
mActivity
,
1
,
dataBean
.
getStartCityName
(),
mLat
,
mLon
,
""
,
1
),
110
);
}
else
if
(
id
==
R
.
id
.
ll_item_out_address
)
{
//还车地址
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
mActivity
,
2
,
dataBean
.
getStartCityName
(),
outLatitude
,
outLongitude
,
""
),
110
);
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
mActivity
,
2
,
dataBean
.
getStartCityName
(),
outLatitude
,
outLongitude
,
""
,
1
),
110
);
}
else
if
(
id
==
R
.
id
.
ll_item_filter
)
{
if
(
attributeListBean
==
null
)
{
return
;
...
...
@@ -270,6 +268,7 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
return
stringBuilder
.
toString
().
substring
(
0
,
stringBuilder
.
toString
().
length
()
-
1
);
}
/**
* 刷新
*/
...
...
@@ -409,9 +408,43 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
tvGetDate
.
setText
(
"取"
+
DateUtils
.
formatDate66
(
begDate
));
tvOutDate
.
setText
(
"还"
+
DateUtils
.
formatDate66
(
endDate
));
onFresh
();
try
{
dataBean
.
setStartTime
(
TimeManager
.
dateToStamp
(
begDate
));
dataBean
.
setEndTime
(
TimeManager
.
dateToStamp
(
endDate
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
else
if
(
requestCode
==
110
&&
resultCode
==
RESULT_OK
)
{
double
lat
=
data
.
getDoubleExtra
(
"latitude"
,
0
);
double
lon
=
data
.
getDoubleExtra
(
"longitude"
,
0
);
int
type
=
data
.
getIntExtra
(
"type"
,
1
);
String
requestData
=
data
.
getStringExtra
(
"location"
);
String
city
=
data
.
getStringExtra
(
"city"
);
int
cityId
=
data
.
getIntExtra
(
"cityId"
,
0
);
setRequestData
(
type
,
requestData
,
lat
,
lon
,
city
,
cityId
);
}
}
private
void
setRequestData
(
int
type
,
String
requestData
,
double
lat
,
double
lon
,
String
city
,
int
cityId
)
{
if
(
type
==
1
)
{
tvGetAddress
.
setText
(
requestData
);
dataBean
.
setStartAddr
(
requestData
);
dataBean
.
setStartCity
(
cityId
);
dataBean
.
setStartCityName
(
city
);
mLat
=
lat
;
mLon
=
lon
;
}
else
if
(
type
==
2
)
{
tvOutAddress
.
setText
(
requestData
);
dataBean
.
setEndAddr
(
requestData
);
dataBean
.
setEndCity
(
cityId
);
dataBean
.
setEndCityName
(
city
);
outLatitude
=
lat
;
outLongitude
=
lon
;
}
onFresh
();
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
View file @
2064a893
...
...
@@ -22,10 +22,13 @@ import android.widget.Toast;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alibaba.fastjson.JSON
;
import
com.base.utils.ui.datetime.selector.util.TextUtil
;
import
com.frame.base.bus.LoginSuccessfulEvent
;
import
com.frame.base.bus.Observer
;
import
com.frame.base.bus.PaymentFailedEvent
;
import
com.frame.base.bus.PaymentSuccessfulEvent
;
import
com.frame.base.bus.RxBus
;
import
com.frame.base.url.Constance
;
import
com.frame.base.view.StarBar
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.SPConstance
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
...
...
@@ -79,7 +82,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
@BindView
(
R2
.
id
.
tv_content
)
TextView
tvContent
;
@BindView
(
R2
.
id
.
rating_bar
)
Rating
Bar
ratingBar
;
Star
Bar
ratingBar
;
@BindView
(
R2
.
id
.
tv_price
)
TextView
tvPrice
;
@BindView
(
R2
.
id
.
tv_get_car_address
)
...
...
@@ -178,21 +181,21 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
@SuppressLint
(
"CheckResult"
)
private
void
initRxBus
()
{
RxBus
.
tObservable
(
PaymentSuccessfulEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
PaymentSuccessfulEvent
>(
)
{
.
subscribe
(
new
Observer
<
PaymentSuccessfulEvent
>(
disposable
)
{
@Override
public
void
accept
(
PaymentSuccessfulEvent
payEvent
)
throws
Exception
{
public
void
onNext
(
PaymentSuccessfulEvent
event
)
{
finish
();
}
});
RxBus
.
tObservable
(
PaymentFailedEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
PaymentFailedEvent
>(
)
{
.
subscribe
(
new
Observer
<
PaymentFailedEvent
>(
disposable
)
{
@Override
public
void
accept
(
PaymentFailedEvent
payEvent
)
throws
Exception
{
showToast
(
"333333"
);
public
void
onNext
(
PaymentFailedEvent
event
)
{
if
(
mActivity
.
getClass
().
equals
(
ConfirmOrderActivity
.
class
))
{
startActivity
(
OrderListActivity
.
getIntent
(
mActivity
,
0
));
finish
();
...
...
@@ -428,7 +431,6 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
mPresenter
.
postBodyData
(
RvFrameConfig
.
VEHICLE_ORDER
,
2
,
ApiConfig
.
HTTP_URL_PAY_THE_CALLBACK
,
OrderPayBean
.
class
,
new
payBody
(
orderNo
,
payWay
,
type
),
headMap
,
true
);
}
/**
* 初始化View
*/
...
...
@@ -436,7 +438,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
GlideManager
.
getInstance
(
mActivity
).
loadImage
(
mCarBean
.
getVehicleModel
().
getIcon
(),
ivGoods
);
tvName
.
setText
(
mCarBean
.
getVehicleModel
().
getName
());
tvContent
.
setText
(
mCarBean
.
getVehicleModel
().
getKeyword
());
ratingBar
.
set
Rating
((
float
)
mCarBean
.
getVehicleModel
().
getPoint
()
);
ratingBar
.
set
StarMark
((
float
)
mCarBean
.
getVehicleModel
().
getScore
()
/
10
);
tvPrice
.
setText
(
String
.
format
(
"%1$s%2$s"
,
mCarBean
.
getVehicleModel
().
getSum
(),
mActivity
.
getString
(
R
.
string
.
rv_day
)));
tvEventDate
.
setText
(
getIntent
().
getStringExtra
(
"startTime"
)
+
"~"
+
getIntent
().
getStringExtra
(
"endTime"
));
tvActivityDay
.
setText
(
String
.
format
(
"%1$s%2$s"
,
dataBean
.
getDayNum
(),
mActivity
.
getString
(
R
.
string
.
rv_days
)));
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
2064a893
...
...
@@ -265,6 +265,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
llItemHotRvtour
.
setSelected
(
true
);
tvItemRvTour
.
setSelected
(
true
);
hotType
=
"2"
;
tvHotRvtourHint
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
colorWrite
));
tvHotRvtour
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
colorWrite
));
tvHotRvtour
.
getPaint
().
setFakeBoldText
(
true
);
...
...
@@ -509,7 +510,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
mRvTourAdapter
.
setNewData
(
hotData
);
mRvTourLabelAdapter
.
setNewData
(
hotData
);
}
...
...
@@ -573,13 +573,13 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
// if (getSwitchType == 0) {
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 1,"",getCity.equals(nowCity) && mLatLng!=null?mLatLng.latitude:0,getCity.equals(nowCity)&& mLatLng!=null?mLatLng.longitude:0), TYPE_REQUEST_SHOP);
// } else {
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
getContext
(),
1
,
getCity
,
latLatitude
,
lonLongitude
,
nowCity
),
TYPE_REQUEST_ADDRESS
);
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
getContext
(),
1
,
getCity
,
latLatitude
,
lonLongitude
,
nowCity
,
0
),
TYPE_REQUEST_ADDRESS
);
}
else
if
(
id
==
R
.
id
.
tv_out_address
)
{
String
outCity
=
headTvOutCity
.
getText
().
toString
().
trim
();
// if (outSwitchType == 0) {
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 2,"",outCity.equals(nowCity)&& mLatLng!=null?mLatLng.latitude:0,outCity.equals(nowCity)&& mLatLng!=null?mLatLng.longitude:0), TYPE_REQUEST_SHOP);
// } else {
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
getContext
(),
2
,
outCity
,
outLatitude
,
outLongitude
,
nowCity
),
TYPE_REQUEST_ADDRESS
);
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
getContext
(),
2
,
outCity
,
outLatitude
,
outLongitude
,
nowCity
,
0
),
TYPE_REQUEST_ADDRESS
);
}
else
if
(
id
==
R
.
id
.
ll_item_select_data
)
{
//选择日期
ARouter
.
getInstance
()
...
...
@@ -702,7 +702,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
recommendGood
(
"3"
);
hotType
=
"3"
;
}
else
if
(
id
==
R
.
id
.
ll_item_hot_car_rental
)
{
//
优质车型
//
购房车
llItemHotRvtour
.
setSelected
(
false
);
llItemHotEntertainmentCamp
.
setSelected
(
false
);
llItemHotCarRental
.
setSelected
(
true
);
...
...
@@ -718,6 +718,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
tvHotCarRental
.
getPaint
().
setFakeBoldText
(
true
);
tvSeeMorePopular
.
setText
(
"更多优质车型"
);
recommendGood
(
"4"
);
hotType
=
"1"
;
}
else
if
(
id
==
R
.
id
.
tv_see_more_popular
)
{
//查看更多热门
...
...
@@ -988,7 +989,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
}
else
{
llItemTitle
.
setBackgroundColor
(
Color
.
argb
((
int
)
alpha
,
255
,
255
,
255
));
}
}
else
{
llItemTop
.
setVisibility
(
View
.
VISIBLE
);
llItemSearch
.
setBackground
(
getResources
().
getDrawable
(
R
.
drawable
.
shape_rv_textview_home_search
));
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomePageFragment.java
View file @
2064a893
...
...
@@ -321,7 +321,7 @@ public class HomePageFragment extends BaseFragment<CommonPresenter> {
// if (getSwitchType == 0) {
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 1,"",getCity.equals(nowCity) && mLatLng!=null?mLatLng.latitude:0,getCity.equals(nowCity)&& mLatLng!=null?mLatLng.longitude:0), TYPE_REQUEST_SHOP);
// } else {
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
getContext
(),
1
,
getCity
,
latLatitude
,
lonLongitude
,
nowCity
),
TYPE_REQUEST_ADDRESS
);
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
getContext
(),
1
,
getCity
,
latLatitude
,
lonLongitude
,
nowCity
,
0
),
TYPE_REQUEST_ADDRESS
);
// }
...
...
@@ -330,7 +330,7 @@ public class HomePageFragment extends BaseFragment<CommonPresenter> {
// if (outSwitchType == 0) {
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 2,"",outCity.equals(nowCity)&& mLatLng!=null?mLatLng.latitude:0,outCity.equals(nowCity)&& mLatLng!=null?mLatLng.longitude:0), TYPE_REQUEST_SHOP);
// } else {
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
getContext
(),
2
,
outCity
,
outLatitude
,
outLongitude
,
nowCity
),
TYPE_REQUEST_ADDRESS
);
startActivityForResult
(
SelectLocationActivity
.
getIntent
(
getContext
(),
2
,
outCity
,
outLatitude
,
outLongitude
,
nowCity
,
0
),
TYPE_REQUEST_ADDRESS
);
// }
}
else
if
(
i
==
R
.
id
.
tv_get_time
)
{
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/SelectLocationActivity.java
View file @
2064a893
This diff is collapsed.
Click to expand it.
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/adapter/CarRentalListAdapter.java
View file @
2064a893
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
adapter
;
import
android.view.View
;
import
android.widget.ImageView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.frame.base.view.StarBar
;
import
com.ruiwenliu.wrapper.util.BaseGlideHolder
;
import
com.rv.home.R
;
import
com.rv.home.R2
;
...
...
@@ -30,13 +32,24 @@ public class CarRentalListAdapter extends BaseQuickAdapter<CarTypeListBean.DataB
helper
.
loadImage
(
mContext
,
item
.
getVehicleModel
().
getIcon
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
));
// helper.setText(R.id.tv_name,item);
helper
.
setText
(
R
.
id
.
tv_price
,
String
.
format
(
"¥%1$s%2$s"
,
item
.
getVehicleModel
().
getPrice
(),
mContext
.
getString
(
R
.
string
.
rv_day
)));
float
score
=
(
float
)
item
.
getVehicleModel
().
getScore
()
/
10
;
StarBar
starBar
=
helper
.
getView
(
R
.
id
.
starbar1
);
starBar
.
setStarMark
(
score
);
helper
.
setText
(
R
.
id
.
tv_point
,
score
+
"分"
);
if
(
"0"
.
equals
(
item
.
getHasVehicle
())){
helper
.
setGone
(
R
.
id
.
iv_sold_out
,
true
);
helper
.
setGone
(
R
.
id
.
tv_layout_gray
,
true
);
}
else
if
(
"1"
.
equals
(
item
.
getHasVehicle
())){
helper
.
setGone
(
R
.
id
.
iv_sold_out
,
false
);
helper
.
setGone
(
R
.
id
.
tv_layout_gray
,
false
);
}
}
helper
.
setText
(
R
.
id
.
tv_address
,
item
.
getCompany
().
getName
());
double
instance
=
item
.
getDistance
()/
1000
;
helper
.
setText
(
R
.
id
.
tv_km
,
String
.
format
(
"%1$s%2$.3f%3$s"
,
mContext
.
getString
(
R
.
string
.
rv_km_you
),
instance
,
mContext
.
getString
(
R
.
string
.
rv_km
)));
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/bean/CarTypeListBean.java
View file @
2064a893
...
...
@@ -114,6 +114,7 @@ public class CarTypeListBean extends BaseBean implements Serializable {
private
double
distance
;
private
VehicleModelBean
vehicleModel
;
private
CompanyBean
company
;
private
String
hasVehicle
;
//1--有车,0--没车
public
double
getDistance
()
{
return
distance
;
...
...
@@ -139,6 +140,14 @@ public class CarTypeListBean extends BaseBean implements Serializable {
this
.
company
=
company
;
}
public
String
getHasVehicle
()
{
return
hasVehicle
;
}
public
void
setHasVehicle
(
String
hasVehicle
)
{
this
.
hasVehicle
=
hasVehicle
;
}
public
static
class
VehicleModelBean
implements
Serializable
{
/**
* id : 25
...
...
@@ -160,6 +169,7 @@ public class CarTypeListBean extends BaseBean implements Serializable {
private
double
price
;
private
String
rentDiscountPrice
;
//租车优惠价格
private
int
rentDiscountStatus
;
//租车优惠状态 0–没有优惠;1–会员折扣;2–固定值
private
int
score
;
public
double
getSum
()
{
BeanUserInfo
.
UserInfo
info
=
null
;
...
...
@@ -293,6 +303,14 @@ public class CarTypeListBean extends BaseBean implements Serializable {
public
void
setRentDiscountStatus
(
int
rentDiscountStatus
)
{
this
.
rentDiscountStatus
=
rentDiscountStatus
;
}
public
int
getScore
()
{
return
score
;
}
public
void
setScore
(
int
score
)
{
this
.
score
=
score
;
}
}
public
static
class
CompanyBean
implements
Serializable
{
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/ForPaymentFragment.java
View file @
2064a893
...
...
@@ -12,6 +12,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.entity.MultiItemEntity
;
import
com.frame.base.bus.CancelOrderEvent
;
import
com.frame.base.bus.Observer
;
import
com.frame.base.bus.PaymentFailedEvent
;
import
com.frame.base.bus.PaymentSuccessfulEvent
;
import
com.frame.base.bus.RxBus
;
...
...
@@ -27,6 +28,7 @@ import com.rv.home.R;
import
com.rv.home.R2
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.basic.presenter.CommonPresenter
;
import
com.rv.home.rv.module.ui.main.home.ConfirmOrderActivity
;
import
com.rv.home.rv.module.ui.main.home.bean.EffectiveTimeBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderPayBean
;
import
com.rv.home.rv.module.ui.main.home.order.adapter.ForPaymentAdapter
;
...
...
@@ -125,11 +127,12 @@ public class ForPaymentFragment extends BaseFragment<CommonPresenter> implements
@SuppressLint
(
"CheckResult"
)
private
void
initRxBus
()
{
RxBus
.
tObservable
(
CancelOrderEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
CancelOrderEvent
>(
)
{
.
subscribe
(
new
Observer
<
CancelOrderEvent
>(
disposable
)
{
@Override
public
void
accept
(
CancelOrderEvent
event
)
throws
Exception
{
public
void
onNext
(
CancelOrderEvent
event
)
{
onRefresh
();
}
});
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/OrderDetailActivity.java
View file @
2064a893
...
...
@@ -18,6 +18,7 @@ import android.widget.TextView;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.frame.base.bus.CancelOrderEvent
;
import
com.frame.base.bus.Observer
;
import
com.frame.base.bus.RxBus
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
...
...
@@ -184,11 +185,12 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
@SuppressLint
(
"CheckResult"
)
private
void
initRxBus
()
{
RxBus
.
tObservable
(
CancelOrderEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
CancelOrderEvent
>(
)
{
.
subscribe
(
new
Observer
<
CancelOrderEvent
>(
disposable
)
{
@Override
public
void
accept
(
CancelOrderEvent
event
)
throws
Exception
{
public
void
onNext
(
CancelOrderEvent
event
)
{
finish
();
}
});
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/ToTravelFragment.java
View file @
2064a893
...
...
@@ -10,6 +10,7 @@ import android.view.View;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.entity.MultiItemEntity
;
import
com.frame.base.bus.CancelOrderEvent
;
import
com.frame.base.bus.Observer
;
import
com.frame.base.bus.RxBus
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
...
...
@@ -105,9 +106,9 @@ public class ToTravelFragment extends BaseFragment<CommonPresenter> implements B
private
void
initRxBus
()
{
RxBus
.
tObservable
(
CancelOrderEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
CancelOrderEvent
>(
)
{
.
subscribe
(
new
Observer
<
CancelOrderEvent
>(
disposable
)
{
@Override
public
void
accept
(
CancelOrderEvent
event
)
throws
Exception
{
public
void
onNext
(
CancelOrderEvent
event
)
{
onRefresh
();
}
});
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/TravelOrderDetailsActivity.java
View file @
2064a893
...
...
@@ -17,6 +17,7 @@ import android.widget.LinearLayout;
import
android.widget.TextView
;
import
com.frame.base.bus.CancelOrderEvent
;
import
com.frame.base.bus.Observer
;
import
com.frame.base.bus.RxBus
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
...
...
@@ -184,9 +185,9 @@ public class TravelOrderDetailsActivity extends BaseStatusActivity<PickerPresent
private
void
initRxBus
()
{
RxBus
.
tObservable
(
CancelOrderEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
CancelOrderEvent
>(
)
{
.
subscribe
(
new
Observer
<
CancelOrderEvent
>(
disposable
)
{
@Override
public
void
accept
(
CancelOrderEvent
event
)
throws
Exception
{
public
void
onNext
(
CancelOrderEvent
event
)
{
finish
();
}
});
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/adapter/CompletedAdapter.java
View file @
2064a893
...
...
@@ -45,7 +45,7 @@ public class CompletedAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
helper
.
setText
(
R
.
id
.
tv_city
,
dataBean
.
getOrderRentVehicleDetail
().
getStart_city_name
());
}
helper
.
setText
(
R
.
id
.
tv_order_state
,
mContext
.
getString
(
R
.
string
.
rv_order_completed
));
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Picture
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Icon
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
setText
(
R
.
id
.
tv_car_type
,
dataBean
.
getName
());
if
(
dataBean
.
getOrderRentVehicleDetail
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_get_time
,
TimeManager
.
stampToDate
(
String
.
valueOf
(
dataBean
.
getOrderRentVehicleDetail
().
getStart_time
())));
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/adapter/ForPaymentAdapter.java
View file @
2064a893
...
...
@@ -43,7 +43,7 @@ public class ForPaymentAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity
helper
.
setText
(
R
.
id
.
tv_city
,
dataBean
.
getOrderRentVehicleDetail
().
getStart_city_name
());
}
helper
.
setText
(
R
.
id
.
tv_order_state
,
mContext
.
getString
(
R
.
string
.
rv_order_for_payment
));
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Picture
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Icon
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
setText
(
R
.
id
.
tv_car_type
,
dataBean
.
getName
());
if
(
dataBean
.
getOrderRentVehicleDetail
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_get_time
,
TimeManager
.
stampToDate
(
String
.
valueOf
(
dataBean
.
getOrderRentVehicleDetail
().
getStart_time
())));
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/adapter/HaveToTravelAdapter.java
View file @
2064a893
...
...
@@ -45,7 +45,7 @@ public class HaveToTravelAdapter extends BaseMultiItemQuickAdapter<MultiItemEnti
helper
.
setText
(
R
.
id
.
tv_city
,
dataBean
.
getOrderRentVehicleDetail
().
getStart_city_name
());
}
helper
.
setText
(
R
.
id
.
tv_order_state
,
mContext
.
getString
(
R
.
string
.
rv_order_have_travel
));
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Picture
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Icon
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
setText
(
R
.
id
.
tv_car_type
,
dataBean
.
getName
());
if
(
dataBean
.
getOrderRentVehicleDetail
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_get_time
,
TimeManager
.
stampToDate
(
String
.
valueOf
(
dataBean
.
getOrderRentVehicleDetail
().
getStart_time
())));
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/adapter/OrderListAdapter.java
View file @
2064a893
...
...
@@ -45,7 +45,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
if
(
dataBean
.
getOrderRentVehicleDetail
()
!=
null
&&
dataBean
.
getOrderRentVehicleDetail
().
getStart_city_name
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_city
,
dataBean
.
getOrderRentVehicleDetail
().
getStart_city_name
());
}
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Picture
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Icon
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
setText
(
R
.
id
.
tv_car_type
,
dataBean
.
getName
());
if
(
dataBean
.
getOrderRentVehicleDetail
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_get_time
,
TimeManager
.
stampToDate
(
String
.
valueOf
(
dataBean
.
getOrderRentVehicleDetail
().
getStart_time
())));
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/adapter/ToTravelAdapter.java
View file @
2064a893
...
...
@@ -45,7 +45,7 @@ public class ToTravelAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
helper
.
setText
(
R
.
id
.
tv_city
,
dataBean
.
getOrderRentVehicleDetail
().
getStart_city_name
());
}
helper
.
setText
(
R
.
id
.
tv_order_state
,
mContext
.
getString
(
R
.
string
.
rv_order_to_travel
));
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Picture
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
loadRoundImage
(
mContext
,
dataBean
.
get
Icon
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
);
helper
.
setText
(
R
.
id
.
tv_car_type
,
dataBean
.
getName
());
if
(
dataBean
.
getOrderRentVehicleDetail
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_get_time
,
TimeManager
.
stampToDate
(
String
.
valueOf
(
dataBean
.
getOrderRentVehicleDetail
().
getStart_time
())));
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/bean/OrderListBean.java
View file @
2064a893
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
order
.
bean
;
import
com.base.utils.ui.datetime.selector.util.TextUtil
;
import
com.chad.library.adapter.base.entity.MultiItemEntity
;
import
com.google.gson.annotations.SerializedName
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
...
...
@@ -210,6 +211,20 @@ public class OrderListBean extends BaseBean {
return
picture
;
}
public
String
getIcon
()
{
String
icon
=
""
;
if
(!
TextUtil
.
isEmpty
(
picture
))
{
String
[]
icons
=
picture
.
split
(
","
);
if
(
icons
!=
null
&&
icons
.
length
>
0
)
{
icon
=
icons
[
0
];
}
else
{
icon
=
picture
;
}
}
return
icon
;
}
public
void
setPicture
(
String
picture
)
{
this
.
picture
=
picture
;
}
...
...
module_home/src/main/res/drawable-xhdpi/icon_home_item_car_rental_sold_out.png
0 → 100644
View file @
2064a893
43.6 KB
module_home/src/main/res/layout/fragment_home.xml
View file @
2064a893
...
...
@@ -605,7 +605,7 @@
android:id=
"@+id/tv_hot_car_rental"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
优质车型
"
android:text=
"
购房车
"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_14"
/>
...
...
module_home/src/main/res/layout/rv_act_confim_order.xml
View file @
2064a893
...
...
@@ -61,15 +61,16 @@
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_12"
/>
<
Rating
Bar
<
com.frame.base.view.Star
Bar
android:id=
"@+id/rating_bar"
style=
"@style/fiveRatingBar"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/size_16"
android:layout_below=
"@id/tv_context"
android:layout_marginTop=
"@dimen/size_5"
android:numStars=
"5"
android:rating=
"4.5"
/>
android:layout_height=
"wrap_content"
app:starEmpty=
"@drawable/rv_vehicle_icon_star_gray"
app:starFill=
"@drawable/rv_vehicle_icon_star_light"
app:starDistance=
"3dp"
app:starCount=
"5"
app:isClick =
"true"
app:starSize=
"@dimen/size_12"
/>
<TextView
android:id=
"@+id/tv_price"
...
...
module_home/src/main/res/layout/rv_act_select_location.xml
View file @
2064a893
...
...
@@ -16,51 +16,84 @@
android:id=
"@+id/iv_logo"
android:layout_width=
"40dp"
android:layout_height=
"45dp"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_centerInParent=
"true"
android:layout_marginBottom=
"@dimen/size_15"
android:src=
"@drawable/rv_rentingcar_icon_stop_lever"
/>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_60"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
android:visibility=
"gone"
android:layout_alignParentBottom=
"true"
android:
textSize=
"@dimen/text_18
"
android:
background=
"@color/colorWrite
"
android:gravity=
"center"
android:textColor=
"@color/textMain"
android:background=
"@color/colorWrite"
/>
<FrameLayout
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
android:paddingTop=
"@dimen/size_8"
android:paddingBottom=
"@dimen/size_8"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_18"
android:visibility=
"gone"
/>
<FrameLayout
android:id=
"@+id/fl_search"
android:background=
"@color/colorWrite"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<EditText
android:background=
"@drawable/shape_rv_circly_line"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:paddingLeft=
"@dimen/size_15"
android:paddingTop=
"@dimen/size_8"
android:paddingRight=
"@dimen/size_15"
android:paddingBottom=
"@dimen/size_8"
>
<LinearLayout
android:layout_width=
"match_parent"
android:paddingLeft=
"@dimen/size_15"
android:textSize=
"@dimen/text_14"
android:drawablePadding=
"@dimen/size_15"
android:id=
"@+id/et_search"
android:drawableLeft=
"@drawable/search"
android:textColor=
"@color/textMain"
android:layout_height=
"@dimen/size_40"
android:hint=
"@string/rv_select_address_hint"
/>
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<LinearLayout
android:id=
"@+id/ll_item_car_city"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginRight=
"@dimen/size_5"
android:clickable=
"true"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_city"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"@dimen/ui_dimen_common_small"
android:text=
"东莞市"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/_ui_text_size_h6"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/rv_common_icon_up_arrow"
/>
</LinearLayout>
<EditText
android:id=
"@+id/et_search"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_40"
android:background=
"@drawable/shape_rv_circly_line"
android:drawableLeft=
"@drawable/search"
android:drawablePadding=
"@dimen/size_15"
android:hint=
"@string/rv_select_address_hint"
android:paddingLeft=
"@dimen/size_15"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_14"
/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:visibility=
"gone"
android:id=
"@+id/fl_rv"
android:layout_below=
"@id/fl_search"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<include
layout=
"@layout/common_rv"
/>
android:layout_height=
"match_parent"
android:layout_below=
"@id/fl_search"
android:visibility=
"gone"
>
<include
layout=
"@layout/common_rv"
/>
</FrameLayout>
...
...
module_home/src/main/res/layout/rv_item_car_rental_list.xml
View file @
2064a893
<?xml version="1.0" encoding="utf-8"?>
<
Fram
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Relativ
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:background=
"@color/colorLine"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
xmlns:ratingbar=
"http://schemas.android.com/apk/res-auto"
android:background=
"@color/colorLine"
>
<LinearLayout
android:padding=
"@dimen/size_15"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginBottom=
"@dimen/size_5"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:background=
"@color/colorWrite"
android:layout_height=
"wrap_content"
>
android:orientation=
"horizontal"
android:padding=
"@dimen/size_15"
>
<ImageView
android:id=
"@+id/iv_goods"
android:layout_width=
"@dimen/size_120"
android:layout_height=
"@dimen/size_100"
android:id=
"@+id/iv_goods"
android:scaleType=
"centerCrop"
/>
android:scaleType=
"centerCrop"
/>
<RelativeLayout
android:layout_marginLeft=
"@dimen/size_5"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_5"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:
maxLines=
"1
"
android:
layout_height=
"wrap_content
"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
""
android:id=
"@+id/tv_name"
android:textColor=
"@color/textMain"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/text_16"
/>
android:textSize=
"@dimen/text_16"
/>
<TextView
android:id=
"@+id/tv_address"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name"
android:layout_marginTop=
"@dimen/size_8"
android:layout_width=
"wrap_content"
android:maxLines=
"1"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
""
android:id=
"@+id/tv_address"
android:textColor=
"@color/textGray"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
<LinearLayout
android:layout_marginTop=
"@dimen/size_5"
android:orientation=
"horizontal"
android:id=
"@+id/ll_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_address"
android:layout_marginTop=
"@dimen/size_5"
android:gravity=
"center_vertical"
android:
layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:
orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_context"
android:layout_width=
"match_parent"
android:
maxLines=
"1
"
android:
layout_height=
"wrap_content
"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
""
android:id=
"@+id/tv_context"
android:textColor=
"@color/textGray"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
<TextView
android:
layout_marginLeft=
"@dimen/size_10
"
android:
id=
"@+id/tv_point
"
android:layout_width=
"wrap_content"
android:maxLines=
"1"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_10"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
""
android:id=
"@+id/tv_point"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_12"
/>
<com.frame.base.view.StarBar
android:id=
"@+id/starbar1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/text_12"
/>
<ImageView
android:layout_marginLeft=
"@dimen/size_5"
android:layout_width=
"@dimen/size_15"
android:layout_height=
"@dimen/size_15"
android:src=
"@drawable/rv_vehicle_icon_star_light"
/>
android:layout_marginLeft=
"@dimen/size_10"
ratingbar:starEmpty=
"@drawable/rv_vehicle_icon_star_gray"
ratingbar:starFill=
"@drawable/rv_vehicle_icon_star_light"
ratingbar:starDistance=
"3dp"
ratingbar:starCount=
"5"
ratingbar:isClick =
"true"
ratingbar:starSize=
"@dimen/size_12"
/>
<!--<RatingBar-->
<!--android:layout_marginTop="@dimen/size_5"-->
<!--android:layout_below="@id/tv_context"-->
<!--android:layout_width="wrap_content"-->
<!--style="@style/fiveRatingBar"-->
<!--android:numStars="5"-->
<!--android:id="@+id/rating_bar"-->
<!--android:rating="4.5"-->
<!--android:layout_height="@dimen/size_16"-->
<!--/>-->
<!--android:layout_marginTop="@dimen/size_5"-->
<!--android:layout_below="@id/tv_context"-->
<!--android:layout_width="wrap_content"-->
<!--style="@style/fiveRatingBar"-->
<!--android:numStars="5"-->
<!--android:id="@+id/rating_bar"-->
<!--android:rating="4.5"-->
<!--android:layout_height="@dimen/size_16"-->
<!--/>-->
</LinearLayout>
<LinearLayout
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/ll_content"
android:layout_marginTop=
"@dimen/size_5"
android:gravity=
"center_vertical"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:textSize=
"@dimen/text_16"
android:text=
""
android:textStyle=
"bold"
android:textColor=
"@color/colorAuxiliaryRed"
/>
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
""
android:textColor=
"@color/colorAuxiliaryRed"
android:textSize=
"@dimen/text_16"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_km"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_10"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
android:text=
""
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_10"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/iv_sold_out"
android:visibility=
"gone"
android:layout_width=
"@dimen/size_90"
android:layout_height=
"@dimen/size_90"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/size_10"
android:src=
"@drawable/icon_home_item_car_rental_sold_out"
/>
</RelativeLayout>
</LinearLayout>
</FrameLayout>
<TextView
android:visibility=
"gone"
android:id=
"@+id/tv_layout_gray"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_130"
android:background=
"@color/gray_50ffffff"
/>
</RelativeLayout>
module_home/src/main/res/values/strings.xml
View file @
2064a893
...
...
@@ -169,5 +169,6 @@
<string
name=
"rv_charge_details"
>
费用明细
</string>
<string
name=
"tv_boarding"
>
立即上车
</string>
<string
name=
"tv_cancelled"
>
已取消
</string>
<string
name=
"rv_collection_data_null"
>
您还没有收藏的信息哦
</string>
<!--=================================================房车结束========================================-->
</resources>
module_mine/src/main/java/com/rv/rvmine/MineFragment.java
View file @
2064a893
...
...
@@ -19,6 +19,7 @@ import com.base.utils.tools.android.IntentUtil;
import
com.base.utils.ui.image.round.RoundImageView
;
import
com.frame.base.browse.ActivityImageBrowseInt
;
import
com.frame.base.bus.LoginSuccessfulEvent
;
import
com.frame.base.bus.Observer
;
import
com.frame.base.bus.RxBus
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.SPConstance
;
...
...
@@ -64,7 +65,7 @@ import io.reactivex.schedulers.Schedulers;
/**
* 我的
*/
public
class
MineFragment
extends
BaseFragment
<
CommonPresenter
>
implements
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
public
class
MineFragment
extends
BaseFragment
<
CommonPresenter
>
implements
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
@BindView
(
R2
.
id
.
iv_avatar
)
RoundImageView
ivAvatar
;
...
...
@@ -160,20 +161,21 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simp
@SuppressLint
(
"CheckResult"
)
private
void
initRxBus
()
{
RxBus
.
tObservable
(
UserInfoEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
UserInfoEvent
>(
)
{
.
subscribe
(
new
Observer
<
UserInfoEvent
>(
disposable
)
{
@Override
public
void
accept
(
UserInfoEvent
info
)
throws
Exception
{
public
void
onNext
(
UserInfoEvent
info
)
{
getUserData
();
}
});
RxBus
.
tObservable
(
LoginSuccessfulEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
LoginSuccessfulEvent
>(
)
{
.
subscribe
(
new
Observer
<
LoginSuccessfulEvent
>(
disposable
)
{
@Override
public
void
accept
(
LoginSuccessfulEvent
event
)
throws
Exception
{
public
void
onNext
(
LoginSuccessfulEvent
event
)
{
getUserData
();
}
});
...
...
@@ -398,7 +400,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simp
tvMembershipLevel
.
setText
(
"钻石会员特权"
);
ivMember
.
setImageResource
(
R
.
drawable
.
mycenter_icon_type_diamond_membership
);
}
tvMemberHint
.
setText
(
"免费用车"
+
info
.
getRentFreeDays
()
+
"天"
);
tvMemberHint
.
setText
(
"免费用车"
+
info
.
getRentFreeDays
()
+
"天"
);
}
}
...
...
module_mine/src/main/java/com/rv/rvmine/traveler/CollectionActivity.java
View file @
2064a893
...
...
@@ -130,7 +130,7 @@ public class CollectionActivity extends BaseStatusActivity<CommonPresenter> impl
private
void
processData
(
CollectionListBean
bean
)
{
if
(
mPage
==
1
)
{
if
(
bean
.
getData
().
getTotalCount
()
==
0
)
{
collectionAdapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
mActivity
.
getString
(
R
.
string
.
rv_
driving
_data_null
)));
collectionAdapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
mActivity
.
getString
(
R
.
string
.
rv_
collection
_data_null
)));
return
;
}
...
...
module_mine/src/main/java/com/rv/rvmine/view/DeletePopupWindow.java
View file @
2064a893
...
...
@@ -19,8 +19,7 @@ public class DeletePopupWindow extends PopupWindow {
public
DeletePopupWindow
(
final
Activity
context
,
OnClickListener
onClickListener
)
{
super
(
context
);
LayoutInflater
inflater
=
(
LayoutInflater
)
context
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
LayoutInflater
inflater
=
(
LayoutInflater
)
context
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
ViewGroup
menuView
=
(
ViewGroup
)
inflater
.
inflate
(
R
.
layout
.
popu_delete
,
null
);
menuView
.
findViewById
(
R
.
id
.
tv_delete
).
setOnClickListener
(
onClickListener
);
...
...
module_tourism/src/main/java/com/rv/tourism/other/TravelerConfirmOrderActivity.java
View file @
2064a893
...
...
@@ -22,6 +22,8 @@ import com.alibaba.android.arouter.launcher.ARouter;
import
com.base.utils.tools.java.DateUtil
;
import
com.base.utils.ui.datetime.selector.util.TextUtil
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.frame.base.bus.CancelOrderEvent
;
import
com.frame.base.bus.Observer
;
import
com.frame.base.bus.PaymentFailedEvent
;
import
com.frame.base.bus.PaymentSuccessfulEvent
;
import
com.frame.base.bus.RxBus
;
...
...
@@ -194,20 +196,21 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
@SuppressLint
(
"CheckResult"
)
private
void
initRxBus
()
{
RxBus
.
tObservable
(
PaymentSuccessfulEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
PaymentSuccessfulEvent
>(
)
{
.
subscribe
(
new
Observer
<
PaymentSuccessfulEvent
>(
disposable
)
{
@Override
public
void
accept
(
PaymentSuccessfulEvent
payEvent
)
throws
Exception
{
public
void
onNext
(
PaymentSuccessfulEvent
event
)
{
finish
();
}
});
RxBus
.
tObservable
(
PaymentFailedEvent
.
class
)
.
observeOn
(
Schedulers
.
newThread
())
.
subscribe
(
new
Consumer
<
PaymentFailedEvent
>(
)
{
.
subscribe
(
new
Observer
<
PaymentFailedEvent
>(
disposable
)
{
@Override
public
void
accept
(
PaymentFailedEvent
payEvent
)
throws
Exception
{
public
void
onNext
(
PaymentFailedEvent
event
)
{
if
(
mActivity
.
getClass
().
equals
(
TravelerConfirmOrderActivity
.
class
))
{
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_ORDERLIST
).
navigation
();
finish
();
...
...
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