让autocompletetextview样子的EditText [英] make autocompletetextview look like edittext

查看:142
本文介绍了让autocompletetextview样子的EditText的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是AutoCompleteTextView(<一个href=\"https://github.com/johnkil/Android-RobotoTextView/blob/master/robototextview/src/main/java/com/devspark/robototextview/widget/RobotoAutoCompleteTextView.java\"相对=nofollow> RobotoAutoCompleteTextView ),而不是一个EditText。但我想一个EditText的外观和感觉:即下划线,在一个EditText的底部出现。所以,我怎么可能做到呢?

I am using an AutoCompleteTextView (RobotoAutoCompleteTextView) instead of an EditText. But I want the look and feel of an EditText: i.e. the underline that shows up at the bottom of an EditText. So how might I do that?

我的问题是一个有点不完整,所以让我澄清一下。在Eclipse图形布局AutoCompleteTextView长相酷似的下划线的EditText。但是,当我在三星Galaxy S5运行应用程序,下划线消失了。相反,我得到一个丑陋的盒子有些#2200的背景。 (当然我在后台的确切六角猜测)。因此,我需要的是下划线始终显示出来,不管我在用的设备:真正的手机,或者只是图形布局

My question is a bit incomplete so let me clarify. In the Eclipse Graphical Layout the AutoCompleteTextView looks exactly like the EditText with the underline. But when I run the app in my Samsung Galaxy S5, the underline is gone. Instead I get an ugly box with some "#22000000" background. (Of course I am guessing at the exact hex of the background). So what I need is for the underline to always shows up no matter what device I am using: real phone, or just the Graphical Layout.

推荐答案

试试这个:

<AutoCompleteTextView
 ...
 style="@style/Base.Widget.AppCompat.EditText" />

或本

<EditText
 ...
 style="@style/Base.Widget.AppCompat.AutoCompleteTextView"/>

这篇关于让autocompletetextview样子的EditText的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆