[driver passenger ] bus 乘客端:到站牌文案优化
This commit is contained in:
@@ -31,6 +31,8 @@ public class BusPassengerBaseFragment extends MvpFragment<BusPassengerBaseFragme
|
||||
private static final String TAG = BusPassengerBaseFragment.class.getSimpleName();
|
||||
|
||||
private TextView mCurrentArriveStation;
|
||||
private TextView mCurrentArriveStationTitle;
|
||||
private TextView mCurrentArriveTip;
|
||||
private ImageView mAutopilotIv;
|
||||
private BusPassengerRouteLineDialogFragment mRouteFragment;
|
||||
/**
|
||||
@@ -56,6 +58,8 @@ public class BusPassengerBaseFragment extends MvpFragment<BusPassengerBaseFragme
|
||||
CallerSmpManager.INSTANCE.hidePanel();
|
||||
|
||||
mCurrentArriveStation = findViewById(R.id.bus_p_cur_station_name);
|
||||
mCurrentArriveStationTitle = findViewById(R.id.bus_p_cur_station_title);
|
||||
mCurrentArriveTip = findViewById(R.id.bus_p_cur_station_tip);
|
||||
mAutopilotIv = findViewById(R.id.bus_p_autopilot_iv);
|
||||
|
||||
showRouteFragment();
|
||||
@@ -74,10 +78,17 @@ public class BusPassengerBaseFragment extends MvpFragment<BusPassengerBaseFragme
|
||||
mRouteFragment.showNow(getChildFragmentManager(),"RouteFragment");
|
||||
}
|
||||
|
||||
public void updateArrivedStation(String station){
|
||||
public void updateArrivedStation(String station,int currentIndex){
|
||||
if (null == station){
|
||||
mCurrentArriveStation.setText("----");
|
||||
}else {
|
||||
if (currentIndex == 0){
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title_init));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip_init));
|
||||
}else {
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
|
||||
}
|
||||
mCurrentArriveStation.setText(station);
|
||||
}
|
||||
|
||||
@@ -102,7 +113,7 @@ public class BusPassengerBaseFragment extends MvpFragment<BusPassengerBaseFragme
|
||||
|
||||
public void updateStationsInfo(List<BusPassengerStation> stations, int currentStationIndex){
|
||||
if (mRouteFragment != null) mRouteFragment.updateStationsInfo(stations);
|
||||
updateArrivedStation(stations.get(currentStationIndex).getName());
|
||||
updateArrivedStation(stations.get(currentStationIndex).getName(),currentStationIndex);
|
||||
}
|
||||
|
||||
public void routeResult(List<LatLng> models){
|
||||
|
||||
@@ -5,5 +5,7 @@
|
||||
<string name="bus_p_start_station_txt_tag">起</string>
|
||||
<string name="bus_p_end_station_txt_tag">终</string>
|
||||
<string name="bus_p_cur_station_title">到达站:</string>
|
||||
<string name="bus_p_cur_station_title_init">始发站:</string>
|
||||
<string name="bus_p_cur_station_arrived_tip">请携带好随身物品下车。</string>
|
||||
<string name="bus_p_cur_station_arrived_tip_init">欢迎乘坐蘑菇车联无人驾驶车。</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user