Android:EditText,底部有箭头指向下方

时间:2015-08-06 13:28:35

标签: android android-layout xamarin xamarin.android

我需要为一个EditText控件实现自定义样式。它应包含底线的箭头。以下是它的外观:

Android: EditText with arrow

当我正在实施材料设计时,如果我伪造这个EditText,它也应该将颜色改为重音。我可以将箭头剪切为图像并将其放在线上,然后放在焦点变换图像上。还有更好的方法吗?感谢。

1 个答案:

答案 0 :(得分:0)

I think it's worth it to take a look at 9-patch images and how you can set them as drawbles for your EditText. It'd allow you to have the whole thing in one image and have it grow/scale nicely as you maybe use it in a variety of differently sized EditTexts. Once you learn how to create one such image, you can quickly take a look to see how the Android default controls are using them for a background.