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 voidapplyWindowInsets(View view, boolean left, boolean top, boolean right, boolean bottom, boolean consume) Apply window insets padding for the supplied view.static voidapplyWindowInsetsBottom(View view) Apply bottom window insets padding for the supplied view.static voidapplyWindowInsetsBottom(View view, boolean consume) Apply bottom window insets padding for the supplied view.static voidApply horizontal window insets padding for the supplied view.static voidapplyWindowInsetsHorizontal(View view, boolean consume) Apply horizontal window insets padding for the supplied view.static voidApply horizontal and bottom window insets padding for the supplied view.static voidapplyWindowInsetsHorizontalBottom(View view, boolean consume) Apply horizontal and bottom window insets padding for the supplied view.static voidapplyWindowInsetsMargin(View view, boolean left, boolean top, boolean right, boolean bottom, boolean consume) Apply window insets margin for the supplied view.static voidApply bottom window insets margin for the supplied view.static voidapplyWindowInsetsMarginBottom(View view, boolean consume) Apply bottom window insets margin for the supplied view.static voidApply horizontal window insets margin for the supplied view.static voidapplyWindowInsetsMarginHorizontal(View view, boolean consume) Apply horizontal window insets margin for the supplied view.static voidApply horizontal and bottom window insets margin for the supplied view.static voidapplyWindowInsetsMarginHorizontalBottom(View view, boolean consume) Apply horizontal and bottom window insets margin for the supplied view.static voidApply vertical window insets margin for the supplied view.static voidapplyWindowInsetsMarginVertical(View view, boolean consume) Apply vertical window insets margin for the supplied view.static voidApply vertical window insets padding for the supplied view.static voidapplyWindowInsetsVertical(View view, boolean consume) Apply vertical window insets padding for the supplied view.static voidremoveFilter(View view, InputFilter filter) Remove the input filter for the supplied view.static voidsetAllCaps(View view, boolean allCaps) Set the all caps input filter for the supplied view.static voidsetFilter(View view, InputFilter filter) Set the input filter for the supplied view.static voidsetMaxLength(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-trueto 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-trueto apply the left window inset padding.top-trueto apply the top window inset padding.right-trueto apply the right window inset padding.bottom-trueto apply the bottom window inset padding.consume-trueto 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-trueto 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-trueto 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-trueto 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-trueto 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-trueto apply the left window inset margin.top-trueto apply the top window inset margin.right-trueto apply the right window inset margin.bottom-trueto apply the bottom window inset margin.consume-trueto 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-trueto 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-trueto 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-trueto 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-trueto 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:
-