【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

页面使用

相关推荐
SnXJi_5 小时前
纷析云开源财务软件:助力企业财务管理数字化转型
java·gitee·开源·开源软件·gitcode
尽兴-5 小时前
常用 Git 命令详解
java·git·vscode·gitee
邹老师的小课堂8 小时前
Windows环境下,Jenkins+Gitee的CICD
windows·gitee·jenkins·测试·cicd
FOREVER-Q9 小时前
WebStorm中Gitee账号的密码登录与令牌登录设置
ide·gitee·webstorm
SnXJi_10 小时前
纷析云开源财务软件:企业财务数字化转型的灵活解决方案
java·gitee·开源·开源软件
SnXJi_2 天前
开源技术如何助力中小企业实现财务管理自主化?
java·gitee·开源·开源软件
kuaile09062 天前
DeepSeek 与开源:肥沃土壤孕育 AI 硕果
人工智能·ai·gitee·开源·deepseek
尸僵打怪兽3 天前
gitee基本使用
git·gitee·git使用
周伯通*3 天前
将项目发布到Git中(25年最新)
gitee
努力向上的年轻人3 天前
DeepSeek 与开源:肥沃土壤孕育 AI 硕果
人工智能·gitee·开源·deepseek·飞桨paddlepaddle·昇思mindspore