On this issue, if just add small icon, has provided very good support, Drawableleft property can set the left side of the small icon, and so on, the right can also
But if you want to add the text, I looked for the next, there is no corresponding property, we can only through the transformation of ideas to achieve, my method is to use a layout to include a TextView and a editview on it.
1 <LinearLayout2 Android:layout_width= "Match_parent"3 Android:layout_height= "Wrap_content"4 Android:layout_marginbottom= "10DP"5 Android:layout_margintop= "10DP"6 Android:background= "@drawable/round_view_rim"//This is a fillet, you can refer to my previous article7 android:orientation= "Horizontal"8 android:padding= "10DP">9 Ten <TextView One Android:layout_width= "Wrap_content" A Android:layout_height= "Match_parent" - Android:layout_marginleft= "30DP" - Android:layout_marginright= "30DP" the android:gravity= "Left|center" - Android:text= "Name" /> - - <EditText + Android:layout_width= "Match_parent" - Android:layout_height= "Wrap_content" + android:layout_gravity= "Center|right" A Android:background= "@null" /> at </LinearLayout>
Android EditView with small icons or text implementations