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>

    天街小雨润如酥, 草色遥看近却无。 最是一年春好处, 决胜烟柳满皇都。
  • 相关阅读:
    学习进度十二
    学习情况记录 11
    2020寒假 13
    学习情况记录 10
    学习情况记录 09
    2020寒假 12
    学习情况记录 08
    2020寒假 11
    学习情况记录 07
    2020寒假 10
  • 原文地址:https://www.cnblogs.com/dahui/p/6655119.html
Copyright © 2011-2022 走看看