Android文本框布局实例
16lz
2021-01-24
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#3726ac" android:gravity="center_vertical" android:paddingBottom="5dp" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="5dp" ><FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" > <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#D3D3D3" android:paddingTop="10dip" android:paddingBottom="10dip" android:paddingLeft="50dip" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical" android:layout_gravity="center_vertical" android:layout_marginLeft="5dip" > <ImageView android:background="@drawable/user" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <View android:layout_width="1dip" android:layout_height="20dip" android:layout_marginLeft="5dip" android:background="#ffffff" android:layout_gravity="center_vertical" /> </LinearLayout> <ImageView android:background="@drawable/password" android:layout_gravity="center_vertical|right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dip" /> </FrameLayout></RelativeLayout>
效果图:
更多相关文章
- Android中的流式布局
- Android(安卓)CheckBox设置背景selector和文本text 设置selectCo
- Android中使用TagFlowLayout制作动态添加删除标签
- popup menu案例,无说明只代码
- android studio 开发 cordova plugin(组件)的 helloWorld
- Android中自定义滑动条风格
- Android(安卓)开源项目分类汇总
- 显示倒计时的Dialog
- Android之---RecycleView实现简单的图片查看功能(类似相册查看器)