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
e0599401
Commit
e0599401
authored
Aug 03, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改选择租车列表界面
parent
5197a0d6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
55 deletions
+55
-55
MainActivity.java
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
+3
-4
BaseGlideHolder.java
...main/java/com/ruiwenliu/wrapper/util/BaseGlideHolder.java
+1
-1
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+2
-2
CarRentalListAdapter.java
.../rv/module/ui/main/home/adapter/CarRentalListAdapter.java
+21
-18
rv_act_car_rental_list.xml
module_home/src/main/res/layout/rv_act_car_rental_list.xml
+2
-2
rv_act_city_list.xml
module_home/src/main/res/layout/rv_act_city_list.xml
+4
-3
rv_act_shop_select.xml
module_home/src/main/res/layout/rv_act_shop_select.xml
+1
-1
rv_item_car_rental_list.xml
module_home/src/main/res/layout/rv_item_car_rental_list.xml
+21
-24
No files found.
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
View file @
e0599401
...
...
@@ -53,7 +53,7 @@ import butterknife.BindView;
import
butterknife.OnClick
;
public
class
MainActivity
extends
BaseActivity
<
CommonPresenter
>
{
public
class
MainActivity
extends
BaseActivity
<
CommonPresenter
>{
// @BindView(R2.id.pager_view_fragment)
CustomScrollViewPager
viewPager
;
...
...
@@ -85,6 +85,8 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
private
final
int
TYPE_MINE
=
4
;
//我的
private
long
exitTime
=
0
;
private
UpdateAppUtils
updateAppUtils
;
private
PromotionDialog
promotionDialog
;
...
...
@@ -127,8 +129,6 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
getEffectiveTime
();
getActivityPopup
();
checkVersion
();
}
@Override
...
...
@@ -359,5 +359,4 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
startActivity
(
in
);
}
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/util/BaseGlideHolder.java
View file @
e0599401
...
...
@@ -91,7 +91,7 @@ public class BaseGlideHolder extends BaseViewHolder {
.
load
(
url
)
.
placeholder
(
R
.
drawable
.
glide_icon_placeholder
)
.
error
(
R
.
drawable
.
glide_icon_error
)
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)).
override
(
50
,
50
))
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)).
override
(
x
,
y
))
.
into
(
image
);
}
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
e0599401
...
...
@@ -963,11 +963,11 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
outLongitude
=
bean
.
getData
().
getData
().
get
(
0
).
getLongitude
();
}
}
else
{
getCompanyName
=
""
;
getCompanyName
=
""
;
headTvGetShop
.
setText
(
getCompanyName
);
getLatitude
=
0
;
getLongitude
=
0
;
outCompanyName
=
""
;
outCompanyName
=
""
;
headTvOutShop
.
setText
(
outCompanyName
);
outLatitude
=
0
;
outLongitude
=
0
;
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/adapter/CarRentalListAdapter.java
View file @
e0599401
...
...
@@ -6,6 +6,7 @@ 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.component.utils.DisplayUtil
;
import
com.rv.home.R
;
import
com.rv.home.R2
;
import
com.rv.home.rv.module.ui.main.home.bean.CarTypeListBean
;
...
...
@@ -18,38 +19,40 @@ import com.rv.home.rv.module.ui.main.home.bean.ShopListBean;
* https://blog.csdn.net/anita9999/article/details/82346552
*/
public
class
CarRentalListAdapter
extends
BaseQuickAdapter
<
CarTypeListBean
.
DataBeanX
.
DataBean
,
BaseGlideHolder
>
{
public
class
CarRentalListAdapter
extends
BaseQuickAdapter
<
CarTypeListBean
.
DataBeanX
.
DataBean
,
BaseGlideHolder
>
{
public
CarRentalListAdapter
()
{
super
(
R
.
layout
.
rv_item_car_rental_list
);
}
@Override
protected
void
convert
(
BaseGlideHolder
helper
,
CarTypeListBean
.
DataBeanX
.
DataBean
item
)
{
if
(
item
.
getVehicleModel
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getVehicleModel
().
getName
());
helper
.
setText
(
R
.
id
.
tv_context
,
item
.
getVehicleModel
().
getKeyword
());
helper
.
setText
(
R
.
id
.
tv_point
,
String
.
valueOf
(
item
.
getVehicleModel
().
getPoint
()));
helper
.
load
Image
(
mContext
,
item
.
getVehicleModel
().
getIcon
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
));
if
(
item
.
getVehicleModel
()
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getVehicleModel
().
getName
());
helper
.
setText
(
R
.
id
.
tv_context
,
item
.
getVehicleModel
().
getKeyword
());
helper
.
setText
(
R
.
id
.
tv_point
,
String
.
valueOf
(
item
.
getVehicleModel
().
getPoint
()));
helper
.
load
RoundImage
(
mContext
,
item
.
getVehicleModel
().
getIcon
(),
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_goods
),
10
,
DisplayUtil
.
dip2px
(
mContext
,
helper
.
getView
(
R
.
id
.
iv_goods
).
getWidth
()),
DisplayUtil
.
dip2px
(
mContext
,
helper
.
getView
(
R
.
id
.
iv_goods
).
getHeight
()
));
// 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
)));
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
);
starBar
.
setVisibility
(
View
.
GONE
);
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
());
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
)));
double
instance
=
item
.
getDistance
()
/
1000
;
helper
.
setText
(
R
.
id
.
tv_km
,
String
.
format
(
"%s%d%s"
,
mContext
.
getString
(
R
.
string
.
rv_km_you
),
new
Double
(
instance
).
intValue
(),
mContext
.
getString
(
R
.
string
.
rv_km
)));
}
}
module_home/src/main/res/layout/rv_act_car_rental_list.xml
View file @
e0599401
...
...
@@ -64,7 +64,7 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"取车
地址
"
android:text=
"取车
公司
"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_10"
/>
...
...
@@ -113,7 +113,7 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"还车
地址
"
android:text=
"还车
公司
"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_10"
/>
...
...
module_home/src/main/res/layout/rv_act_city_list.xml
View file @
e0599401
...
...
@@ -9,7 +9,7 @@
<EditText
android:id=
"@+id/edt_search"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_
3
0"
android:layout_height=
"@dimen/size_
4
0"
android:layout_gravity=
"center"
android:layout_marginLeft=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_10"
...
...
@@ -18,9 +18,10 @@
android:background=
"@drawable/shape_rv_textview_home_search"
android:gravity=
"center"
android:orientation=
"horizontal"
android:hint=
"请输入城市名称"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/
colorMain
"
android:textSize=
"@dimen/sp_1
2
"
/>
android:textColorHint=
"@color/
tv_gr999999
"
android:textSize=
"@dimen/sp_1
4
"
/>
<include
layout=
"@layout/common_line"
/>
...
...
module_home/src/main/res/layout/rv_act_shop_select.xml
View file @
e0599401
...
...
@@ -9,7 +9,7 @@
<LinearLayout
android:id=
"@+id/ll_search"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_
3
0"
android:layout_height=
"@dimen/size_
4
0"
android:layout_marginLeft=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/size_20"
...
...
module_home/src/main/res/layout/rv_item_car_rental_list.xml
View file @
e0599401
...
...
@@ -12,20 +12,21 @@
android:layout_marginBottom=
"@dimen/size_5"
android:background=
"@color/colorWrite"
android:orientation=
"horizontal"
android:padding=
"@dimen/size_1
5
"
>
android:padding=
"@dimen/size_1
0
"
>
<ImageView
android:id=
"@+id/iv_goods"
android:layout_width=
"
@dimen/size_120
"
android:layout_height=
"@dimen/size_
10
0"
android:scaleType=
"center
Crop
"
/>
android:layout_width=
"
114dp
"
android:layout_height=
"@dimen/size_
8
0"
android:scaleType=
"center
Inside
"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
@dimen/size_80
"
android:layout_marginLeft=
"@dimen/size_5"
>
<TextView
android:layout_marginRight=
"@dimen/size_50"
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -33,26 +34,27 @@
android:maxLines=
"1"
android:text=
""
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_1
6
"
/>
android:textSize=
"@dimen/text_1
4
"
/>
<TextView
android:layout_marginRight=
"@dimen/size_50"
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_marginTop=
"@dimen/size_
5
"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
""
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_1
2
"
/>
android:textSize=
"@dimen/text_1
0
"
/>
<LinearLayout
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:layout_marginTop=
"@dimen/size_
3
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
...
...
@@ -65,18 +67,21 @@
android:maxLines=
"1"
android:text=
""
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_1
2
"
/>
android:textSize=
"@dimen/text_1
0
"
/>
<TextView
android:gravity=
"right|center_vertical"
android:layout_gravity=
"right"
android:id=
"@+id/tv_point"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
@dimen/size_60
"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_10"
android:drawableRight=
"@drawable/rv_vehicle_icon_star_light"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
""
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_1
2
"
/>
android:textSize=
"@dimen/text_1
0
"
/>
<com.frame.base.view.StarBar
android:id=
"@+id/starbar1"
...
...
@@ -89,16 +94,7 @@
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"-->
<!--/>-->
</LinearLayout>
<LinearLayout
...
...
@@ -116,12 +112,13 @@
android:layout_weight=
"1"
android:text=
""
android:textColor=
"@color/colorAuxiliaryRed"
android:textSize=
"@dimen/text_1
6
"
android:textSize=
"@dimen/text_1
4
"
android:textStyle=
"bold"
/>
<TextView
android:gravity=
"right|center_vertical"
android:id=
"@+id/tv_km"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
@dimen/size_70
"
android:layout_height=
"wrap_content"
android:text=
""
android:textColor=
"@color/textGray"
...
...
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