如何在android中使用按钮创建自定义edittext?

时间:2015-03-17 02:24:18

标签: android xml button android-edittext

如何使用android上的按钮创建这种edittext。 enter image description here

我已经完成了相对布局,但它看起来很不合适。

非常感谢。

1 个答案:

答案 0 :(得分:1)

使用EditText.Code的android:drawableRight属性作为

<EditText
        android:id="@+id/edit_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:hint="@string/enter_the_value"
        android:drawableRight="@drawable/ic_launcher" />