i have many input fields in my project and all of them accept numeric values followed by alphabetic values(like 246736adsf) so i want to show numeric keyboard first(in keyboard having numeric and alphabetic values) and alphabetic on selection. I tried a lot but all problems open only numeric not combination of both. So please help me to get rid of this problem. Thanking you.
            Asked
            
        
        
            Active
            
        
            Viewed 986 times
        
    0
            
            
        - 
                    This has already been asked a lot: http://stackoverflow.com/questions/3544214/edittext-with-number-keypad-by-default-but-allowing-alphabetic-characters – webmonkey May 06 '13 at 10:22
- 
                    can we achieve this in xml field of EditText – HungryHeart May 06 '13 at 10:25
- 
                    Please read the full article. – webmonkey May 06 '13 at 10:26
- 
                    @sebastian it is showing keyboard like numeric. i have checked it – HungryHeart May 06 '13 at 10:31
1 Answers
-1
            
            
        set input type to number for edit text like this
    android:inputType="number" 
UPDATE
        EditText text = (EditText)findViewById(R.id.editText);
    text.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_CLASS_TEXT);
 
    
    
        Prachi
        
- 2,559
- 4
- 25
- 37
- 
                    
- 
                    please read my question again. if i use android:inputType="number" then i am not able to input alphabets and i want both but numeric first – HungryHeart May 06 '13 at 10:38
- 
                    @curious_mid thank you it almost solved my problem. but i am still not able to select alphabets in keyboard. – HungryHeart May 06 '13 at 11:10
