Class DynamicInputUtils


  • public class DynamicInputUtils
    extends java.lang.Object
    Helper class to perform input operations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void removeFilter​(android.view.View view, android.text.InputFilter filter)
      Remove the input filter for the supplied view.
      static void setAllCaps​(android.view.View view, boolean allCaps)
      Set the all caps input filter for the supplied view.
      static void setFilter​(android.view.View view, android.text.InputFilter filter)
      Set the input filter for the supplied view.
      static void setMaxLength​(android.view.View view, int length)
      Set the maximum length input filter for the supplied view.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DynamicInputUtils

        public DynamicInputUtils()
    • Method Detail

      • setFilter

        public static void setFilter​(@Nullable
                                     android.view.View view,
                                     @Nullable
                                     android.text.InputFilter filter)
        Set the input filter for the supplied view.
        Parameters:
        view - The view to be used.
        filter - The input filter to be set.
      • removeFilter

        public static void removeFilter​(@Nullable
                                        android.view.View view,
                                        @Nullable
                                        android.text.InputFilter filter)
        Remove the input filter for the supplied view.
        Parameters:
        view - The view to be used.
        filter - The input filter to be removed.
      • setMaxLength

        public static void setMaxLength​(@Nullable
                                        android.view.View view,
                                        int length)
        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:
        setFilter(View, InputFilter)
      • setAllCaps

        public static void setAllCaps​(@Nullable
                                      android.view.View view,
                                      boolean allCaps)
        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:
        setFilter(View, InputFilter), removeFilter(View, InputFilter)