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
7926b332
Commit
7926b332
authored
Jul 30, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改租车公司的ui
parent
6d68f8c0
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
308 additions
and
264 deletions
+308
-264
CarRentalListActivity.java
...rv/home/rv/module/ui/main/home/CarRentalListActivity.java
+24
-1
CityListActivity.java
.../com/rv/home/rv/module/ui/main/home/CityListActivity.java
+27
-25
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+41
-60
SelectShopActivity.java
...om/rv/home/rv/module/ui/main/home/SelectShopActivity.java
+9
-4
CityListAdapter.java
.../home/rv/module/ui/main/home/adapter/CityListAdapter.java
+33
-3
SelectShopAdapter.java
...ome/rv/module/ui/main/home/adapter/SelectShopAdapter.java
+11
-4
shape_bg_select_company_search_position.xml
...rawable-xhdpi/shape_bg_select_company_search_position.xml
+10
-0
fragment_home.xml
module_home/src/main/res/layout/fragment_home.xml
+21
-58
rv_act_car_rental_list.xml
module_home/src/main/res/layout/rv_act_car_rental_list.xml
+26
-21
rv_act_city_list.xml
module_home/src/main/res/layout/rv_act_city_list.xml
+31
-29
rv_act_shop_select.xml
module_home/src/main/res/layout/rv_act_shop_select.xml
+23
-37
rv_item_select_shop.xml
module_home/src/main/res/layout/rv_item_select_shop.xml
+9
-11
rv_list_hot_city.xml
module_home/src/main/res/layout/rv_list_hot_city.xml
+36
-3
select_shop_empty.xml
module_home/src/main/res/layout/select_shop_empty.xml
+3
-4
strings.xml
module_home/src/main/res/values/strings.xml
+4
-4
No files found.
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/CarRentalListActivity.java
View file @
7926b332
...
@@ -19,6 +19,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
...
@@ -19,6 +19,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import
com.frame.base.url.Constance
;
import
com.frame.base.url.Constance
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.inter.OnViewHolder
;
import
com.ruiwenliu.wrapper.util.TimeManager
;
import
com.ruiwenliu.wrapper.util.TimeManager
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
...
@@ -313,7 +314,7 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
...
@@ -313,7 +314,7 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
countPage
=
bean
.
getData
().
getTotalPage
();
countPage
=
bean
.
getData
().
getTotalPage
();
mAdapter
.
setNewData
(
bean
.
getData
().
getData
());
mAdapter
.
setNewData
(
bean
.
getData
().
getData
());
if
(
bean
.
getData
().
getTotalCount
()
==
0
)
{
if
(
bean
.
getData
().
getTotalCount
()
==
0
)
{
mAdapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
mActivity
.
getString
(
R
.
string
.
rv_car_type_data_null
)
));
mAdapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
"暂无房车,请更改取车公司或时间"
));
mAdapter
.
notifyDataSetChanged
();
mAdapter
.
notifyDataSetChanged
();
}
}
...
@@ -480,4 +481,26 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
...
@@ -480,4 +481,26 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
public
void
onRefresh
()
{
public
void
onRefresh
()
{
onFresh
();
onFresh
();
}
}
/**
* 获取通用空布局
*
* @param mRecyclerView
* @param imageId
* @param empty
* @return
*/
protected
View
getEmptyView
(
RecyclerView
mRecyclerView
,
final
int
imageId
,
final
String
empty
)
{
return
getHelperView
(
mRecyclerView
,
R
.
layout
.
select_shop_empty
,
new
OnViewHolder
()
{
@Override
public
void
helper
(
ViewHolder
helper
)
{
if
(
imageId
!=
-
1
)
{
helper
.
setImageResource
(
com
.
ruiwenliu
.
wrapper
.
R
.
id
.
iv_flag
,
imageId
);
}
helper
.
setText
(
com
.
ruiwenliu
.
wrapper
.
R
.
id
.
tv_tip
,
empty
);
}
});
}
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/CityListActivity.java
View file @
7926b332
...
@@ -15,11 +15,14 @@ import android.widget.EditText;
...
@@ -15,11 +15,14 @@ import android.widget.EditText;
import
com.alibaba.android.arouter.facade.annotation.Autowired
;
import
com.alibaba.android.arouter.facade.annotation.Autowired
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.baidu.location.BDAbstractLocationListener
;
import
com.baidu.location.BDLocation
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.frame.base.url.Constance
;
import
com.frame.base.url.Constance
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.util.LocationManager
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.utils.LogUtil
;
import
com.rv.component.utils.LogUtil
;
import
com.rv.home.R
;
import
com.rv.home.R
;
...
@@ -60,13 +63,9 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -60,13 +63,9 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
String
mNowCity
;
String
mNowCity
;
@Autowired
@Autowired
int
mCityId
;
int
mCityId
;
// private Map<String,String> mapSave;
private
Disposable
mDisposable
=
null
;
private
Disposable
mDisposable
=
null
;
private
CityListAdapter
cityListAdapter
;
private
CityListAdapter
cityListAdapter
;
private
LocationManager
locationManager
;
// public static Intent getIntent(Context context, int type, String city, int id) {
// return new Intent(context, CityListActivity.class).putExtra("type", type).putExtra("location", city).putExtra("id", id);
// }
@Override
@Override
protected
int
setLayout
()
{
protected
int
setLayout
()
{
...
@@ -76,16 +75,8 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -76,16 +75,8 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
@Override
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
titleView
.
setTitle
(
mActivity
.
getString
(
R
.
string
.
rv_city_list
));
titleView
.
setTitle
(
mActivity
.
getString
(
R
.
string
.
rv_city_list
));
// String jsonCity= UtilsManager.getInstance(mActivity).getSPStringCode("city_json", "city");
titleView
.
setImageResource
(
R
.
id
.
iv_title_left
,
R
.
drawable
.
rv_common_icon_back_white
);
// if(!TextUtils.isEmpty(jsonCity)){
cityListAdapter
=
new
CityListAdapter
(
new
ArrayList
<
MultiItemBean
>(),
listener
,
mNowCity
);
// Log.d("===tag===",jsonCity);
// }
// mCityType = intent.getIntExtra("type", 1);
// mNowCity = intent.getStringExtra("location");
// mCityId = intent.getIntExtra("id", 1);
// hotCityAdapter = new HotCityAdapter(this, getHotCitys());
// gridView.setAdapter(hotCityAdapter);
cityListAdapter
=
new
CityListAdapter
(
new
ArrayList
<
MultiItemBean
>(),
listener
);
recyclerView
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
6
));
recyclerView
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
6
));
recyclerView
.
setAdapter
(
cityListAdapter
);
recyclerView
.
setAdapter
(
cityListAdapter
);
cityListAdapter
.
setSpanSizeLookup
(
new
BaseQuickAdapter
.
SpanSizeLookup
()
{
cityListAdapter
.
setSpanSizeLookup
(
new
BaseQuickAdapter
.
SpanSizeLookup
()
{
...
@@ -192,10 +183,6 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -192,10 +183,6 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
* 传送数据
* 传送数据
*/
*/
private
void
sendData
(
String
name
,
int
id
)
{
private
void
sendData
(
String
name
,
int
id
)
{
// if(mapSave==null){
// mapSave=new LinkedHashMap<>();
// }
// mapSave.put(name,name);
getIntent
().
putExtra
(
"location"
,
name
);
getIntent
().
putExtra
(
"location"
,
name
);
getIntent
().
putExtra
(
"id"
,
id
);
getIntent
().
putExtra
(
"id"
,
id
);
getIntent
().
putExtra
(
"type"
,
mCityType
);
getIntent
().
putExtra
(
"type"
,
mCityType
);
...
@@ -206,14 +193,14 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -206,14 +193,14 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
@Override
@Override
public
void
onDestroy
()
{
public
void
onDestroy
()
{
// if(mapSave!=null){
// UtilsManager.getInstance(mActivity).setSharePreferencesSave("city_json").putString("city", JSON.toJSONString(mapSave)).commit();
// UtilsManager.getInstance(mActivity).setShNull();
// }
if
(
mDisposable
!=
null
)
{
if
(
mDisposable
!=
null
)
{
mDisposable
.
dispose
();
mDisposable
.
dispose
();
mDisposable
=
null
;
mDisposable
=
null
;
}
}
if
(
locationManager
!=
null
)
{
locationManager
.
onDestroy
();
}
super
.
onDestroy
();
super
.
onDestroy
();
}
}
...
@@ -260,9 +247,24 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -260,9 +247,24 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
public
void
click
(
HotCityBean
hotCityBean
)
{
public
void
click
(
HotCityBean
hotCityBean
)
{
sendData
(
hotCityBean
.
hotCityName
,
hotCityBean
.
hotCityId
);
sendData
(
hotCityBean
.
hotCityName
,
hotCityBean
.
hotCityId
);
}
}
};
@Override
public
void
reRelocation
()
{
createLoadingDialog
().
show
();
if
(
locationManager
==
null
)
{
locationManager
=
new
LocationManager
(
getApplicationContext
());
}
locationManager
.
getLocationDetail
(
new
BDAbstractLocationListener
()
{
@Override
public
void
onReceiveLocation
(
BDLocation
location
)
{
createLoadingDialog
().
dismiss
();
mNowCity
=
location
.
getCity
();
cityListAdapter
.
setCurrentCity
(
mNowCity
);
locationManager
.
stopLocation
();
}
});
}
};
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
7926b332
...
@@ -22,7 +22,6 @@ import android.view.ViewTreeObserver;
...
@@ -22,7 +22,6 @@ import android.view.ViewTreeObserver;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.Switch
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alibaba.android.arouter.launcher.ARouter
;
...
@@ -102,12 +101,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -102,12 +101,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
TextView
tvItemRvTour
;
TextView
tvItemRvTour
;
@BindView
(
R2
.
id
.
tv_item_renting_a_car
)
@BindView
(
R2
.
id
.
tv_item_renting_a_car
)
TextView
tvItemRentingACar
;
TextView
tvItemRentingACar
;
@BindView
(
R2
.
id
.
tv_get_city
)
TextView
headTvGetCity
;
@BindView
(
R2
.
id
.
tv_get_address
)
@BindView
(
R2
.
id
.
tv_get_address
)
TextView
headTvGetShop
;
TextView
headTvGetShop
;
@BindView
(
R2
.
id
.
tv_out_city
)
TextView
headTvOutCity
;
@BindView
(
R2
.
id
.
tv_out_address
)
@BindView
(
R2
.
id
.
tv_out_address
)
TextView
headTvOutShop
;
TextView
headTvOutShop
;
@BindView
(
R2
.
id
.
tv_get_time
)
@BindView
(
R2
.
id
.
tv_get_time
)
...
@@ -190,9 +185,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -190,9 +185,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
private
List
<
String
>
titles
=
new
ArrayList
<>();
//图片标题
private
List
<
String
>
titles
=
new
ArrayList
<>();
//图片标题
Unbinder
unbinder1
;
Unbinder
unbinder1
;
private
final
int
TYPE_REQUEST_CITY
=
1
;
//城市列表
private
final
int
TYPE_REQUEST_CITY
=
1
;
//城市列表
private
final
int
TYPE_REQUEST_SHOP
=
2
;
//门店列表
private
final
int
TYPE_REQUEST_ADDRESS
=
3
;
//地址选择
private
final
int
REQUEST_GET_CODE
=
10001
;
// 取车地址选择请求码
private
final
int
REQUEST_GET_CODE
=
10001
;
// 取车地址选择请求码
private
final
int
REQUEST_RETURN_CODE
=
10002
;
// 换车地址选择请求码
private
final
int
REQUEST_RETURN_CODE
=
10002
;
// 换车地址选择请求码
...
@@ -208,6 +200,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -208,6 +200,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
private
LatLng
mLatLng
;
//当前城市经纬度
private
LatLng
mLatLng
;
//当前城市经纬度
private
int
getCompanyId
;
// 取车公司id
private
int
getCompanyId
;
// 取车公司id
private
int
outCompanyId
;
// 取车公司id;
private
double
getLatitude
;
private
double
getLatitude
;
private
double
getLongitude
;
private
double
getLongitude
;
private
double
outLatitude
=
0
;
private
double
outLatitude
=
0
;
...
@@ -263,13 +256,12 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -263,13 +256,12 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
permissionProcess
();
permissionProcess
();
setBanner
();
setBanner
();
tvDay
.
setText
(
String
.
format
(
"%1$s%2$s"
,
copyDay
,
getContext
().
getString
(
R
.
string
.
rv_days
)));
tvDay
.
setText
(
String
.
format
(
"%1$s%2$s"
,
copyDay
,
getContext
().
getString
(
R
.
string
.
rv_days
)));
tvGetTime
.
setText
(
DateUtils
.
formatDate8
(
DateUtils
.
getCurDateTime
()));
tvGetWeek
.
setText
(
"周"
+
MyUtils
.
getWeek
(
DateUtils
.
getCurDate
()));
tvOutTime
.
setText
(
MyUtils
.
getFetureDate2
(
1
));
tvOutWeek
.
setText
(
"周"
+
MyUtils
.
getWeek
(
MyUtils
.
getFetureDate
(
1
)));
begDate
=
DateUtils
.
formatDate8
(
DateUtils
.
getCurDateTime
());
begDate
=
DateUtils
.
formatDate8
(
DateUtils
.
getCurDateTime
());
tvGetTime
.
setText
(
DateUtils
.
formatDate66
(
begDate
));
tvGetWeek
.
setText
(
"周"
+
MyUtils
.
getWeek
(
DateUtils
.
getCurDate
()));
endDate
=
MyUtils
.
getFetureDate2
(
1
);
endDate
=
MyUtils
.
getFetureDate2
(
1
);
tvOutTime
.
setText
(
DateUtils
.
formatDate66
(
endDate
));
tvOutWeek
.
setText
(
"周"
+
MyUtils
.
getWeek
(
MyUtils
.
getFetureDate
(
1
)));
copyDay
=
DateUtils
.
compareDateDay
(
MyUtils
.
getFetureDate
(
1
),
DateUtils
.
getCurDate
())
+
1
;
copyDay
=
DateUtils
.
compareDateDay
(
MyUtils
.
getFetureDate
(
1
),
DateUtils
.
getCurDate
())
+
1
;
...
@@ -531,7 +523,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -531,7 +523,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
if
(
bean
!=
null
&&
bean
.
getData
()
!=
null
&&
bean
.
getData
().
size
()
>
0
)
{
if
(
bean
!=
null
&&
bean
.
getData
()
!=
null
&&
bean
.
getData
().
size
()
>
0
)
{
mActivityAdapter
.
setNewData
(
bean
.
getData
());
mActivityAdapter
.
setNewData
(
bean
.
getData
());
}
}
break
;
break
;
}
}
...
@@ -556,8 +547,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -556,8 +547,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
}
}
@OnClick
({
R2
.
id
.
travel_city_layout
,
R2
.
id
.
ll_item_search
,
R2
.
id
.
tv_item_rv_tour
,
R2
.
id
.
tv_item_renting_a_car
,
R2
.
id
.
tv_get_city
,
@OnClick
({
R2
.
id
.
travel_city_layout
,
R2
.
id
.
ll_item_search
,
R2
.
id
.
tv_item_rv_tour
,
R2
.
id
.
tv_item_renting_a_car
,
R2
.
id
.
tv_
out_city
,
R2
.
id
.
tv_
get_address
,
R2
.
id
.
tv_out_address
,
R2
.
id
.
ll_item_select_data
,
R2
.
id
.
tv_select_car
,
R2
.
id
.
tv_get_address
,
R2
.
id
.
tv_out_address
,
R2
.
id
.
ll_item_select_data
,
R2
.
id
.
tv_select_car
,
R2
.
id
.
ll_item_rv_city
,
R2
.
id
.
tv_book_now
,
R2
.
id
.
ll_item_rv_hot_label1
,
R2
.
id
.
ll_item_rv_hot_label2
,
R2
.
id
.
ll_item_rv_hot_label3
,
R2
.
id
.
ll_item_rv_city
,
R2
.
id
.
tv_book_now
,
R2
.
id
.
ll_item_rv_hot_label1
,
R2
.
id
.
ll_item_rv_hot_label2
,
R2
.
id
.
ll_item_rv_hot_label3
,
R2
.
id
.
ll_item_hot_rvtour
,
R2
.
id
.
ll_item_hot_entertainment_camp
,
R2
.
id
.
ll_item_hot_car_rental
,
R2
.
id
.
tv_see_more_popular
,
R2
.
id
.
ll_item_hot_rvtour
,
R2
.
id
.
ll_item_hot_entertainment_camp
,
R2
.
id
.
ll_item_hot_car_rental
,
R2
.
id
.
tv_see_more_popular
,
R2
.
id
.
ll_item_top
,
R2
.
id
.
travel_server_image
,
R2
.
id
.
tv_car_rental_guide
,
R2
.
id
.
ll_item_activity_all
,
R2
.
id
.
ll_rent
,
R2
.
id
.
ll_return
,
R2
.
id
.
cardview
})
R2
.
id
.
ll_item_top
,
R2
.
id
.
travel_server_image
,
R2
.
id
.
tv_car_rental_guide
,
R2
.
id
.
ll_item_activity_all
,
R2
.
id
.
ll_rent
,
R2
.
id
.
ll_return
,
R2
.
id
.
cardview
})
...
@@ -592,7 +583,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -592,7 +583,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
tvItemRentingACar
.
setSelected
(
true
);
tvItemRentingACar
.
setSelected
(
true
);
llLayoutRentingACar
.
setVisibility
(
View
.
GONE
);
llLayoutRentingACar
.
setVisibility
(
View
.
GONE
);
llLayoutRvTour
.
setVisibility
(
View
.
VISIBLE
);
llLayoutRvTour
.
setVisibility
(
View
.
VISIBLE
);
}
else
if
(
id
==
R
.
id
.
tv_get_
city
||
id
==
R
.
id
.
tv_get_
address
||
id
==
R
.
id
.
ll_rent
)
{
}
else
if
(
id
==
R
.
id
.
tv_get_address
||
id
==
R
.
id
.
ll_rent
)
{
ARouter
.
getInstance
()
ARouter
.
getInstance
()
.
build
(
Constance
.
ACTIVITY_URL_SELECTSHOP
)
.
build
(
Constance
.
ACTIVITY_URL_SELECTSHOP
)
.
withDouble
(
"mLat"
,
latLatitude
)
.
withDouble
(
"mLat"
,
latLatitude
)
...
@@ -601,7 +592,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -601,7 +592,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
.
withInt
(
"shopType"
,
1
)
.
withInt
(
"shopType"
,
1
)
.
navigation
(
_mActivity
,
TYPE_REQUEST_CITY
);
.
navigation
(
_mActivity
,
TYPE_REQUEST_CITY
);
// startActivityForResult(SelectShopActivity.getIntent(getActivity(), 1, "", , latLatitude, lonLongitude), TYPE_REQUEST_CITY);
// startActivityForResult(SelectShopActivity.getIntent(getActivity(), 1, "", , latLatitude, lonLongitude), TYPE_REQUEST_CITY);
}
else
if
(
id
==
R
.
id
.
tv_out_city
||
id
==
R
.
id
.
ll_return
||
id
==
R
.
id
.
tv_out_address
)
{
}
else
if
(
id
==
R
.
id
.
ll_return
||
id
==
R
.
id
.
tv_out_address
)
{
ARouter
.
getInstance
()
ARouter
.
getInstance
()
.
build
(
Constance
.
ACTIVITY_URL_SELECTSHOP
)
.
build
(
Constance
.
ACTIVITY_URL_SELECTSHOP
)
.
withDouble
(
"mLat"
,
latLatitude
)
.
withDouble
(
"mLat"
,
latLatitude
)
...
@@ -630,13 +621,13 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -630,13 +621,13 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
return
;
return
;
}
}
sendData
(
headTvGetCity
.
getText
().
toString
().
trim
()
,
sendData
(
getCityName
,
headTvGetShop
.
getText
().
toString
().
trim
(),
headTvGetShop
.
getText
().
toString
().
trim
(),
headTvOutCity
.
getText
().
toString
().
trim
()
,
outCityName
,
headTvOutShop
.
getText
().
toString
().
trim
(),
headTvOutShop
.
getText
().
toString
().
trim
(),
begDate
,
endDate
,
copyDay
,
begDate
,
endDate
,
copyDay
,
tvGetTime
.
getText
().
toString
().
trim
()
,
begDate
,
tvOutTime
.
getText
().
toString
().
trim
()
endDate
);
);
}
else
if
(
id
==
R
.
id
.
ll_item_rv_city
)
{
}
else
if
(
id
==
R
.
id
.
ll_item_rv_city
)
{
//房车游选择城市
//房车游选择城市
...
@@ -802,52 +793,45 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -802,52 +793,45 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
String
companyName
=
data
.
getStringExtra
(
"company"
);
String
companyName
=
data
.
getStringExtra
(
"company"
);
getCompanyId
=
data
.
getIntExtra
(
"company_id"
,
1
);
getCompanyId
=
data
.
getIntExtra
(
"company_id"
,
1
);
getCityName
=
requestData
;
getCityName
=
requestData
;
headTvGetShop
.
setText
(
companyName
);
getCityId
=
data
.
getIntExtra
(
"id"
,
0
);
getCityId
=
data
.
getIntExtra
(
"id"
,
0
);
String
getAddress
=
"%s(%s)"
;
headTvGetShop
.
setText
(
String
.
format
(
getAddress
,
new
String
[]{
companyName
,
getCityName
}));
getLatitude
=
data
.
getDoubleExtra
(
"latitude"
,
0
);
getLatitude
=
data
.
getDoubleExtra
(
"latitude"
,
0
);
getLongitude
=
data
.
getDoubleExtra
(
"longitude"
,
0
);
getLongitude
=
data
.
getDoubleExtra
(
"longitude"
,
0
);
setRequestData
(
type
,
requestData
,
headTvGetCity
,
headTvOutCity
,
getLatitude
,
getLongitude
);
setRequestData
(
type
,
requestData
,
getLatitude
,
getLongitude
);
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
outCityName
=
requestData
;
String
companyName
=
data
.
getStringExtra
(
"company"
);
String
companyName
=
data
.
getStringExtra
(
"company"
);
headTvOutShop
.
setText
(
companyName
);
outCompanyId
=
data
.
getIntExtra
(
"company_id"
,
1
);
outCityName
=
requestData
;
outCityId
=
data
.
getIntExtra
(
"id"
,
0
);
outCityId
=
data
.
getIntExtra
(
"id"
,
0
);
String
outAddress
=
"%s(%s)"
;
headTvOutShop
.
setText
(
String
.
format
(
outAddress
,
new
String
[]{
companyName
,
outCityName
}));
outLatitude
=
data
.
getDoubleExtra
(
"latitude"
,
0
);
outLatitude
=
data
.
getDoubleExtra
(
"latitude"
,
0
);
outLongitude
=
data
.
getDoubleExtra
(
"longitude"
,
0
);
outLongitude
=
data
.
getDoubleExtra
(
"longitude"
,
0
);
setRequestData
(
type
,
requestData
,
headTvGetCity
,
headTvOutCity
,
outLatitude
,
outLongitude
);
setRequestData
(
type
,
requestData
,
outLatitude
,
outLongitude
);
}
else
if
(
type
==
3
)
{
}
else
if
(
type
==
3
)
{
tvRvCity
.
setText
(
""
);
tvRvCity
.
setText
(
""
);
vVTourCityId
=
data
.
getIntExtra
(
"id"
,
0
);
vVTourCityId
=
data
.
getIntExtra
(
"id"
,
0
);
setRequestData
(
type
,
requestData
,
headTvGetCity
,
headTvOutCity
,
0
,
0
);
setRequestData
(
type
,
requestData
,
0
,
0
);
}
else
if
(
type
==
4
)
{
}
else
if
(
type
==
4
)
{
travelCityText
.
setText
(
""
);
travelCityText
.
setText
(
""
);
mTravelCityId
=
data
.
getIntExtra
(
"id"
,
0
);
mTravelCityId
=
data
.
getIntExtra
(
"id"
,
0
);
getCityId
=
mTravelCityId
;
getCityId
=
outCityId
=
mTravelCityId
;
outCityId
=
mTravelCityId
;
getCityName
=
outCityName
=
requestData
;
getCityName
=
requestData
;
outCityName
=
requestData
;
vVTourCityId
=
mTravelCityId
;
vVTourCityId
=
mTravelCityId
;
setRequestData
(
type
,
requestData
,
headTvGetCity
,
headTvOutCity
,
0
,
0
);
setRequestData
(
type
,
requestData
,
0
,
0
);
}
}
break
;
break
;
case
TYPE_REQUEST_SHOP:
//门店
setRequestData
(
type
,
requestData
,
headTvGetShop
,
headTvOutShop
,
0
,
0
);
break
;
case
TYPE_REQUEST_ADDRESS:
//地址
double
lat
=
data
.
getDoubleExtra
(
"latitude"
,
0
);
double
lon
=
data
.
getDoubleExtra
(
"longitude"
,
0
);
setRequestData
(
type
,
requestData
,
headTvGetShop
,
headTvOutShop
,
lat
,
lon
);
break
;
}
}
}
else
if
(
resultCode
==
200
&&
requestCode
==
108
)
{
}
else
if
(
resultCode
==
200
&&
requestCode
==
108
)
{
begDate
=
data
.
getStringExtra
(
"begDate"
);
begDate
=
data
.
getStringExtra
(
"begDate"
);
endDate
=
data
.
getStringExtra
(
"endDate"
);
endDate
=
data
.
getStringExtra
(
"endDate"
);
copyDay
=
DateUtils
.
compareDateDay
(
endDate
,
begDate
)
+
1
;
copyDay
=
DateUtils
.
compareDateDay
(
endDate
,
begDate
)
+
1
;
if
(
tvGetTime
!=
null
)
{
if
(
tvGetTime
!=
null
)
{
tvGetTime
.
setText
(
begDate
);
tvGetTime
.
setText
(
DateUtils
.
formatDate66
(
begDate
)
);
}
}
if
(
tvOutTime
!=
null
)
{
if
(
tvOutTime
!=
null
)
{
tvOutTime
.
setText
(
endDate
);
tvOutTime
.
setText
(
DateUtils
.
formatDate66
(
endDate
)
);
}
}
if
(
tvGetWeek
!=
null
)
{
if
(
tvGetWeek
!=
null
)
{
tvGetWeek
.
setText
(
"周"
+
MyUtils
.
getWeek
(
begDate
));
tvGetWeek
.
setText
(
"周"
+
MyUtils
.
getWeek
(
begDate
));
...
@@ -867,21 +851,16 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -867,21 +851,16 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
*
*
* @param type
* @param type
* @param data
* @param data
* @param tvGet
* @param tvOut
* @param lat
* @param lat
* @param lon
* @param lon
*/
*/
private
void
setRequestData
(
int
type
,
String
data
,
TextView
tvGet
,
TextView
tvOut
,
double
lat
,
double
lon
)
{
private
void
setRequestData
(
int
type
,
String
data
,
double
lat
,
double
lon
)
{
if
(
tvGet
==
null
)
{
return
;
}
switch
(
type
)
{
switch
(
type
)
{
case
1
:
case
1
:
tvGet
.
setText
(
data
);
//
tvGet.setText(data);
break
;
break
;
case
2
:
case
2
:
tvOut
.
setText
(
data
);
//
tvOut.setText(data);
break
;
break
;
case
3
:
case
3
:
rvTourLatitude
=
lat
;
rvTourLatitude
=
lat
;
...
@@ -890,8 +869,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -890,8 +869,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
break
;
break
;
case
4
:
case
4
:
travelCityText
.
setText
(
data
);
travelCityText
.
setText
(
data
);
headTvGetCity
.
setText
(
data
);
//
headTvGetCity.setText(data);
headTvOutCity
.
setText
(
data
);
//
headTvOutCity.setText(data);
tvRvCity
.
setText
(
data
);
tvRvCity
.
setText
(
data
);
getShopList
(
false
);
getShopList
(
false
);
// geoCoder.geocode(new GeoCodeOption()
// geoCoder.geocode(new GeoCodeOption()
...
@@ -968,7 +947,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -968,7 +947,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
private
void
processData
(
ShopListBean
bean
)
{
private
void
processData
(
ShopListBean
bean
)
{
if
(
bean
.
getData
()
!=
null
&&
bean
.
getData
().
getTotalCount
()
>
0
)
{
if
(
bean
.
getData
()
!=
null
&&
bean
.
getData
().
getTotalCount
()
>
0
)
{
if
(
headTvGetShop
!=
null
)
{
if
(
headTvGetShop
!=
null
)
{
headTvGetShop
.
setText
(
bean
.
getData
().
getData
().
get
(
0
).
getName
());
String
getAdress
=
"%s(%s)"
;
headTvGetShop
.
setText
(
String
.
format
(
getAdress
,
new
String
[]{
bean
.
getData
().
getData
().
get
(
0
).
getName
(),
getCityName
}));
headTvGetShop
.
setTextColor
(
_mActivity
.
getResources
().
getColor
(
R
.
color
.
colorMain
));
headTvGetShop
.
setTextColor
(
_mActivity
.
getResources
().
getColor
(
R
.
color
.
colorMain
));
getLatitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLatitude
();
getLatitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLatitude
();
getLongitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLongitude
();
getLongitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLongitude
();
...
@@ -976,7 +956,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -976,7 +956,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
}
}
if
(
headTvOutShop
!=
null
)
{
if
(
headTvOutShop
!=
null
)
{
headTvOutShop
.
setText
(
bean
.
getData
().
getData
().
get
(
0
).
getName
());
String
getAdress
=
"%s(%s)"
;
headTvOutShop
.
setText
(
String
.
format
(
getAdress
,
new
String
[]{
bean
.
getData
().
getData
().
get
(
0
).
getName
(),
outCityName
}));
headTvOutShop
.
setTextColor
(
_mActivity
.
getResources
().
getColor
(
R
.
color
.
colorMain
));
headTvOutShop
.
setTextColor
(
_mActivity
.
getResources
().
getColor
(
R
.
color
.
colorMain
));
outLatitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLatitude
();
outLatitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLatitude
();
outLongitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLongitude
();
outLongitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLongitude
();
...
@@ -1013,8 +994,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -1013,8 +994,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"page"
,
1
);
map
.
put
(
"page"
,
1
);
map
.
put
(
"limit"
,
1
);
map
.
put
(
"limit"
,
1
);
// map.put("lat", lat);
// map.put("lon", lon);
map
.
put
(
"addrCity"
,
String
.
valueOf
(
addrCity
));
map
.
put
(
"addrCity"
,
String
.
valueOf
(
addrCity
));
mPresenter
.
getData
(
RvFrameConfig
.
VEHICLE_POST
,
0
,
ApiConfig
.
HTTP_URL_SHOP_LIST
,
ShopListBean
.
class
,
map
,
false
);
mPresenter
.
getData
(
RvFrameConfig
.
VEHICLE_POST
,
0
,
ApiConfig
.
HTTP_URL_SHOP_LIST
,
ShopListBean
.
class
,
map
,
false
);
}
}
...
@@ -1197,13 +1176,12 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -1197,13 +1176,12 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
mLatLng
=
new
LatLng
(
location
.
getLatitude
(),
location
.
getLongitude
());
mLatLng
=
new
LatLng
(
location
.
getLatitude
(),
location
.
getLongitude
());
getCityId
=
0
;
getCityId
=
0
;
outCityId
=
0
;
outCityId
=
0
;
headTvGetCity
.
setText
(
location
.
getCity
());
getCityName
=
outCityName
=
location
.
getCity
();
headTvOutCity
.
setText
(
location
.
getCity
());
tvRvCity
.
setText
(
location
.
getCity
());
tvRvCity
.
setText
(
location
.
getCity
());
travelCityText
.
setText
(
location
.
getCity
());
travelCityText
.
setText
(
location
.
getCity
());
rvTourLatitude
=
latLatitude
;
rvTourLatitude
=
latLatitude
;
rvTourLongitude
=
lonLongitude
;
rvTourLongitude
=
lonLongitude
;
nowCity
=
location
.
getCity
();
getCityName
=
outCityName
=
nowCity
=
location
.
getCity
();
locationManager
.
stopLocation
();
locationManager
.
stopLocation
();
getShopList
(
true
);
getShopList
(
true
);
}
}
...
@@ -1216,5 +1194,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -1216,5 +1194,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
if
(
geoCoder
!=
null
)
{
if
(
geoCoder
!=
null
)
{
geoCoder
.
destroy
();
geoCoder
.
destroy
();
}
}
if
(
locationManager
!=
null
)
{
locationManager
.
onDestroy
();
}
}
}
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/SelectShopActivity.java
View file @
7926b332
...
@@ -90,10 +90,14 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl
...
@@ -90,10 +90,14 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl
@Override
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
titleView
.
setTitle
(
mActivity
.
getString
(
R
.
string
.
rv_select_shop
));
if
(
shopType
==
1
)
{
titleView
.
setTitle
(
"选择取车公司"
);
}
else
if
(
shopType
==
2
)
{
titleView
.
setTitle
(
"选择还车公司"
);
}
titleView
.
setImageResource
(
R
.
id
.
iv_title_left
,
R
.
drawable
.
rv_common_icon_back_white
);
if
(!
TextUtils
.
isEmpty
(
cityName
))
{
if
(!
TextUtils
.
isEmpty
(
cityName
))
{
tvCurrentCity
.
setText
(
"当前选择城市: "
+
cityName
);
tvCurrentCity
.
setText
(
cityName
);
}
}
getCityId
();
getCityId
();
mAdapter
=
new
SelectShopAdapter
();
mAdapter
=
new
SelectShopAdapter
();
...
@@ -127,6 +131,7 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl
...
@@ -127,6 +131,7 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl
ARouter
.
getInstance
()
ARouter
.
getInstance
()
.
build
(
Constance
.
ACTIVITY_URL_CITYLIST
)
.
build
(
Constance
.
ACTIVITY_URL_CITYLIST
)
.
withInt
(
"mCityType"
,
2
)
.
withInt
(
"mCityType"
,
2
)
.
withString
(
"mNowCity"
,
cityName
)
.
navigation
(
SelectShopActivity
.
this
,
TYPE_REQUEST_CITY
);
.
navigation
(
SelectShopActivity
.
this
,
TYPE_REQUEST_CITY
);
}
}
});
});
...
@@ -175,7 +180,7 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl
...
@@ -175,7 +180,7 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl
processData
((
ShopListBean
)
result
);
processData
((
ShopListBean
)
result
);
}
else
{
}
else
{
mAdapter
.
getData
().
clear
();
mAdapter
.
getData
().
clear
();
mAdapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
getString
(
R
.
string
.
rv_select_not_data
)
));
mAdapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
"暂无分公司,请换个城市试试!"
));
mAdapter
.
notifyDataSetChanged
();
mAdapter
.
notifyDataSetChanged
();
mAdapter
.
loadMoreComplete
();
mAdapter
.
loadMoreComplete
();
}
}
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/adapter/CityListAdapter.java
View file @
7926b332
...
@@ -4,6 +4,7 @@ import android.text.TextUtils;
...
@@ -4,6 +4,7 @@ import android.text.TextUtils;
import
android.view.View
;
import
android.view.View
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
import
android.widget.GridView
;
import
android.widget.GridView
;
import
android.widget.TextView
;
import
com.chad.library.adapter.base.BaseMultiItemQuickAdapter
;
import
com.chad.library.adapter.base.BaseMultiItemQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.BaseViewHolder
;
...
@@ -28,16 +29,24 @@ public class CityListAdapter extends BaseMultiItemQuickAdapter<MultiItemBean, Ba
...
@@ -28,16 +29,24 @@ public class CityListAdapter extends BaseMultiItemQuickAdapter<MultiItemBean, Ba
public
static
final
int
TYPE_INDEX_CITY
=
3
;
public
static
final
int
TYPE_INDEX_CITY
=
3
;
private
GridClickListener
mListener
;
private
GridClickListener
mListener
;
private
String
currentCity
;
private
TextView
tvCurrent
;
public
CityListAdapter
(
List
<
MultiItemBean
>
data
,
GridClickListener
listener
,
String
currentCity
)
{
public
CityListAdapter
(
List
<
MultiItemBean
>
data
,
GridClickListener
listener
)
{
super
(
data
);
super
(
data
);
this
.
mListener
=
listener
;
this
.
mListener
=
listener
;
this
.
currentCity
=
currentCity
;
addItemType
(
TYPE_INDEX_HEAD
,
R
.
layout
.
rv_item_head
);
addItemType
(
TYPE_INDEX_HEAD
,
R
.
layout
.
rv_item_head
);
addItemType
(
TYPE_INDEX_HOT
,
R
.
layout
.
rv_list_hot_city
);
addItemType
(
TYPE_INDEX_HOT
,
R
.
layout
.
rv_list_hot_city
);
addItemType
(
TYPE_INDEX_CITY
,
R
.
layout
.
rv_item_city
);
addItemType
(
TYPE_INDEX_CITY
,
R
.
layout
.
rv_item_city
);
}
}
public
void
setCurrentCity
(
String
currentCity
)
{
this
.
currentCity
=
currentCity
;
if
(
tvCurrent
!=
null
)
tvCurrent
.
setText
(
TextUtils
.
isEmpty
(
this
.
currentCity
)
?
"定位失败"
:
"当前定位城市: "
+
this
.
currentCity
);
}
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
MultiItemBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
MultiItemBean
item
)
{
switch
(
helper
.
getItemViewType
())
{
switch
(
helper
.
getItemViewType
())
{
...
@@ -47,8 +56,19 @@ public class CityListAdapter extends BaseMultiItemQuickAdapter<MultiItemBean, Ba
...
@@ -47,8 +56,19 @@ public class CityListAdapter extends BaseMultiItemQuickAdapter<MultiItemBean, Ba
break
;
break
;
case
TYPE_INDEX_HOT:
case
TYPE_INDEX_HOT:
HotCityListBean
hotCityListBean
=
(
HotCityListBean
)
item
;
HotCityListBean
hotCityListBean
=
(
HotCityListBean
)
item
;
final
GridView
gridView
=
helper
.
itemView
.
findViewById
(
R
.
id
.
gdv_hot_city
);
tvCurrent
=
helper
.
itemView
.
findViewById
(
R
.
id
.
tv_current_city
);
tvCurrent
.
setText
(
TextUtils
.
isEmpty
(
currentCity
)
?
"定位失败"
:
"当前定位城市: "
+
currentCity
);
TextView
tvRelocation
=
helper
.
itemView
.
findViewById
(
R
.
id
.
tv_relocation
);
tvRelocation
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
mListener
!=
null
)
{
mListener
.
reRelocation
();
}
}
});
final
HotCityAdapter
hotCityAdapter
=
new
HotCityAdapter
(
mContext
,
hotCityListBean
.
getLists
());
final
HotCityAdapter
hotCityAdapter
=
new
HotCityAdapter
(
mContext
,
hotCityListBean
.
getLists
());
final
GridView
gridView
=
helper
.
itemView
.
findViewById
(
R
.
id
.
gdv_hot_city
);
gridView
.
setAdapter
(
hotCityAdapter
);
gridView
.
setAdapter
(
hotCityAdapter
);
gridView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
gridView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
@Override
@Override
...
@@ -87,6 +107,16 @@ public class CityListAdapter extends BaseMultiItemQuickAdapter<MultiItemBean, Ba
...
@@ -87,6 +107,16 @@ public class CityListAdapter extends BaseMultiItemQuickAdapter<MultiItemBean, Ba
}
}
public
interface
GridClickListener
{
public
interface
GridClickListener
{
/****
* 选择城市
* @param hotCityBean
*/
void
click
(
HotCityBean
hotCityBean
);
void
click
(
HotCityBean
hotCityBean
);
/******
* 重新定位
*/
void
reRelocation
();
}
}
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/adapter/SelectShopAdapter.java
View file @
7926b332
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
adapter
;
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
adapter
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.graphics.Paint
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
...
@@ -37,11 +40,15 @@ public class SelectShopAdapter extends BaseQuickAdapter<ShopListBean.DataBeanX.D
...
@@ -37,11 +40,15 @@ public class SelectShopAdapter extends BaseQuickAdapter<ShopListBean.DataBeanX.D
@Override
@Override
protected
void
convert
(
BaseViewHolder
helper
,
final
ShopListBean
.
DataBeanX
.
DataBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
final
ShopListBean
.
DataBeanX
.
DataBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getName
());
helper
.
setText
(
R
.
id
.
tv_position
,
"地址:"
+
item
.
getAddrDetail
());
helper
.
setText
(
R
.
id
.
tv_position
,
"地址: "
+
item
.
getAddrDetail
());
helper
.
setText
(
R
.
id
.
tv_contacts
,
"联系人: "
+
item
.
getLeader
()
+
" "
+
item
.
getLeaderContactInfo
());
helper
.
setText
(
R
.
id
.
tv_contacts
,
"联系人: "
+
item
.
getLeader
());
helper
.
setOnClickListener
(
R
.
id
.
tv_call
,
new
View
.
OnClickListener
()
{
TextView
tvCall
=
helper
.
itemView
.
findViewById
(
R
.
id
.
tv_call
)
;
tvCall
.
getPaint
().
setFlags
(
Paint
.
UNDERLINE_TEXT_FLAG
);
//下划线
tvCall
.
getPaint
().
setAntiAlias
(
true
);
//抗锯齿
tvCall
.
getPaint
().
setColor
(
Color
.
parseColor
(
"#999999"
));
tvCall
.
setText
(
item
.
getLeaderContactInfo
());
tvCall
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
if
(!
TextUtils
.
isEmpty
(
item
.
getLeaderContactInfo
()))
{
if
(!
TextUtils
.
isEmpty
(
item
.
getLeaderContactInfo
()))
{
...
...
module_home/src/main/res/drawable-xhdpi/shape_bg_select_company_search_position.xml
0 → 100644
View file @
7926b332
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#DCDCDC"
/>
<corners
android:bottomLeftRadius=
"50dp"
android:bottomRightRadius=
"0dp"
android:topLeftRadius=
"50dp"
android:topRightRadius=
"0dp"
/>
</shape>
\ No newline at end of file
module_home/src/main/res/layout/fragment_home.xml
View file @
7926b332
...
@@ -106,45 +106,26 @@
...
@@ -106,45 +106,26 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:orientation=
"
horizont
al"
>
android:orientation=
"
vertic
al"
>
<
LinearLayout
<
TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:text=
"@string/rv_get_car_address"
android:textColor=
"@color/textLightGrey"
<TextView
android:textSize=
"@dimen/text_12"
/>
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/rv_get_car_address"
android:textColor=
"@color/textLightGrey"
android:textSize=
"@dimen/text_14"
/>
<TextView
android:id=
"@+id/tv_get_city"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_10"
android:drawablePadding=
"@dimen/size_3"
android:gravity=
"center"
android:hint=
"@string/rv_city_list"
android:text=
""
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_14"
/>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/tv_get_address"
android:id=
"@+id/tv_get_address"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginRight=
"@dimen/size_15"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:gravity=
"left"
android:gravity=
"left
|center_vertical
"
android:hint=
"@string/rv_get_car_hint"
android:hint=
"@string/rv_get_car_hint"
android:text
Size=
"@dimen/text_14"
/>
android:text
ColorHint=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
</LinearLayout>
<include
layout=
"@layout/common_line"
/>
<include
layout=
"@layout/common_line"
/>
...
@@ -155,44 +136,26 @@
...
@@ -155,44 +136,26 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:orientation=
"
horizont
al"
>
android:orientation=
"
vertic
al"
>
<
LinearLayout
<
TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:text=
"@string/rv_get_out_address"
android:textColor=
"@color/textLightGrey"
<TextView
android:textSize=
"@dimen/text_12"
/>
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/rv_get_out_address"
android:textColor=
"@color/textLightGrey"
android:textSize=
"@dimen/text_14"
/>
<TextView
android:id=
"@+id/tv_out_city"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_10"
android:drawablePadding=
"@dimen/size_3"
android:gravity=
"center"
android:hint=
"@string/rv_city_list"
android:text=
""
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_14"
/>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/tv_out_address"
android:id=
"@+id/tv_out_address"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginRight=
"@dimen/size_15"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:gravity=
"left"
android:gravity=
"left|center_vertical"
android:hint=
"@string/rv_get_out_hint"
android:hint=
"@string/rv_get_car_hint"
android:textSize=
"@dimen/text_14"
/>
android:textColorHint=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
</LinearLayout>
...
@@ -239,7 +202,7 @@
...
@@ -239,7 +202,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:text=
"2019-22"
android:text=
"2019-22"
android:textColor=
"@color/
textGray
"
android:textColor=
"@color/
colorMain
"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
<TextView
<TextView
...
@@ -301,7 +264,7 @@
...
@@ -301,7 +264,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:text=
"2019-22"
android:text=
"2019-22"
android:textColor=
"@color/
textGray
"
android:textColor=
"@color/
colorMain
"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
<TextView
<TextView
...
...
module_home/src/main/res/layout/rv_act_car_rental_list.xml
View file @
7926b332
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_50"
android:layout_height=
"@dimen/size_50"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingLeft=
"@dimen/size_2"
android:paddingRight=
"@dimen/size_2"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/size_2"
android:paddingRight=
"@dimen/size_2"
>
<TextView
<TextView
android:id=
"@+id/tv_get_date"
android:id=
"@+id/tv_get_date"
...
@@ -52,14 +52,15 @@
...
@@ -52,14 +52,15 @@
android:layout_height=
"@dimen/size_50"
android:layout_height=
"@dimen/size_50"
android:layout_weight=
"2.5"
android:layout_weight=
"2.5"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/size_2"
android:paddingLeft=
"@dimen/size_2"
android:paddingRight=
"@dimen/size_2"
android:paddingRight=
"@dimen/size_2"
>
android:orientation=
"horizontal"
>
<LinearLayout
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -71,17 +72,19 @@
...
@@ -71,17 +72,19 @@
android:id=
"@+id/tv_get_address"
android:id=
"@+id/tv_get_address"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxEms=
"8"
android:maxEms=
"8"
android:singleLine=
"true"
android:singleLine=
"true"
android:ellipsize=
"end"
android:textColor=
"@color/colorMain"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_10"
/>
android:textSize=
"@dimen/text_10"
/>
</LinearLayout>
</LinearLayout>
<ImageView
<ImageView
android:layout_width=
"wrap_content"
android:layout_width=
"@dimen/size_10"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/common_icon_rig_black"
/>
android:layout_marginLeft=
"@dimen/size_5"
android:src=
"@drawable/common_icon_rig_black"
/>
</LinearLayout>
</LinearLayout>
...
@@ -97,15 +100,16 @@
...
@@ -97,15 +100,16 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_50"
android:layout_height=
"@dimen/size_50"
android:layout_weight=
"2.5"
android:layout_weight=
"2.5"
android:paddingLeft=
"@dimen/size_2"
android:paddingRight=
"@dimen/size_2"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/size_2"
android:paddingRight=
"@dimen/size_2"
>
<LinearLayout
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -117,17 +121,18 @@
...
@@ -117,17 +121,18 @@
android:id=
"@+id/tv_out_address"
android:id=
"@+id/tv_out_address"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxEms=
"8"
android:maxEms=
"8"
android:singleLine=
"true"
android:singleLine=
"true"
android:ellipsize=
"end"
android:textColor=
"@color/colorMain"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_10"
/>
android:textSize=
"@dimen/text_10"
/>
</LinearLayout>
</LinearLayout>
<ImageView
<ImageView
android:layout_width=
"
wrap_content
"
android:layout_width=
"
@dimen/size_10
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/common_icon_rig_black"
/>
android:layout_marginLeft=
"@dimen/size_5"
android:src=
"@drawable/common_icon_rig_black"
/>
</LinearLayout>
</LinearLayout>
<View
<View
...
@@ -142,10 +147,10 @@
...
@@ -142,10 +147,10 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_50"
android:layout_height=
"@dimen/size_50"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:paddingLeft=
"@dimen/size_2"
android:paddingRight=
"@dimen/size_2"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/size_2"
android:paddingRight=
"@dimen/size_2"
>
<ImageView
<ImageView
android:layout_width=
"@dimen/size_22"
android:layout_width=
"@dimen/size_22"
...
@@ -176,10 +181,10 @@
...
@@ -176,10 +181,10 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recyclerView"
android:id=
"@+id/recyclerView"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
</com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout>
</com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout>
...
...
module_home/src/main/res/layout/rv_act_city_list.xml
View file @
7926b332
...
@@ -19,47 +19,49 @@
...
@@ -19,47 +19,49 @@
android:gravity=
"center"
android:gravity=
"center"
android:hint=
"上海"
android:hint=
"上海"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorMain"
android:textSize=
"@dimen/sp_12"
/>
android:textSize=
"@dimen/sp_12"
/>
<include
layout=
"@layout/common_line"
/>
<include
layout=
"@layout/common_line"
/>
<!--<ScrollView-->
<!--<ScrollView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content">-->
<!--android:layout_height="wrap_content">-->
<!--<LinearLayout-->
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical">-->
<!--android:orientation="vertical">-->
<!--</LinearLayout>-->
<!--</LinearLayout>-->
<!--</ScrollView>-->
<!--</ScrollView>-->
<!--<LinearLayout-->
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/size_50"-->
<!--android:layout_height="@dimen/size_50"-->
<!--android:background="@color/gray_f5f5f5"-->
<!--android:background="@color/gray_f5f5f5"-->
<!--android:gravity="center_vertical"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal">-->
<!--android:orientation="horizontal">-->
<!--<TextView-->
<!--<TextView-->
<!--android:id="@+id/tv_current_city"-->
<!--android:id="@+id/tv_current_city"-->
<!--android:layout_width="0dp"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="1"-->
<!--android:layout_weight="1"-->
<!--android:text="当前定位城市"-->
<!--android:text="当前定位城市"-->
<!--android:textSize="@dimen/sp_14" />-->
<!--android:textSize="@dimen/sp_14" />-->
<!--<TextView-->
<!--<TextView-->
<!--android:id="@+id/tv_relocation"-->
<!--android:id="@+id/tv_relocation"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginRight="@dimen/size_20"-->
<!--android:layout_marginRight="@dimen/size_20"-->
<!--android:drawableLeft="@drawable/icon_location"-->
<!--android:drawableLeft="@drawable/icon_location"-->
<!--android:drawablePadding="@dimen/size_5"-->
<!--android:drawablePadding="@dimen/size_5"-->
<!--android:text="重新定位"-->
<!--android:text="重新定位"-->
<!--android:textColor="#fdb51c"-->
<!--android:textColor="#fdb51c"-->
<!--android:textSize="@dimen/sp_12" />-->
<!--android:textSize="@dimen/sp_12" />-->
<!--</LinearLayout>-->
<!--</LinearLayout>-->
...
...
module_home/src/main/res/layout/rv_act_shop_select.xml
View file @
7926b332
...
@@ -13,62 +13,48 @@
...
@@ -13,62 +13,48 @@
android:layout_marginLeft=
"@dimen/size_20"
android:layout_marginLeft=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/size_20"
android:layout_marginRight=
"@dimen/size_20"
android:layout_marginBottom=
"@dimen/size_10"
android:background=
"@drawable/shape_rv_textview_home_search"
android:background=
"@drawable/shape_rv_textview_home_search"
android:gravity=
"center"
android:gravity=
"center
_vertical
"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_current_city"
android:layout_width=
"@dimen/size_80"
android:layout_height=
"match_parent"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/shape_bg_select_company_search_position"
android:drawableLeft=
"@drawable/icon_location"
android:ellipsize=
"end"
android:gravity=
"center_vertical"
android:minWidth=
"@dimen/size_100"
android:paddingLeft=
"@dimen/size_10"
android:singleLine=
"true"
android:textColor=
"@color/tv_gr999999"
android:textSize=
"@dimen/sp_12"
/>
<ImageView
<ImageView
android:layout_width=
"@dimen/size_20"
android:layout_width=
"@dimen/size_20"
android:layout_height=
"@dimen/size_20"
android:layout_height=
"@dimen/size_20"
android:layout_marginLeft=
"@dimen/size_5"
android:src=
"@drawable/rv_common_icon_search"
/>
android:src=
"@drawable/rv_common_icon_search"
/>
<TextView
<TextView
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_5"
android:layout_marginLeft=
"@dimen/size_5"
android:text=
"
输入城市名称,查找对应城市的门店
"
android:text=
"
搜索其他城市查看分公司
"
android:textColor=
"@color/t
ext_Gray
"
android:textColor=
"@color/t
v_gr999999
"
android:textSize=
"@dimen/sp_12"
/>
android:textSize=
"@dimen/sp_12"
/>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_40"
android:layout_marginTop=
"5dp"
android:background=
"@color/gray_f5f5f5"
>
<TextView
android:id=
"@+id/tv_current_city"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_20"
android:text=
"当前定位城市"
android:textSize=
"@dimen/sp_12"
/>
<TextView
android:id=
"@+id/tv_relocation"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/size_20"
android:drawableLeft=
"@drawable/icon_location"
android:drawablePadding=
"@dimen/size_5"
android:text=
"重新定位"
android:textColor=
"#fdb51c"
android:textSize=
"@dimen/sp_12"
/>
</RelativeLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/gray_f5f5f5"
>
android:background=
"@color/gray_f5f5f5"
android:paddingBottom=
"@dimen/size_10"
>
<include
layout=
"@layout/common_refresh"
/>
<include
layout=
"@layout/common_refresh"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
module_home/src/main/res/layout/rv_item_select_shop.xml
View file @
7926b332
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_10"
android:layout_marginLeft=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
app:cardCornerRadius=
"@dimen/size_5"
>
app:cardCornerRadius=
"@dimen/size_5"
>
...
@@ -33,8 +33,7 @@
...
@@ -33,8 +33,7 @@
android:layout_weight=
"1"
android:layout_weight=
"1"
android:text=
"欣信房车控股集团"
android:text=
"欣信房车控股集团"
android:textColor=
"@color/textMain"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_18"
android:textSize=
"@dimen/text_18"
/>
android:textStyle=
"bold"
/>
<TextView
<TextView
android:id=
"@+id/tv_position"
android:id=
"@+id/tv_position"
...
@@ -52,23 +51,22 @@
...
@@ -52,23 +51,22 @@
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
<TextView
android:textSize=
"@dimen/text_12"
android:id=
"@+id/tv_contacts"
android:id=
"@+id/tv_contacts"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"联系人"
/>
android:text=
"联系人"
android:textSize=
"@dimen/text_12"
/>
<TextView
<TextView
android:id=
"@+id/tv_call"
android:id=
"@+id/tv_call"
android:layout_width=
"
@dimen/size_70
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"@dimen/size_25"
android:layout_height=
"@dimen/size_25"
android:layout_marginLeft=
"@dimen/size_5"
android:layout_marginLeft=
"@dimen/size_5"
android:
background=
"@drawable/shape_rv_button_green
"
android:
autoLink=
"all
"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"拨打电话"
android:text=
"137****7148"
android:textColor=
"#6DB186"
android:textColor=
"@color/tv_gr999999"
android:textSize=
"@dimen/sp_12"
android:textSize=
"@dimen/sp_12"
/>
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
...
...
module_home/src/main/res/layout/rv_list_hot_city.xml
View file @
7926b332
<?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=
"
@dimen/size_140
"
android:layout_height=
"
wrap_content
"
android:background=
"#ffffff"
android:background=
"#ffffff"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -14,11 +14,44 @@
...
@@ -14,11 +14,44 @@
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
<GridView
<GridView
android:listSelector=
"@android:color/transparent"
android:id=
"@+id/gdv_hot_city"
android:id=
"@+id/gdv_hot_city"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
@dimen/size_80
"
android:layout_marginBottom=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:listSelector=
"@android:color/transparent"
android:numColumns=
"4"
/>
android:numColumns=
"4"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_42"
android:layout_marginTop=
"5dp"
android:background=
"@color/gray_f5f5f5"
>
<TextView
android:id=
"@+id/tv_current_city"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_15"
android:text=
"当前定位城市"
android:textColor=
"#666666"
android:textSize=
"@dimen/sp_12"
/>
<TextView
android:id=
"@+id/tv_relocation"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/size_20"
android:drawableLeft=
"@drawable/icon_location"
android:drawablePadding=
"@dimen/size_5"
android:gravity=
"center"
android:text=
"重新定位"
android:textColor=
"#fdb51c"
android:textSize=
"@dimen/sp_12"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
module_home/src/main/res/layout/select_shop_empty.xml
View file @
7926b332
...
@@ -20,9 +20,8 @@
...
@@ -20,9 +20,8 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/iv_flag"
android:layout_below=
"@id/iv_flag"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:text=
"当前城市暂无门店"
android:text=
"暂无分公司,请换个城市试试!"
android:textColor=
"@color/colorGray"
android:textColor=
"#333333"
android:textSize=
"@dimen/sp_14"
android:textSize=
"@dimen/sp_14"
/>
android:textStyle=
"bold"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
module_home/src/main/res/values/strings.xml
View file @
7926b332
...
@@ -47,12 +47,12 @@
...
@@ -47,12 +47,12 @@
<string
name=
"rv_ok"
>
确定
</string>
<string
name=
"rv_ok"
>
确定
</string>
<string
name=
"rv_rental_car"
>
租房车
</string>
<string
name=
"rv_rental_car"
>
租房车
</string>
<string
name=
"rv_rental_car_content"
>
开启生活新旅程
</string>
<string
name=
"rv_rental_car_content"
>
开启生活新旅程
</string>
<string
name=
"rv_get_car_address"
>
取车公司
</string>
<string
name=
"rv_get_car_address"
>
取车
分
公司
</string>
<string
name=
"rv_get_car_address_"
>
取车地址:
</string>
<string
name=
"rv_get_car_address_"
>
取车地址:
</string>
<string
name=
"rv_get_car_hint"
>
请
输入取车地址
</string>
<string
name=
"rv_get_car_hint"
>
请
选择取车分公司
</string>
<string
name=
"rv_get_out_address"
>
还车公司
</string>
<string
name=
"rv_get_out_address"
>
还
分
车公司
</string>
<string
name=
"rv_get_out_address_"
>
还车地址:
</string>
<string
name=
"rv_get_out_address_"
>
还车地址:
</string>
<string
name=
"rv_get_out_hint"
>
请
输入还车地址
</string>
<string
name=
"rv_get_out_hint"
>
请
选择还车分公司
</string>
<string
name=
"rv_full_time_driver"
>
欣新专职司机(600/天)
</string>
<string
name=
"rv_full_time_driver"
>
欣新专职司机(600/天)
</string>
<string
name=
"rv_immediately_car"
>
立即选车
</string>
<string
name=
"rv_immediately_car"
>
立即选车
</string>
<string
name=
"rv_hot_car_type"
>
热门车型
</string>
<string
name=
"rv_hot_car_type"
>
热门车型
</string>
...
...
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