设置EditText背景图片

代码:

android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_margin="5dp"
android:background="@drawable/edittext"
      android:orientation="vertical" >

     
      android:id="@+id/et_start"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp" 
            android:background="@drawable/input_bg"
            android:hint="起点" />

如果仅仅将EditText设置background属性,光标会紧挨着边框,LinearLayout和EditText都设置background后,EditText再设置layout_marginLeft="光标与边框的距离"

你可能感兴趣的:(Android基础学习)