Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
    
    UsernameFilterGMail
    open class UsernameFilterGMail : LoginFilter
    
    
    
    This filter rejects characters in the user name that are not compatible with GMail account creation. It prevents the user from entering user names with characters other than [a-zA-Z0-9.].
    Summary
    
    
    
      
        
          | Inherited functions | 
        
          | From class LoginFilter
                
                  
                    | CharSequence! | filter(source: CharSequence!, start: Int, end: Int, dest: Spanned!, dstart: Int, dend: Int)
                         This method is called when the buffer is going to replace the range dstart … dendofdestwith the new text from the rangestart … endofsource. Returns the CharSequence that we want placed there instead, including an empty string if appropriate, ornullto accept the original replacement. Be careful to not to reject 0-length replacements, as this is what happens when you delete text. |  
                    | Unit | onInvalidCharacter(c: Char)
                         Called whenever we encounter an invalid character. |  
                    | Unit | onStart()
                         Called when we start processing filter. |  
                    | Unit | onStop()
                         Called when we're done processing filter |  | 
      
    
    Public constructors
    
      UsernameFilterGMail
      
      UsernameFilterGMail()
     
    
      UsernameFilterGMail
      
      UsernameFilterGMail(appendInvalid: Boolean)
     
    Public methods
    
      isAllowed
      
      open fun isAllowed(c: Char): Boolean
      Deprecated: Deprecated in Java. 
     
  
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]