zoukankan      html  css  js  c++  java
  • Android----输入模式设置

    Java代码  收藏代码
    1. InputType的参数:  
    Java代码  收藏代码
    1. 用法:((EditText)findViewById(R.id.edit)).setInputType(InputType.*);  
    Java代码  收藏代码
    1. int TYPE_CLASS_DATETIME Class for dates and times.   
    2.  int TYPE_CLASS_NUMBER Class for numeric text.   
    3.  int TYPE_CLASS_PHONE Class for a phone number.   
    4.  int TYPE_CLASS_TEXT Class for normal text.   
    5.  int TYPE_DATETIME_VARIATION_DATE Default variation of TYPE_CLASS_DATETIME: allows entering only a date.   
    6.  int TYPE_DATETIME_VARIATION_NORMAL Default variation of TYPE_CLASS_DATETIME: allows entering both a date and time.  int TYPE_DATETIME_VARIATION_TIME Default variation of TYPE_CLASS_DATETIME: allows entering only a time.  
    7.  int TYPE_MASK_CLASS Mask of bits that determine the overall class of text being given.   
    8.  int TYPE_MASK_FLAGS Mask of bits that provide addition bit flags of options.   
    9.  int TYPE_MASK_VARIATION Mask of bits that determine the variation of the base content class.   
    10.  int TYPE_NULL Special content type for when no explicit(明确的) type has been specified.   
    11.  int TYPE_NUMBER_FLAG_DECIMAL Flag of TYPE_CLASS_NUMBER: the number is decimal, allowing a decimal point to provide         fractional values.   
    12.  int TYPE_NUMBER_FLAG_SIGNED Flag of TYPE_CLASS_NUMBER: the number is signed, allowing a positive or negative sign      at the start.   
    13.  int TYPE_TEXT_FLAG_AUTO_COMPLETE Flag for TYPE_CLASS_TEXT: the text editor is performing auto-completion of the    text being entered based on its own semantics, which it will present to the user as they type.   
    14.  int TYPE_TEXT_FLAG_AUTO_CORRECT Flag for TYPE_CLASS_TEXT: the user is entering free-form text that should have     auto-correction applied to it.   
    15.  int TYPE_TEXT_FLAG_CAP_CHARACTERS Flag for TYPE_CLASS_TEXT: capitalize all characters.   
    16.  int TYPE_TEXT_FLAG_CAP_SENTENCES Flag for TYPE_CLASS_TEXT: capitalize first character of each sentence.   
    17.  int TYPE_TEXT_FLAG_CAP_WORDS Flag for TYPE_CLASS_TEXT: capitalize first character of all words.   
    18.  int TYPE_TEXT_FLAG_IME_MULTI_LINE Flag for TYPE_CLASS_TEXT: the regular text view associated with this should not be multi-line, but when a fullscreen input method is providing text it should use multiple lines if it can.   
    19.  int TYPE_TEXT_FLAG_MULTI_LINE Flag for TYPE_CLASS_TEXT: multiple lines of text can be entered into the field.   
    20.  int TYPE_TEXT_FLAG_NO_SUGGESTIONS Flag for TYPE_CLASS_TEXT: the input method does not need to display any dictionary-based candidates.   
    21.  int TYPE_TEXT_VARIATION_EMAIL_ADDRESS Variation of TYPE_CLASS_TEXT: entering an e-mail address.   
    22.  int TYPE_TEXT_VARIATION_EMAIL_SUBJECT Variation of TYPE_CLASS_TEXT: entering the subject line of an e-mail.   
    23.  int TYPE_TEXT_VARIATION_FILTER Variation of TYPE_CLASS_TEXT: entering text to filter contents of a list etc.   
    24.  int TYPE_TEXT_VARIATION_LONG_MESSAGE Variation of TYPE_CLASS_TEXT: entering the content of a long, possibly formal message such as the body of an e-mail.   
    25.  int TYPE_TEXT_VARIATION_NORMAL Default variation of TYPE_CLASS_TEXT: plain old normal text.   
    26.  int TYPE_TEXT_VARIATION_PASSWORD Variation of TYPE_CLASS_TEXT: entering a password.   
    27.  int TYPE_TEXT_VARIATION_PERSON_NAME Variation of TYPE_CLASS_TEXT: entering the name of a person.   
    28.  int TYPE_TEXT_VARIATION_PHONETIC Variation of TYPE_CLASS_TEXT: entering text for phonetic pronunciation, such as a phonetic name field in contacts.   
    29.  int TYPE_TEXT_VARIATION_POSTAL_ADDRESS Variation of TYPE_CLASS_TEXT: entering a postal mailing address.   
    30.  int TYPE_TEXT_VARIATION_SHORT_MESSAGE Variation of TYPE_CLASS_TEXT: entering a short, possibly informal message such as an instant message or a text message.   
    31.  int TYPE_TEXT_VARIATION_URI Variation of TYPE_CLASS_TEXT: entering a URI.   
    32.  int TYPE_TEXT_VARIATION_VISIBLE_PASSWORD Variation of TYPE_CLASS_TEXT: entering a password, which should be visible to the user.   
    33.  int TYPE_TEXT_VARIATION_WEB_EDIT_TEXT Variation of TYPE_CLASS_TEXT: entering text inside of a web form.EditText et = (EditText) findViewById(R.id.et); et.setInputType(InputType.TYPE_CLASS_NUMBER); TYPE_CLASS_DATETIME Class for dates and times.   
    34.  int TYPE_CLASS_NUMBER Class for numeric text.   
    35.  int TYPE_CLASS_PHONE Class for a phone number.   
    36.  int TYPE_CLASS_TEXT Class for normal text.   
    37.  int TYPE_DATETIME_VARIATION_DATE Default variation of TYPE_CLASS_DATETIME: allows entering only a date.   
    38.  int TYPE_DATETIME_VARIATION_NORMAL Default variation of TYPE_CLASS_DATETIME: allows entering both a date and time. int TYPE_DATETIME_VARIATION_TIME Default variation of TYPE_CLASS_DATETIME: allows entering only a time.  
    39.  int TYPE_MASK_CLASS Mask of bits that determine the overall class of text being given.   
    40.  int TYPE_MASK_FLAGS Mask of bits that provide addition bit flags of options.   
    41.  int TYPE_MASK_VARIATION Mask of bits that determine the variation of the base content class.   
    42.  int TYPE_NULL Special content type for when no explicit type has been specified.   
    43.  int TYPE_NUMBER_FLAG_DECIMAL Flag of TYPE_CLASS_NUMBER: the number is decimal, allowing a decimal point to provide fractional values.   
    44.  int TYPE_NUMBER_FLAG_SIGNED Flag of TYPE_CLASS_NUMBER: the number is signed, allowing a positive or negative sign at the start.   
    45.  int TYPE_TEXT_FLAG_AUTO_COMPLETE Flag for TYPE_CLASS_TEXT: the text editor is performing auto-completion of the text being entered based on its own semantics, which it will present to the user as they type.   
    46.  int TYPE_TEXT_FLAG_AUTO_CORRECT Flag for TYPE_CLASS_TEXT: the user is entering free-form text that should have auto-correction applied to it.   
    47.  int TYPE_TEXT_FLAG_CAP_CHARACTERS Flag for TYPE_CLASS_TEXT: capitalize all characters.  
    48.  int TYPE_TEXT_FLAG_CAP_SENTENCES Flag for TYPE_CLASS_TEXT: capitalize first character of each sentence.  
    49.  int TYPE_TEXT_FLAG_CAP_WORDS Flag for TYPE_CLASS_TEXT: capitalize first character of all words.   
    50.  int TYPE_TEXT_FLAG_IME_MULTI_LINE Flag for TYPE_CLASS_TEXT: the regular text view associated with this should not be multi-line, but when a fullscreen input method is providing text it should use multiple lines if it can.   
    51.  int TYPE_TEXT_FLAG_MULTI_LINE Flag for TYPE_CLASS_TEXT: multiple lines of text can be entered into the field.  
    52.  int TYPE_TEXT_FLAG_NO_SUGGESTIONS Flag for TYPE_CLASS_TEXT: the input method does not need to display any dictionary-based candidates.   
    53.  int TYPE_TEXT_VARIATION_EMAIL_ADDRESS Variation of TYPE_CLASS_TEXT: entering an e-mail address.   
    54.  int TYPE_TEXT_VARIATION_EMAIL_SUBJECT Variation of TYPE_CLASS_TEXT: entering the subject line of an e-mail.   
    55.  int TYPE_TEXT_VARIATION_FILTER Variation of TYPE_CLASS_TEXT: entering text to filter contents of a list etc.   
    56.  int TYPE_TEXT_VARIATION_LONG_MESSAGE Variation of TYPE_CLASS_TEXT: entering the content of a long, possibly formal message such as the body of an e-mail.   
    57.  int TYPE_TEXT_VARIATION_NORMAL Default variation of TYPE_CLASS_TEXT: plain old normal text.   
    58.  int TYPE_TEXT_VARIATION_PASSWORD Variation of TYPE_CLASS_TEXT: entering a password.   
    59.  int TYPE_TEXT_VARIATION_PERSON_NAME Variation of TYPE_CLASS_TEXT: entering the name of a person.   
    60.  int TYPE_TEXT_VARIATION_PHONETIC Variation of TYPE_CLASS_TEXT: entering text for phonetic pronunciation, such as a phonetic name field in contacts.   
    61.  int TYPE_TEXT_VARIATION_POSTAL_ADDRESS Variation of TYPE_CLASS_TEXT: entering a postal mailing address.   
    62.  int TYPE_TEXT_VARIATION_SHORT_MESSAGE Variation of TYPE_CLASS_TEXT: entering a short, possibly informal message such as an instant message or a text message.   
    63.  int TYPE_TEXT_VARIATION_URI Variation of TYPE_CLASS_TEXT: entering a URI.   
    64.  int TYPE_TEXT_VARIATION_VISIBLE_PASSWORD Variation of TYPE_CLASS_TEXT: entering a password, which should be visible to the user.   
    65.  int TYPE_TEXT_VARIATION_WEB_EDIT_TEXT Variation of TYPE_CLASS_TEXT: entering text inside of a web form.  
  • 相关阅读:
    TCP/IP资料整理
    对谷歌自带闹钟应用中材料设计的吹毛求疵
    如何给非AppCompatActivity添加Toolbar?--关于5.0新特性兼容5.0以下设备的探索
    Android 5.0自定义动画
    Android开发Tips-1
    Android控件RecyclerView与ListView的异同
    有关Android存储的相关概念辨析
    关于RecyclerView中Viewholder和View的缓存机制的探究
    Android Wear和二维码
    构建具有深度和灵活性的安卓Wear应用
  • 原文地址:https://www.cnblogs.com/xiaochao1234/p/4208408.html
Copyright © 2011-2022 走看看