[shuttle-jl]
[rename]
This commit is contained in:
yangyakun
2023-12-06 14:19:59 +08:00
parent d6ed5d59cb
commit 331e95de0d
14 changed files with 124 additions and 181 deletions

View File

@@ -56,14 +56,14 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
Log.d("onBindViewHolder" , "position0 = "+position);
viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_bg_start_tag_bg);
if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//到达未离开
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_17417B));
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_17417B));
BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB));
}else {
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_992D3E5F));
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_992D3E5F));
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END);
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA));
}
}else{
viewHolder.curArrowBg.setVisibility(View.VISIBLE);
@@ -71,16 +71,16 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
BusStationBean preStation = mStations.get(position -1);
if (station.getDrivingStatus() == STATION_STATUS_LEAVING ||
(station.getDrivingStatus() == STATION_STATUS_STOPPED && station.isLeaving())){ //过站
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_992D3E5F));
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA));
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_992D3E5F));
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA));
viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_point_gray);
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END);
Log.d("onBindViewHolder" , "position 1 = "+position);
} else if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//刚到站未离开的
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_17417B));
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB));
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_17417B));
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB));
viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_arrive_line_green);
if (position == mStations.size() - 1){
viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_bg_end_tag_bg);
@@ -90,9 +90,9 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
}else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && preStation.isLeaving()){//即将到站
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_panel_cur_station_tips_color));
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB));
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_panel_cur_station_tips_color));
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB));
viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_arrive_line_blue);
Log.d("onBindViewHolder" , "position3 = "+position);
@@ -103,9 +103,9 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
}else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING &&
(preStation.getDrivingStatus() == STATION_STATUS_ARRIVING
|| preStation.getDrivingStatus() == STATION_STATUS_STOPPED)){ //未到站的并且前面也是未到站或者刚到站的
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_panel_cur_station_tips_color));
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB));
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_panel_cur_station_tips_color));
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB));
viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB));
viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_point_blue);
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END);

View File

@@ -81,8 +81,8 @@ public class BusPassengerRouteFragment extends
mSpeedTv = findViewById(R.id.bus_p_speed_tv);
mSpeedTv.setVertrial(true);
mSpeedTv.setmColorList(new int[]{getResources().getColor(R.color.bus_p_speed_color_start),
getResources().getColor(R.color.bus_p_speed_color_end)});
mSpeedTv.setmColorList(new int[]{getResources().getColor(R.color.shuttle_p_jl_speed_color_start),
getResources().getColor(R.color.shuttle_p_jl_speed_color_end)});
mNoLineInfoView =findViewById(R.id.bus_p_no_order_data_view);
emptyTv = findViewById(R.id.no_order_data_tv);
@@ -165,10 +165,10 @@ public class BusPassengerRouteFragment extends
public void changeOperationStatus(boolean status) {
if (!status) {
emptyTv.setText(getString(R.string.bus_p_no_out));
emptyTv.setText(getString(R.string.shuttle_p_jl_no_out));
mNoLineInfoView.setVisibility(View.VISIBLE);
mRouteInfoView.setVisibility(View.GONE);
mLineName.setText(getContext().getString(R.string.bus_p_no_line));
mLineName.setText(getContext().getString(R.string.shuttle_p_jl_no_line));
updateArrivedStation(null,0,true);
clearMapView();
clearMapMarkers();
@@ -179,12 +179,12 @@ public class BusPassengerRouteFragment extends
if (mNoLineInfoView.getVisibility() == View.GONE){
mNoLineInfoView.setVisibility(View.VISIBLE);
mRouteInfoView.setVisibility(View.GONE);
mLineName.setText(getContext().getString(R.string.bus_p_no_line));
mLineName.setText(getContext().getString(R.string.shuttle_p_jl_no_line));
updateArrivedStation(null,0,true);
clearMapView();
clearMapMarkers();
}
emptyTv.setText(getString(R.string.bus_p_no_task));
emptyTv.setText(getString(R.string.shuttle_p_jl_no_task));
}
public void hideNoTaskView(){
@@ -281,26 +281,26 @@ public class BusPassengerRouteFragment extends
public void updateArrivedStation(String station,int currentIndex,boolean isArrived){
if (null == station){
mCurrentArriveStation.setText("----");
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
mCurrentArriveStationTitle.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_arrived_tip));
mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg);
handleArrivingSpeakIconDrawable();
}else {
mCurrentArriveStation.setText(station);
if (currentIndex == 0){
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
mCurrentArriveStationTitle.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_arrived_tip));
mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg);
handleArrivingSpeakIconDrawable();
return;
}
if (isArrived){
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
mCurrentArriveStationTitle.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_arrived_tip));
mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg);
handleArrivedSpeakIconDrawable();
}else {
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_next_station_title));
mCurrentArriveStationTitle.setText(getResources().getString(R.string.shuttle_p_jl_cur_next_station_title));
mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_un_arrived_bg);
handleArrivingSpeakIconDrawable();
}

View File

@@ -158,7 +158,7 @@ class BusPassengerTrafficLightView @JvmOverloads constructor(
val layoutParams = layoutParams
if (layoutParams is MarginLayoutParams) {
val lp = layoutParams
lp.width = resources.getDimension(R.dimen.bus_p_traffic_light_icon_size).toInt()
lp.width = resources.getDimension(R.dimen.shuttle_p_jl_traffic_light_icon_size).toInt()
setLayoutParams(lp)
bus_p_traffic_light_time_tv.visibility = GONE
bus_p_traffic_light_bg.layoutParams.width =
@@ -171,11 +171,11 @@ class BusPassengerTrafficLightView @JvmOverloads constructor(
val layoutParams = layoutParams
if (layoutParams is MarginLayoutParams) {
val lp = layoutParams
lp.width = resources.getDimension(R.dimen.bus_p_route_traffic_light_view_width).toInt()
lp.width = resources.getDimension(R.dimen.shuttle_p_jl_route_traffic_light_view_width).toInt()
setLayoutParams(lp)
bus_p_traffic_light_time_tv.visibility = VISIBLE
bus_p_traffic_light_bg.layoutParams.width =
resources.getDimension(R.dimen.bus_p_traffic_light_bg_width).toInt()
resources.getDimension(R.dimen.shuttle_p_jl_traffic_light_bg_width).toInt()
}
}
}