-
- All Implemented Interfaces:
public class Utils.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Utils.Companion
INSTANCE
-
Method Summary
Modifier and Type Method Description final Unit
showHideKeyboard(EditText et, Boolean show)
final Unit
showKeyboard(EditText view)
final Unit
hideKeyboard(View view)
final Animation
getRightToLeftAnimation(Integer relativeTo)
final AnimationSet
getEntryAnimation(Integer delay)
final Unit
doOnceOnGlobalLayoutOfView(View v, Runnable r)
final TransitionSet
getFragmentExitTransition()
final Integer
dpToPx(Integer dp)
final Unit
runAfter(Long delay, Runnable runnable)
final String
toString(Object o)
final Spanned
getSpannedText(String text)
converts String with text-with-special-style ] inside it to a spanned final Boolean
viewContainsPoint(PointF point, View view)
Checks if point is inside a specific View final Unit
loge(String s)
DEBB to be used only during developing a feature to make filtering Logcat easier. final Unit
logBug(String s)
DEBB to be used while debugging a specific bug to make filtering Logcat easier. final Boolean
isViewVisibleOnScreen(View view2)
Returns if a view is currently visible in its entirety on the screen. -
-
Method Detail
-
showHideKeyboard
final Unit showHideKeyboard(EditText et, Boolean show)
-
showKeyboard
final Unit showKeyboard(EditText view)
-
hideKeyboard
final Unit hideKeyboard(View view)
-
getRightToLeftAnimation
final Animation getRightToLeftAnimation(Integer relativeTo)
-
getEntryAnimation
final AnimationSet getEntryAnimation(Integer delay)
-
doOnceOnGlobalLayoutOfView
final Unit doOnceOnGlobalLayoutOfView(View v, Runnable r)
-
getFragmentExitTransition
final TransitionSet getFragmentExitTransition()
-
getSpannedText
final Spanned getSpannedText(String text)
converts String with text-with-special-style ] inside it to a spanned
-
viewContainsPoint
final Boolean viewContainsPoint(PointF point, View view)
Checks if point is inside a specific View
- Parameters:
point
- the Point to checkview
- View to check for point
-
loge
final Unit loge(String s)
DEBB to be used only during developing a feature to make filtering Logcat easier. Should not have active usages when a feature is merged
-
logBug
final Unit logBug(String s)
DEBB to be used while debugging a specific bug to make filtering Logcat easier. Using BUGRESOLVE as a filter in Logcat we see only those relevant logs. Should not have active usages when a feature is merged
-
isViewVisibleOnScreen
final Boolean isViewVisibleOnScreen(View view2)
Returns if a view is currently visible in its entirety on the screen. Useful for views that are contained in a ScrollView or RecyclerView
-
-
-
-