【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

页面使用

相关推荐
Stack_guigui4 天前
git连接本地仓库以及gitee
git·gitee
Cynthia-石头4 天前
Git Github Gitee GitLab
git·gitee·github
shut up4 天前
Git的使用技巧
gitee·github·shell
不念霉运5 天前
Gitee Wiki:重塑关键领域软件研发的知识管理范式
gitee
格格巫ZYX6 天前
Git GitHub Gitee
git·gitee·github
黎相思7 天前
Git企业级项目管理实战
git·gitee
xbd_zc9 天前
【Github/Gitee Webhook触发自动部署-Jenkins】
运维·gitee·自动化·github·jenkins
会笑的小熊9 天前
从gitee仓库中恢复IDEA项目某一版本
gitee·intellij-idea
山海上的风10 天前
idea本地git上传gitee码云失败分析,push rejected+git手动融合
git·gitee·intellij-idea
Bl_a_ck13 天前
git基础语法回顾
git·gitee·github·gitcode