当前位置: 移动技术网 > 移动技术>移动开发>Android > android的编辑框(EditText)的实际案例代码分享

android的编辑框(EditText)的实际案例代码分享

2020年08月11日  | 移动技术网移动技术  | 我要评论

运行效果图

在xml下添加代码

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#EAEAEA"
    android:paddingBottom="16dp"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    android:paddingTop="16dp"
    tools:context=".MainActivity">
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:lines="6"
        android:hint="说点什么吧..."
        android:background="#FFFFFF"
        android:padding="5dp"
        android:gravity="top"
        android:layout_marginBottom="10dp"
        android:inputType="textMultiLine"
        />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="添加照片"
        android:gravity="center_vertical"
        android:background="#FFFFFF"
        android:padding="8dp"
        android:drawablePadding="8dp"
         />

</LinearLayout>

本文地址:https://blog.csdn.net/qq_44716544/article/details/107895385

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网