Class LceAnimator
- java.lang.Object
-
- com.cheetahdigital.uikit.architecture.lce.LceAnimator
-
public class LceAnimator extends java.lang.Object
Little helper class for animating content, error and loading view- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description LceAnimator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
dpToPx(android.content.Context context, float dp)
Converts a dp value to a px valuestatic void
showContent(android.view.View loadingView, android.view.View contentView, android.view.View errorView)
Display the content instead of the loadingViewstatic void
showErrorView(android.view.View loadingView, android.view.View contentView, android.view.View errorView)
Shows the error view instead of the loading viewstatic void
showLoading(android.view.View loadingView, android.view.View contentView, android.view.View errorView)
Show the loading view.
-
-
-
Method Detail
-
showLoading
public static void showLoading(@NonNull android.view.View loadingView, @NonNull android.view.View contentView, @NonNull android.view.View errorView)
Show the loading view. No animations, because sometimes loading things is pretty fast (i.e. retrieve data from memory cache).- Parameters:
loadingView
- view for loadingcontentView
- view for contenterrorView
- view for error
-
showErrorView
public static void showErrorView(@NonNull android.view.View loadingView, @NonNull android.view.View contentView, android.view.View errorView)
Shows the error view instead of the loading view- Parameters:
loadingView
- view for loadingcontentView
- view for contenterrorView
- view for error
-
showContent
public static void showContent(@NonNull android.view.View loadingView, @NonNull android.view.View contentView, @NonNull android.view.View errorView)
Display the content instead of the loadingView- Parameters:
loadingView
- view for loadingcontentView
- view for contenterrorView
- view for error
-
dpToPx
public static int dpToPx(android.content.Context context, float dp)
Converts a dp value to a px value- Parameters:
context
- used to get resourcesdp
- the dp value- Returns:
- converted value of dp to px
-
-