Class DynamicInputUtils
java.lang.Object
com.pranavpandey.android.dynamic.util.DynamicInputUtils
Helper class to perform input operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyWindowInsets
(View view, boolean left, boolean top, boolean right, boolean bottom, boolean consume) Apply window insets padding for the supplied view.static void
applyWindowInsetsBottom
(View view) Apply bottom window insets padding for the supplied view.static void
applyWindowInsetsBottom
(View view, boolean consume) Apply bottom window insets padding for the supplied view.static void
Apply horizontal window insets padding for the supplied view.static void
applyWindowInsetsHorizontal
(View view, boolean consume) Apply horizontal window insets padding for the supplied view.static void
Apply horizontal and bottom window insets padding for the supplied view.static void
applyWindowInsetsHorizontalBottom
(View view, boolean consume) Apply horizontal and bottom window insets padding for the supplied view.static void
applyWindowInsetsMargin
(View view, boolean left, boolean top, boolean right, boolean bottom, boolean consume) Apply window insets margin for the supplied view.static void
Apply bottom window insets margin for the supplied view.static void
applyWindowInsetsMarginBottom
(View view, boolean consume) Apply bottom window insets margin for the supplied view.static void
Apply horizontal window insets margin for the supplied view.static void
applyWindowInsetsMarginHorizontal
(View view, boolean consume) Apply horizontal window insets margin for the supplied view.static void
Apply horizontal and bottom window insets margin for the supplied view.static void
applyWindowInsetsMarginHorizontalBottom
(View view, boolean consume) Apply horizontal and bottom window insets margin for the supplied view.static void
Apply vertical window insets margin for the supplied view.static void
applyWindowInsetsMarginVertical
(View view, boolean consume) Apply vertical window insets margin for the supplied view.static void
Apply vertical window insets padding for the supplied view.static void
applyWindowInsetsVertical
(View view, boolean consume) Apply vertical window insets padding for the supplied view.static void
removeFilter
(View view, InputFilter filter) Remove the input filter for the supplied view.static void
setAllCaps
(View view, boolean allCaps) Set the all caps input filter for the supplied view.static void
setFilter
(View view, InputFilter filter) Set the input filter for the supplied view.static void
setMaxLength
(View view, int length) Set the maximum length input filter for the supplied view.
-
Constructor Details
-
DynamicInputUtils
public DynamicInputUtils()
-
-
Method Details
-
setFilter
Set the input filter for the supplied view.- Parameters:
view
- The view to be used.filter
- The input filter to be set.
-
removeFilter
Remove the input filter for the supplied view.- Parameters:
view
- The view to be used.filter
- The input filter to be removed.
-
setMaxLength
Set the maximum length input filter for the supplied view.- Parameters:
view
- The view to be used.length
- The maximum length to be set.- See Also:
-
setAllCaps
Set the all caps input filter for the supplied view.- Parameters:
view
- The view to be used.allCaps
-true
to set all caps.- See Also:
-
applyWindowInsets
public static void applyWindowInsets(@Nullable View view, boolean left, boolean top, boolean right, boolean bottom, boolean consume) Apply window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.left
-true
to apply the left window inset padding.top
-true
to apply the top window inset padding.right
-true
to apply the right window inset padding.bottom
-true
to apply the bottom window inset padding.consume
-true
to consume the applied window insets.
-
applyWindowInsetsHorizontal
Apply horizontal window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.consume
-true
to consume the applied window insets.- See Also:
-
applyWindowInsetsHorizontal
Apply horizontal window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.- See Also:
-
applyWindowInsetsVertical
Apply vertical window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.consume
-true
to consume the applied window insets.- See Also:
-
applyWindowInsetsVertical
Apply vertical window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.- See Also:
-
applyWindowInsetsBottom
Apply bottom window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.consume
-true
to consume the applied window insets.- See Also:
-
applyWindowInsetsBottom
Apply bottom window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.- See Also:
-
applyWindowInsetsHorizontalBottom
Apply horizontal and bottom window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.consume
-true
to consume the applied window insets.- See Also:
-
applyWindowInsetsHorizontalBottom
Apply horizontal and bottom window insets padding for the supplied view.- Parameters:
view
- The view to set the insets padding.- See Also:
-
applyWindowInsetsMargin
public static void applyWindowInsetsMargin(@Nullable View view, boolean left, boolean top, boolean right, boolean bottom, boolean consume) Apply window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.left
-true
to apply the left window inset margin.top
-true
to apply the top window inset margin.right
-true
to apply the right window inset margin.bottom
-true
to apply the bottom window inset margin.consume
-true
to consume the applied window margin.
-
applyWindowInsetsMarginHorizontal
Apply horizontal window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.consume
-true
to consume the applied window insets.- See Also:
-
applyWindowInsetsMarginHorizontal
Apply horizontal window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.- See Also:
-
applyWindowInsetsMarginVertical
Apply vertical window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.consume
-true
to consume the applied window insets.- See Also:
-
applyWindowInsetsMarginVertical
Apply vertical window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.- See Also:
-
applyWindowInsetsMarginBottom
Apply bottom window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.consume
-true
to consume the applied window insets.- See Also:
-
applyWindowInsetsMarginBottom
Apply bottom window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.- See Also:
-
applyWindowInsetsMarginHorizontalBottom
Apply horizontal and bottom window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.consume
-true
to consume the applied window insets.- See Also:
-
applyWindowInsetsMarginHorizontalBottom
Apply horizontal and bottom window insets margin for the supplied view.- Parameters:
view
- The view to set the insets margin.- See Also:
-