【发布时间】:2016-01-21 09:54:51
【问题描述】:
【问题讨论】:
标签: android android-edittext android-shape
【问题讨论】:
标签: android android-edittext android-shape
您必须为您的EditText 创建背景图像。对于其他布局,您必须创建如下所示的布局。它不是确切的 xml,而是向您展示了这个想法。
<RelativeLayout layout_width="match_parent" layout_height="50dp">
<EditText layout_width="wrap_content" layout_height="wrap_content"
android:background="@drawable/editTextBackground" layout_alignParentLeft="true" layout_marginLeft="10dp">
<ImageView layout_width="wrap_content" layout_height="wrap_content"
centerVertical="true" marginLeft="15dp"
android:background="@drawable/smily" />
<ImageView layout_width="wrap_content" layout_height="wrap_content"
centerVertical="true"
alignRight="@id/editTExt"
android:background="@drawable/camera" />
<ImageView layout_width="wrap_content" layout_height="wrap_content"
centerVertical="true" marginLeft="15dp"
alignParentRight="true"
android:background="@drawable/mic" />
</RelativeLayout>
希望这能给你一些想法。
【讨论】: