【问题标题】:How to create custom edittext with button in android?如何在android中使用按钮创建自定义edittext?
【发布时间】:2015-03-17 02:24:18
【问题描述】:

如何在 android 上创建这种带有按钮的编辑文本。

我已经做了相对布局,但它看起来不太像样。

先谢谢了。

【问题讨论】:

    标签: android xml button android-edittext


    【解决方案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" />
    

    【讨论】:

      猜你喜欢
      • 2013-09-01
      • 1970-01-01
      • 2013-10-07
      • 2017-05-20
      • 2013-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多