checkDateForStringLabel |
fun Date.checkDateForStringLabel(context: Context): String? |
checkUrl |
fun String.checkUrl(): String? |
clearTag |
fun clearTag(view: View, clear: Boolean) |
convertLocationToAlpha |
fun convertLocationToAlpha(location: Location?): Int |
correctItemType |
fun TripSegment.correctItemType(): Int |
createSummaryIcon |
fun TripSegment.createSummaryIcon(context: Context, transportIcon: Drawable): Drawable |
deFocusAndHideKeyboard |
fun Context.deFocusAndHideKeyboard(focus: View?) |
defocusAndHideKeyboard |
fun defocusAndHideKeyboard(context: Context, focus: View?) |
focusViewForAccessibility |
fun focusViewForAccessibility(view: View, focus: Boolean) |
formatString |
fun TimeTag.formatString(context: Context, timezone: String?): String |
fromJson |
inline fun <T> Gson.fromJson(json: String): T |
generateTripPreviewHeader |
fun TripSegment.generateTripPreviewHeader(icon: Drawable): TripSegmentSummary fun TripSegment.generateTripPreviewHeader(context: Context, icon: Drawable, printTime: PrintTime): TripSegmentSummary |
getAccessibilityManager |
fun Context.getAccessibilityManager(): AccessibilityManager |
getDisplayDateFormatter |
fun getDisplayDateFormatter(tz: DateTimeZone? = null): DateTimeFormatter |
getDisplayDateTimeFormatter |
fun getDisplayDateTimeFormatter(tz: DateTimeZone? = null): DateTimeFormatter |
getDisplayTimeFormatter |
fun getDisplayTimeFormatter(tz: DateTimeZone? = null): DateTimeFormatter |
getISO2DateFormatter |
fun getISO2DateFormatter(tz: DateTimeZone? = null): DateTimeFormatter |
getISODateFormatter |
fun getISODateFormatter(tz: DateTimeZone? = null): DateTimeFormatter |
getPackageNameFromStoreUrl |
fun String.getPackageNameFromStoreUrl(): String? |
getRgbFromColorResource |
fun Int.getRgbFromColorResource(): AppColor |
getSegmentIconObservable |
fun TripSegment.getSegmentIconObservable(context: Context, getTransportIconTintStrategy: GetTransportIconTintStrategy): Observable<Drawable?> |
getVersionCode |
fun Context.getVersionCode(): Long? |
getVersionName |
fun Context.getVersionName(): String? |
groupConsecutiveBy |
fun <T> Iterable<T>.groupConsecutiveBy(groupIdentifier: (T, T) -> Boolean): List<MutableList<T>> |
hideKeyboard |
fun hideKeyboard(context: Context, focus: View?) Hide the soft keyboard. |
highlightTexts |
fun TextView.highlightTexts(textsToHighLight: List<Pair<String, ClickableSpan>>) fun TextView.highlightTexts(matcher: List<String>?, matchByWord: Boolean = true) |
ignoreNetworkErrors |
fun <T> Observable<T>.ignoreNetworkErrors(): Observable<T> |
isAppInstalled |
fun String.isAppInstalled(packageManager: PackageManager): Boolean |
isAppInstalledById |
fun String.isAppInstalledById(packageManager: PackageManager): Boolean |
isFragmentInBackStack |
fun FragmentManager.isFragmentInBackStack(fragmentTag: String): Boolean |
isInternetAvailable |
@RequiresApi(value = 23) fun Context.isInternetAvailable(): Boolean |
isNetworkConnected |
fun Context.isNetworkConnected(): Boolean |
isPermissionGranted |
fun Context.isPermissionGranted(permission: String): Boolean |
isTalkBackOn |
fun Context.isTalkBackOn(): Boolean |
logError |
fun Throwable.logError() |
merge |
fun <T> Flow<T>.merge(vararg flows: Flow<T>): Flow<T> |
observe |
fun <T : Any, L : LiveData<T>> LifecycleOwner.observe(liveData: L, body: (T?) -> Unit) |
openAppInPlayStore |
fun Context.openAppInPlayStore() |
openAppNotificationSettings |
fun Context.openAppNotificationSettings() |
ordinalSuffix |
fun Int.ordinalSuffix(): String |
popSpecificWithTag |
fun Fragment.popSpecificWithTag(tag: String) |
removeQueryParamFromUrl |
fun String.removeQueryParamFromUrl(paramToRemove: String): String |
replaceFragment |
fun Fragment.replaceFragment(fragment: Fragment, tag: String, containerViewId: Int, checkBackStack: Boolean = true) fun Fragment.replaceFragment(fragment: Fragment, tag: String, containerViewId: Int, checkBackStack: Boolean = true, addToBackStack: Boolean = true) |
requestPermissionGently |
fun Context.requestPermissionGently(permissions: List<String>, callback: (PermissionStatus?) -> Unit, title: String, description: String, openSettingsTitle: String, openSettingsExplanation: String, versionChecker: Int? = null) |
rgbToHex |
fun rgbToHex(red: Int, green: Int, blue: Int): String |
safeCall |
suspend fun <T> FlowCollector<Resource<T>>.safeCall(errorHandlingCall: suspend (Exception) -> Unit? = null, call: suspend () -> Unit): FlowCollector<Resource<T>> |
setAddRtlSupport |
fun setAddRtlSupport(view: View, addRtlSupport: Boolean) |
setAlertIcon |
fun setAlertIcon(view: ImageView, severity: String) |
setBackground |
fun setBackground(view: View, drawable: StateListDrawable?) |
setBackgroundDrawable |
fun setBackgroundDrawable(view: View, drawable: Drawable?) |
setBackgroundTint |
fun setBackgroundTint(view: View, color: Int?) |
setButtonAppTint |
fun setButtonAppTint(button: Button, @ColorIntdefault: Int) =================== Dynamic color binding using colors from DynamicAppColor =================== |
setButtonStateBackground |
fun setButtonStateBackground(button: Button, @ColorIntdefault: Int?) |
setButtonTextAppTint |
fun setButtonTextAppTint(button: Button, @ColorIntdefault: Int?) |
setCalendarViewSelectedTint |
fun setCalendarViewSelectedTint(calendarView: CalendarView, @ColorIntdefault: Int?) |
setCardBackgroundColor |
fun setCardBackgroundColor(view: CardView, color: Int?) |
setDebounceClickListener |
fun setDebounceClickListener(view: View, onClickListener: View.OnClickListener) |
setDrawableTint |
fun TextView.setDrawableTint(color: Int) |
setDynamicHeight |
fun setDynamicHeight(view: View, heightInDp: Int) |
setIcon |
fun setIcon(view: ImageView, iconResource: Drawable?) fun setIcon(view: ImageView, iconResource: Int?) |
setIconDrawable |
fun setIconDrawable(view: ImageView, drawable: Drawable?) |
setImageFromUrl |
fun setImageFromUrl(imageView: ImageView, source: String?) |
setImageFromUrlWithPlaceholder |
fun setImageFromUrlWithPlaceholder(imageView: ImageView, source: String?, placeholder: Int, tripGoKey: String, tripGoClientId: String?, userToken: String?) |
setImageTint |
fun ImageView.setImageTint(@ColorIntcolor: Int) |
setImageViewAppForegroundTint |
fun setImageViewAppForegroundTint(imageView: ImageView, @ColorIntdefault: Int?) |
setImageViewAppTint |
fun setImageViewAppTint(imageView: ImageView, @ColorIntdefault: Int?) |
setImageViewSize |
fun setImageViewSize(view: ImageView, size: Float) |
setLayoutAppBackgroundTint |
fun setLayoutAppBackgroundTint(view: View, @ColorIntdefault: Int?) |
setLayoutAppTint |
fun setLayoutAppTint(view: View, @ColorIntdefault: Int?) |
setLayoutHeight |
fun setLayoutHeight(view: View, show: Boolean) |
setListValuesToText |
fun setListValuesToText(textView: TextView, values: List<String>?) |
setMirrorImage |
fun setMirrorImage(imageView: ImageView, isMirrored: Boolean) |
setProgressBarTint |
fun setProgressBarTint(progressBar: ProgressBar, @ColorIntdefault: Int?) |
setRadioButtonCheckedTint |
fun setRadioButtonCheckedTint(radioButton: RadioButton, @ColorIntdefault: Int?) |
setSwitchCheckedTint |
fun setSwitchCheckedTint(switch: SwitchCompat, @ColorIntdefault: Int?) |
setTextViewAppForegroundTint |
fun setTextViewAppForegroundTint(textView: TextView, @ColorIntdefault: Int?) |
setTextViewAppTint |
fun setTextViewAppTint(textView: TextView, @ColorIntdefault: Int?) |
setTextViewBackgroundTint |
fun setTextViewBackgroundTint(textView: TextView, @ColorIntdefault: Int?) |
setTextViewBackgroundTintAlpha |
fun setTextViewBackgroundTintAlpha(textView: TextView, @ColorIntdefault: Int?) |
setTextViewTextColor |
fun setTextViewTextColor(view: TextView, color: Int?) |
setViewIsDisabled |
fun setViewIsDisabled(view: View, disabled: Boolean, originalColor: Int?) |
setVisibilityInv |
fun setVisibilityInv(view: View, visible: Boolean?) |
showConfirmationPopUpDialog |
fun Context.showConfirmationPopUpDialog(title: String? = null, message: String? = null, positiveLabel: String, positiveCallback: () -> Unit? = null, negativeLabel: String? = null, negativeCallback: () -> Unit? = null, cancellable: Boolean = true) |
showKeyboard |
fun showKeyboard(activity: Activity?) Show the soft keyboard. |
showProminentDisclosure |
fun Context.showProminentDisclosure(onActionClicked: (Boolean) -> Unit) |
showSingleSelectionPopUpDialog |
fun Context.showSingleSelectionPopUpDialog(items: List<String>, onItemSelected: (String) -> Unit) |
talkBackSpeak |
fun Context.talkBackSpeak(message: String) |
tint |
fun Drawable.tint(color: Int): Drawable |
toDp |
fun Int.toDp(context: Context): Int |
toFlow |
fun <T> Single<T>.toFlow(): Flow<T> |
toIntSafe |
fun String.toIntSafe(): Int |
updateClickActionAccessibilityLabel |
fun View.updateClickActionAccessibilityLabel(clickActionLabel: String) |
updateFields |
fun <T> MutableLiveData<T>.updateFields(actions: (MutableLiveData<T>) -> Unit) |
viewAppDetailsSettingsIntent |
fun Context.viewAppDetailsSettingsIntent(): Intent |