zoukankan      html  css  js  c++  java
  • 做作业

    在xml中添加EditText控件后提示“This text field does not specify an inputType or a hint”错误  问题描述:在xml中添加EditText控件,控件信息如下。     <EditText         android:id="@+id/editText"         android:layout_width="match_parent"         android:layout_height="wrap_content" ></EditText>  编译时,提示“This text field does not specify an inputType or a hint”错误。  原因分析:控件中缺少android:hint以及android:inputType信息。android:hint用于设置EditText为空时显示的默认文字提示信息。android:inputType用于设置EditText的文本的类型,用于帮助输入法显示合适的键盘类型。  解决方法:在控件中添加android:hint以及android:inputType信息,添加后的控件信息如下。     <EditText         android:id="@+id/editText"         android:hint="0"         android:inputType="number"         android:layout_width="match_parent"         android:layout_height="wrap_content" ></EditText>

    天街小雨润如酥, 草色遥看近却无。 最是一年春好处, 决胜烟柳满皇都。
  • 相关阅读:
    小结
    五种常见的 PHP 设计模式
    php克隆 自动加载
    小知识点
    php抽象 与接口
    php静态
    iOS开发零碎笔记
    iOS开发错误日志
    Objective-C:Foundation框架-常用类-NSObject
    Objective-C:Foundation框架-常用类-NSDate
  • 原文地址:https://www.cnblogs.com/dahui/p/6655119.html
Copyright © 2011-2022 走看看