`
marine8888
  • 浏览: 544462 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Android----输入模式设置

阅读更多
InputType的参数:
用法:((EditText)findViewById(R.id.edit)).setInputType(InputType.*);
int TYPE_CLASS_DATETIME Class for dates and times. 
 int TYPE_CLASS_NUMBER Class for numeric text. 
 int TYPE_CLASS_PHONE Class for a phone number. 
 int TYPE_CLASS_TEXT Class for normal text. 
 int TYPE_DATETIME_VARIATION_DATE Default variation of TYPE_CLASS_DATETIME: allows entering only a date. 
 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.
 int TYPE_MASK_CLASS Mask of bits that determine the overall class of text being given. 
 int TYPE_MASK_FLAGS Mask of bits that provide addition bit flags of options. 
 int TYPE_MASK_VARIATION Mask of bits that determine the variation of the base content class. 
 int TYPE_NULL Special content type for when no explicit(明确的) type has been specified. 
 int TYPE_NUMBER_FLAG_DECIMAL Flag of TYPE_CLASS_NUMBER: the number is decimal, allowing a decimal point to provide 		fractional values. 
 int TYPE_NUMBER_FLAG_SIGNED Flag of TYPE_CLASS_NUMBER: the number is signed, allowing a positive or negative sign 		at the start. 
 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. 
 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. 
 int TYPE_TEXT_FLAG_CAP_CHARACTERS Flag for TYPE_CLASS_TEXT: capitalize all characters. 
 int TYPE_TEXT_FLAG_CAP_SENTENCES Flag for TYPE_CLASS_TEXT: capitalize first character of each sentence. 
 int TYPE_TEXT_FLAG_CAP_WORDS Flag for TYPE_CLASS_TEXT: capitalize first character of all words. 
 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. 
 int TYPE_TEXT_FLAG_MULTI_LINE Flag for TYPE_CLASS_TEXT: multiple lines of text can be entered into the field. 
 int TYPE_TEXT_FLAG_NO_SUGGESTIONS Flag for TYPE_CLASS_TEXT: the input method does not need to display any dictionary-based candidates. 
 int TYPE_TEXT_VARIATION_EMAIL_ADDRESS Variation of TYPE_CLASS_TEXT: entering an e-mail address. 
 int TYPE_TEXT_VARIATION_EMAIL_SUBJECT Variation of TYPE_CLASS_TEXT: entering the subject line of an e-mail. 
 int TYPE_TEXT_VARIATION_FILTER Variation of TYPE_CLASS_TEXT: entering text to filter contents of a list etc. 
 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. 
 int TYPE_TEXT_VARIATION_NORMAL Default variation of TYPE_CLASS_TEXT: plain old normal text. 
 int TYPE_TEXT_VARIATION_PASSWORD Variation of TYPE_CLASS_TEXT: entering a password. 
 int TYPE_TEXT_VARIATION_PERSON_NAME Variation of TYPE_CLASS_TEXT: entering the name of a person. 
 int TYPE_TEXT_VARIATION_PHONETIC Variation of TYPE_CLASS_TEXT: entering text for phonetic pronunciation, such as a phonetic name field in contacts. 
 int TYPE_TEXT_VARIATION_POSTAL_ADDRESS Variation of TYPE_CLASS_TEXT: entering a postal mailing address. 
 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. 
 int TYPE_TEXT_VARIATION_URI Variation of TYPE_CLASS_TEXT: entering a URI. 
 int TYPE_TEXT_VARIATION_VISIBLE_PASSWORD Variation of TYPE_CLASS_TEXT: entering a password, which should be visible to the user. 
 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. 
 int TYPE_CLASS_NUMBER Class for numeric text. 
 int TYPE_CLASS_PHONE Class for a phone number. 
 int TYPE_CLASS_TEXT Class for normal text. 
 int TYPE_DATETIME_VARIATION_DATE Default variation of TYPE_CLASS_DATETIME: allows entering only a date. 
 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.
 int TYPE_MASK_CLASS Mask of bits that determine the overall class of text being given. 
 int TYPE_MASK_FLAGS Mask of bits that provide addition bit flags of options. 
 int TYPE_MASK_VARIATION Mask of bits that determine the variation of the base content class. 
 int TYPE_NULL Special content type for when no explicit type has been specified. 
 int TYPE_NUMBER_FLAG_DECIMAL Flag of TYPE_CLASS_NUMBER: the number is decimal, allowing a decimal point to provide fractional values. 
 int TYPE_NUMBER_FLAG_SIGNED Flag of TYPE_CLASS_NUMBER: the number is signed, allowing a positive or negative sign at the start. 
 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. 
 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. 
 int TYPE_TEXT_FLAG_CAP_CHARACTERS Flag for TYPE_CLASS_TEXT: capitalize all characters.
 int TYPE_TEXT_FLAG_CAP_SENTENCES Flag for TYPE_CLASS_TEXT: capitalize first character of each sentence.
 int TYPE_TEXT_FLAG_CAP_WORDS Flag for TYPE_CLASS_TEXT: capitalize first character of all words. 
 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. 
 int TYPE_TEXT_FLAG_MULTI_LINE Flag for TYPE_CLASS_TEXT: multiple lines of text can be entered into the field.
 int TYPE_TEXT_FLAG_NO_SUGGESTIONS Flag for TYPE_CLASS_TEXT: the input method does not need to display any dictionary-based candidates. 
 int TYPE_TEXT_VARIATION_EMAIL_ADDRESS Variation of TYPE_CLASS_TEXT: entering an e-mail address. 
 int TYPE_TEXT_VARIATION_EMAIL_SUBJECT Variation of TYPE_CLASS_TEXT: entering the subject line of an e-mail. 
 int TYPE_TEXT_VARIATION_FILTER Variation of TYPE_CLASS_TEXT: entering text to filter contents of a list etc. 
 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. 
 int TYPE_TEXT_VARIATION_NORMAL Default variation of TYPE_CLASS_TEXT: plain old normal text. 
 int TYPE_TEXT_VARIATION_PASSWORD Variation of TYPE_CLASS_TEXT: entering a password. 
 int TYPE_TEXT_VARIATION_PERSON_NAME Variation of TYPE_CLASS_TEXT: entering the name of a person. 
 int TYPE_TEXT_VARIATION_PHONETIC Variation of TYPE_CLASS_TEXT: entering text for phonetic pronunciation, such as a phonetic name field in contacts. 
 int TYPE_TEXT_VARIATION_POSTAL_ADDRESS Variation of TYPE_CLASS_TEXT: entering a postal mailing address. 
 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. 
 int TYPE_TEXT_VARIATION_URI Variation of TYPE_CLASS_TEXT: entering a URI. 
 int TYPE_TEXT_VARIATION_VISIBLE_PASSWORD Variation of TYPE_CLASS_TEXT: entering a password, which should be visible to the user. 
 int TYPE_TEXT_VARIATION_WEB_EDIT_TEXT Variation of TYPE_CLASS_TEXT: entering text inside of a web form.

 

分享到:
评论
1 楼 qiaoweishu 2010-11-05  
用心之人!继续加油!

相关推荐

    android-sdk-4.2.2 android-sdk-4.2.2-platforms

    标题中的"android-sdk-4.2.2 android-sdk-4.2.2-platforms"指的是Android SDK的一个特定版本,即Android 4.2.2(API级别17),该版本的SDK平台组件。这个版本是Android操作系统的 Jelly Bean 版本的一部分,发布于...

    Android-Android-Prefix-Input为EditText添加prefix前缀模式

    `Android-Prefix-Input`项目就是针对这种情况提供的一种解决方案,它允许开发者为`EditText`组件添加前缀(Prefix)模式,使得输入框在显示时能够带有特定的标识或者提示文字,提升用户界面的易用性。 `EditText`是...

    android-sdk-sources-android-24.rar

    Android 24对许多系统服务进行了优化,比如电源管理、网络堆栈和输入设备处理。源码分析可以帮助开发者理解系统服务的工作原理,从而更好地集成到自己的应用中。 9. **多语言支持**: Android 24继续强化多语言...

    android-sdk-sources-android-27.rar

    4. **自动填充服务(Autofill Framework)**:为用户提供了一种统一的方式来存储和填充表单数据,减少了输入的繁琐。这个框架在 `View`、`AutofillManager` 和 `AutofillService` 类中体现。 5. **电量与性能优化**...

    用Android-X86和VirtualBox打造高性能Android开发环境

    最后,将虚拟机的光驱设置为我们刚才下载的 Android-x86 iso。 step 3:安装 Android-x86 到虚拟机 启动虚拟机后,可以看到安装界面,选择 Installation - Install Android-x86 to harddisk,然后选择 Create/...

    android-26.rar

    3. **画中画模式(Picture-in-Picture Mode)**:Android 8.0支持画中画模式,允许用户在小窗口中观看视频,同时进行其他操作。开发者可以通过实现Picture-in-Picture API来支持这一功能。 4. **自动填充框架...

    opencv-4.6.0-android-sdk.zip

    4. **处理摄像头输入**:如果需要实时处理摄像头数据,需要设置CameraBridgeViewBase或使用VideoCapture类。 5. **显示结果**:将处理后的图像数据展示在ImageView或其他视图上,或者进行进一步分析。 总的来说,...

    android-times-square日历控件

    通过设置起始和结束日期,可以限制用户只能在特定范围内选择日期,避免不合法的日期输入。同时,还可以为每个日期设置可选或禁选状态,比如禁止选择周末或者过去的日子。 ### 4. 国际化支持 考虑到全球用户的使用...

    永久修改VirtrualBox中Android-x86启动分辨率

    本文将详细介绍如何通过两种方法来设置虚拟机的启动分辨率为1024x600,从而让虚拟机中的Android系统以竖屏模式启动。 #### 第一步:定义虚拟机定制的分辨率模式1024x600 **第一种方式:命令方式** 1. **关闭...

    android-serialport-api.zip

    在rk3399上使用"android-serialport-api",开发者需要注意SoC的串口配置和设备树设置,确保串口功能正常工作。在调试过程中,串口日志也是一个非常有用的工具,可以帮助排查通信问题。 总的来说,"android-...

    android-android-ui-design-patterns.rar_Android UI Design_Android

    "android-android-ui-design-patterns.rar"是一个压缩包,包含了关于Android UI设计模式的重要资料,特别是对于GUI(图形用户界面)设计者来说,这份资源极其有价值。 Android UI设计遵循一套规范和最佳实践,旨在...

    mipsel-linux-android-4.9

    MIPSel是MIPS架构的小端模式版本,常见于一些嵌入式设备和早期的Android手机和平板电脑。 【描述】提到的“将文件置于文件夹ndk-bundle/toolchain即可正常使用”,意味着这个压缩包包含了Android Native ...

    android-sdk_r24.3.2-windows

    - **真机调试**:连接Android设备到电脑,开启USB调试模式,在Android Studio中选择设备进行调试。 ### 5. Android SDK管理工具 #### 5.1 SDK Manager - **安装工具**:使用`sdkmanager`命令安装所需的平台、工具...

    android-platform-tools.7z

    一旦设置好环境变量,你就可以通过简单的adb命令开始与你的Android设备进行交互了。 总的来说,adb是Android开发者不可或缺的工具,它简化了设备管理、文件操作、应用调试等多个环节,极大地提升了开发效率。了解和...

    opencv-4.5.2-android-sdk haarcascades lbpcascades

    另一方面,LBP(局部二值模式)级联分类器(lbpcascades)是一种更现代的面部检测技术。与Haar特征相比,LBP特征被认为在某些情况下具有更好的检测性能,特别是在光照变化较大的场景下。LBP特征捕获了图像的纹理信息...

    vmware12-安装android-x86-6.0

    - 保存并退出编辑模式(先按`ESC`键,再输入`:wq`并回车)。 - 重启虚拟机。 ##### 5. 启用 3D 加速功能 - **启用 3D 加速**:在虚拟机设置中,启用 3D 加速功能。 - **安装 VMware Tools**:进入系统后,点击工具...

    Android-CircleDialog.zip

    在CircleDialog中,开发者可能利用Adapter和ViewHolder模式来填充和展示列表数据。为了保持对话框的圆角效果,列表项的布局也需要进行相应的定制,比如设置圆角背景或者使用自定义的分割线。同时,列表框的交互逻辑...

    android-platform-17

    Daydream是Android 4.2中的全新待机模式,允许用户在设备闲置时展示动态壁纸或应用,如天气、新闻等。 7. **应用权限管理**: 提供了更细粒度的应用权限管理,用户可以在安装应用后对特定权限进行更改,增强了...

    android-usb-driver.zip(htc G7 usb驱动)

    5. 执行刷机命令:根据刷机教程输入相应的刷机指令,将新固件写入手机。 6. 完成并重启:刷机完成后,断开USB连接,手机会自动重启进入新的系统。 总的来说,"android-usb-driver.zip"这个压缩包对HTC G7用户来说是...

    kotlin for android----------MVP模式实现登录

    2. **View(视图层)**:负责显示UI和接收用户输入。它不处理业务逻辑,而是将这些操作委托给Presenter。在Android中,View通常由Activity或Fragment等UI组件来实现。 3. **Presenter(呈现者层)**:作为Model和...

Global site tag (gtag.js) - Google Analytics