android编辑框知识点练习 QQ说说发表页面的编写

android编辑框知识点练习 QQ说说发表页面的编写

- 实现效果

  1. 在这里插入图片描述
    xml文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    android:paddingTop="16dp"
    android:paddingBottom="16dp"
    android:background="#ffbed8db">
<EditText
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:hint="说点什么吧..."
    android:gravity="top"
    android:padding="5dp"
    android:lines="6"
    android:background="#fff"
    android:layout_marginBottom="10dp"
    android:inputType="textMultiLine"/>
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:drawableLeft="@drawable/shi"
        android:text="添加图片"
        android:padding="8dp"
        android:gravity="center_horizontal"
        android:background="@drawable/didian"
        android:textSize="20dp"/>
    <ImageView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:src="@drawable/quan"
        android:padding="8dp"
        android:scaleType="fitXY"/>
</LinearLayout>

附:编辑框其他知识点
2. 在编辑框内绘制图像属性在这里插入图片描述
3. 编辑框getText方法
在这里插入图片描述
4. 单行文本框在这里插入图片描述
5. 设置字体背景的颜色,点击旁边的小正方形
在这里插入图片描述

发布了55 篇原创文章 · 获赞 5 · 访问量 4156

猜你喜欢

转载自blog.csdn.net/qq_43654669/article/details/103280041