Android 中EditText中加入固定的图片或许文字布局

Android 中EditText中加入固定的图片或者文字布局
<RelativeLayout android:id="@+id/RelativeLayout02"
			android:background="@drawable/login_back" android:paddingTop="21.0px"
			android:paddingBottom="10.0px" android:layout_width="fill_parent"
			android:layout_height="wrap_content" android:layout_marginLeft="15.0px"
			android:layout_marginTop="62.0px" android:layout_marginRight="15.0px">
			<ImageView android:id="@+id/faceImg" android:background="@drawable/login_head"
				android:layout_width="wrap_content" android:layout_height="wrap_content" />
			<EditText android:id="@+id/login_edit_account"
				android:background="@drawable/qq_edit_login" android:paddingLeft="45.0sp"
				android:saveEnabled="true" android:layout_width="fill_parent"
				android:layout_height="wrap_content" android:layout_marginLeft="5.0dip"
				android:layout_marginTop="5.0dip" android:layout_marginRight="5.0dip"
				android:layout_marginBottom="5.0px" android:hint="@string/strInputAccHint"
				android:maxLength="10" android:layout_toRightOf="@+id/faceImg"
				android:layout_alignParentTop="true" android:inputType="number" />
            <TextView android:textSize="16.0dip" android:textColor="#ff3f3f3f"
				android:gravity="center_vertical" android:id="@+id/TextView01"
				android:paddingLeft="7.0sp" android:layout_width="wrap_content"
				android:layout_height="wrap_content" android:layout_marginRight="15.0sp"
				android:text="@string/strAccInputLabel" android:layout_alignLeft="@+id/login_edit_account"
				android:layout_alignTop="@+id/login_edit_account"
				android:layout_alignBottom="@+id/login_edit_account" />        
           </RelativeLayout>
关键代码如下:
android:layout_alignLeft="@+id/login_edit_account"
				android:layout_alignTop="@+id/login_edit_account"
				android:layout_alignBottom="@+id/login_edit_account"
分别表示与id 为login_edit_account的EditText控件的上端,左边,底端对齐。
 

  

1 楼 samyou 2012-01-08  
楼主能将代码发给我学一下吗?sam090@qq.com
谢谢