
我的颜色值是#0072BA.
下面是不同设备的图.
1.)Android Kitkat
2.)AndroID LolliPop
3.)AndroID Marshmallow
我使用的Xml代码如下
<TextVIEw androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:textcolor="@color/md_black_1000" androID:layout_margintop="5dp" androID:textSize="15sp" androID:text="Medical Store name" androID:textcolorHint="#999999" androID:layout_below="@+ID/search_drug_store" androID:ID="@+ID/autoCompleteTextVIEw_storename" androID:layout_marginleft="15dp" androID:layout_marginRight="10dp"/><autoCompleteTextVIEw androID:ID="@+ID/autoCompleteTextVIEw1" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:ems="10" androID:textSize="12sp" androID:textcolor="#999999" androID:layout_below="@+ID/autoCompleteTextVIEw_storename" androID:layout_marginleft="25dp" androID:inputType="textNoSuggestions" androID:layout_marginRight="10dp"/>
我没有给autoCompleteTextVIEw任何样式然后它为什么会发生?
我尝试了什么:
如果我给这个风格
参考材料设计链接:
http://www.materialdoc.com/autocomplete-view/
并给这种风格
<style name="autocomplete" parent="Widget.AppCompat.light.autoCompleteTextVIEw"> <item name="androID:background">@color/green500</item> <item name="colorControlnormal">@color/Amber500</item> <item name="colorControlActivated">@color/cyan500</item></style>
但在棒棒糖中没有任何变化.
这是棒棒糖版本中的错误还是我做错了什么?
解决方法 实际上这不是解决这个问题的方法,但你可以将它用于整个设备的独特设计.我在xml中实现了这样的edittext,为edittext设置了背景null,在edittext下面添加了水平线.
<EditText androID:ID="@+ID/newPasswordEditText" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:layout_marginRight="@dimen/activity_horizontal_margin" androID:layout_marginleft="@dimen/activity_horizontal_margin" androID:background="@null" androID:textcolor="@color/color_black" androID:inputType="textPassword" androID:layout_marginBottom="10dp" androID:hint="Enter New Password" androID:layout_margintop="10dp" androID:textSize="14sp" androID:layout_below="@+ID/TitleTextVIEw" /> <linearLayout androID:ID="@+ID/linearLayout2" androID:layout_wIDth="match_parent" androID:layout_height="2dp" androID:orIEntation="horizontal" androID:layout_marginBottom="7dp" androID:layout_marginleft="@dimen/activity_horizontal_margin" androID:layout_marginRight="@dimen/activity_horizontal_margin" androID:layout_below="@+ID/newPasswordEditText" androID:background="@color/color_standard_green" />总结
以上是内存溢出为你收集整理的android – AutoCompleteTextView在LolliPop设备中的奇怪行为全部内容,希望文章能够帮你解决android – AutoCompleteTextView在LolliPop设备中的奇怪行为所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)