[color string 通过Application获取]
This commit is contained in:
yangyakun
2024-05-06 19:11:04 +08:00
parent 21bf873a5d
commit 502be42cdd
12 changed files with 123 additions and 91 deletions

View File

@@ -20,6 +20,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.commons.storage.SharedPrefsMgr;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.map.overlay.IMoGoOverlayManager;
import com.mogo.och.common.module.utils.ResourcesUtils;
import com.mogo.och.shuttle.passenger.R;
import com.mogo.och.shuttle.passenger.ui.adapter.BusPassengerLineStationsAdapter;
import com.mogo.och.shuttle.passenger.constant.BusPassengerConst;
@@ -83,8 +84,8 @@ public class BusPassengerRouteFragment extends
mSpeedTv = findViewById(R.id.bus_p_speed_tv);
mSpeedTv.setVertrial(true);
mSpeedTv.setmColorList(new int[]{getResources().getColor(R.color.shuttle_p_jl_speed_color_start),
getResources().getColor(R.color.shuttle_p_jl_speed_color_end)});
mSpeedTv.setmColorList(new int[]{ResourcesUtils.getColor(R.color.shuttle_p_jl_speed_color_start),
ResourcesUtils.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);
@@ -295,26 +296,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.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_arrived_tip));
mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(ResourcesUtils.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.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_arrived_tip));
mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(ResourcesUtils.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.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(getResources().getString(R.string.shuttle_p_jl_cur_station_arrived_tip));
mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title));
mCurrentArriveTip.setText(ResourcesUtils.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.shuttle_p_jl_cur_next_station_title));
mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_next_station_title));
mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_un_arrived_bg);
handleArrivingSpeakIconDrawable();
}