【Android】联系人列表补充

真布局--叠起来垂直管

效果展示

部分代码(在activity_main)里面

复制代码
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="match_parent"
    android:layout_height="match_parent">

  <ImageView
        android:id="@+id/imgAdd"
        android:layout_gravity="bottom|end"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:layout_marginEnd="28dp"
        android:layout_marginBottom="20dp"
        android:src="@drawable/add"

       />

增加联系人

布局显示

部分代码(add_contact.xml)

复制代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="150dp"
    android:layout_height="wrap_content"
    android:padding="20dp"
    android:gravity="center"
    android:orientation="vertical">

    <EditText
        android:id="@+id/dtAddName"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_marginTop="10dp"
        android:hint="请输入姓名"/>
    <RadioGroup
        android:id="@+id/rgAddGender"
        android:layout_width="match_parent"
        android:orientation="horizontal"
        android:layout_marginTop="10dp"
        android:layout_height="45dp">
        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="男"/>
        <RadioButton
            android:layout_marginStart="50dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="女"/>
    </RadioGroup>
    <EditText
        android:id="@+id/dtAddTel"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_marginTop="10dp"
        android:hint="请输入姓名"/>
    <EditText
        android:id="@+id/dtAddAddress"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_marginTop="10dp"
        android:hint="请输入地址"/>
    <EditText
        android:id="@+id/dtAddEmail"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_marginTop="10dp"
        android:hint="请输入邮箱"/>

    <Button
        android:id="@+id/btnAdd"
        android:layout_marginTop="20dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="确定"/>

</LinearLayout>
  1. sql

页面使用

相关推荐
HZ·湘怡15 分钟前
Gitee 手把手
git·gitee
@_@ prince @_@19 分钟前
Git 命令大全(带详细说明)
git·gitee·github·visual studio
WaiSaa3 天前
Ubuntu配置Git免密操作
git·ubuntu·gitee
砍材农夫3 天前
借助gitee仓库构建私有图床
gitee
tsyjjOvO5 天前
【Git 从入门到实战】(IDEA+Gitee 版)
git·gitee·idea
你知道“铁甲小宝”吗丶5 天前
git推送到多平台(gitee/github)
git·gitee·github
StackNoOverflow5 天前
IDEA + Git + Gitee 全流程实战:从安装、提交到解决冲突
git·gitee·intellij-idea
lpfasd1236 天前
Git/Gitee/GitHub 3 个安全凭证详解
git·gitee·github
搞程序的心海6 天前
使用 VS Code 将项目代码上传到 Gitee 的完整指南
gitee
Gust of wind6 天前
idea结合git和Gitee的初步使用
git·gitee·intellij-idea