/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.tripresult/TripSegmentItemViewModel

TripSegmentItemViewModel

\ class TripSegmentItemViewModel : RxViewModel

Types

Name Summary
SegmentViewType enum SegmentViewType : Enum<TripSegmentItemViewModel.SegmentViewType>

Properties

Name Summary
alerts val alerts: MutableLiveData<ArrayList<RealtimeAlert>>
alertsClicked val alertsClicked: BehaviorRelay<ArrayList<RealtimeAlert>>
backgroundCircleTint val backgroundCircleTint: MutableLiveData<Int>
bottomLineTint val bottomLineTint: MutableLiveData<Int>
cancelledMessage val cancelledMessage: MutableLiveData<String>
description val description: MutableLiveData<String>
endTime val endTime: MutableLiveData<SpannableString>
externalAction val externalAction: MutableLiveData<String>
externalActionClicked val externalActionClicked: BehaviorRelay<TripSegment>
icon val icon: MutableLiveData<Drawable?>
isCancelled val isCancelled: MutableLiveData<Boolean>
isHideExactTimes val isHideExactTimes: LiveData<Boolean>
occupancyViewModel val occupancyViewModel: OccupancyViewModel
onClick val onClick: TapAction<TripSegmentItemViewModel>
onTicketInfoClicked val onTicketInfoClicked: TapAction<TripSegmentItemViewModel>
roadTagChartItems val roadTagChartItems: LiveData<List<RoadTagChartItem>>
showAlerts val showAlerts: MutableLiveData<Boolean>
showBackgroundCircle val showBackgroundCircle: MutableLiveData<Boolean>
showBicycleAccessible val showBicycleAccessible: LiveData<Boolean>
showBottomLine val showBottomLine: MutableLiveData<Boolean>
showDescription val showDescription: MutableLiveData<Boolean>
showEndTime val showEndTime: MutableLiveData<Boolean>
showStartTime val showStartTime: MutableLiveData<Boolean>
showTicketInfo val showTicketInfo: MutableLiveData<Boolean>
showTopLine val showTopLine: MutableLiveData<Boolean>
startTime val startTime: MutableLiveData<SpannableString>
title val title: MutableLiveData<String>
topLineTint val topLineTint: MutableLiveData<Int>
tripSegment var tripSegment: TripSegment?

Functions

Name Summary
autoClear fun <T> Observable<T>.autoClear(): Observable<T>
fun Disposable.autoClear()
generateRoadTags fun generateRoadTags()
initOccupancy fun initOccupancy(tripSegment: TripSegment)
onAlertClick fun onAlertClick(view: View)
onCleared open override fun onCleared()
This method will be called when this ViewModel is no longer used and will be destroyed.
onExternalActionClicked fun onExternalActionClicked(view: View)
setupSegment fun setupSegment(viewType: TripSegmentItemViewModel.SegmentViewType, title: String, description: String? = null, startTime: String? = null, endTime: String? = null, delay: Long = 0, hasRealtime: Boolean = false, lineColor: Int = Color.TRANSPARENT, topConnectionColor: Int = lineColor, bottomConnectionColor: Int = lineColor, isStationaryItem: Boolean = false, isCancelled: Boolean = false)