【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

页面使用

相关推荐
晨晖218 小时前
项目上传到gitee的两种方式,ssh和https
https·gitee·ssh
chushiyunen3 天前
gitignore常用配置
gitee
效能革命笔记4 天前
Gitee DevSecOps 智能版本管理:军工软件工厂的依赖治理与供应链安全方案
网络·安全·gitee
加贝哥|usun4 天前
最佳实践分享:GitHub项目自动同步到Gitee(码云)
gitee·github
少司府4 天前
Tools相关:深入浅出学Git
大数据·c++·git·gitee·github·仓库·分支
效能革命笔记4 天前
国内首家|Gitee Repo 通过信通院「先进级」认证:企业级制品库核心能力与选型指南
gitee
我叫张小白。5 天前
PyCharm 集成 Git 与 Gitee
git·pycharm·gitee
z200509305 天前
【linux学习】在linux下使用git提交到gitee
git·学习·gitee
效能革命笔记5 天前
企业软件供应链安全优选:Gitee CodePecker SCA核心能力与选型参考
安全·gitee
效能革命笔记7 天前
2026年开源组件治理选型:Gitee SCA如何成为一体化解决方案的推荐之选
gitee·开源