【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

页面使用

相关推荐
有同事要进步1 小时前
gitee上面克隆项目出现错误
gitee
潘正翔7 小时前
k8s进阶_Harbor镜像仓库
git·云原生·容器·kubernetes·gitee·github
Pniubi8 小时前
Gitee&GitHub同步仓库教程
gitee·github
7177771 天前
五大维度根治测试碎片化:基于 Gitee Test 的国产化全链路测试实践
gitee
tju23331 天前
Gitee 协作能力更新解析:从 Web 端提交到工作流与知识库追溯
gitee
tju23331 天前
从组件仓库到依赖防火墙:Gitee 源盾可信中心仓如何改变开源组件引入方式
gitee·开源
7177772 天前
研发效能治理标准化路径:基于信通院认证平台的全链路度量实践
安全·gitee·issue
tju23332 天前
Gitee Test是什么:从测试资产管理到自动化执行的工程化实践
运维·gitee·自动化
7177774 天前
Coze 工作流 + Gitee API 落地指南:研发 Issue 智能化自动管理实践
gitee·jquery·issue
7177774 天前
自研 BCA 引擎驱动:Gitee Scan 构建软件工厂全生命周期安全检测体系
安全·gitee