Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 键入时隐藏文本视图下栏_Android_Textview - Fatal编程技术网

Android 键入时隐藏文本视图下栏

Android 键入时隐藏文本视图下栏,android,textview,Android,Textview,我想在android中隐藏textView的底部。如何实现这一点。我已经尝试将背景颜色设置为“透明”或“空”。但在键入时,underbar仍然可见。请尝试此代码 <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="@string/hello" android:background="#00000000" /> 更新: 试试这

我想在android中隐藏textView的底部。如何实现这一点。我已经尝试将背景颜色设置为“透明”或“空”。但在键入时,underbar仍然可见。

请尝试此代码

 <EditText
 android:layout_width="fill_parent"

 android:layout_height="wrap_content"

 android:hint="@string/hello"

 android:background="#00000000" />

更新:

试试这个

someTextView.clearComposingText()


希望对您有所帮助

您是指
编辑文本
还是
自动完成文本视图
?因为
TextView
没有基础栏!我已经试过了。。如果没有在编辑文本中给出文本,您所说的内容将只删除底部。。一旦你开始输入,底部就会再次可见。但感谢您的回复:)