安卓通讯录开发实验报告

要求:

1.实验报告要完整,即要有实验要求与目的、实验内容与步骤(必要流程图或活动图、代码)、运行结果与分析、实验体会与收获;

2.代码要有必要的注释;

3.标题为四号黑体,其他为宋体小四号,行间距为单倍行间距,纸张大小为A4;

4.考核项目

考核项目

格式与完成性

实验内容

实验结果与分析

实验体会与收获

总成绩

权重

20%

60%

10%

10%

100%

得分

  • 实验目的

1.熟悉数据存储方式,能够归纳五种数据存储方式的特点;

2.掌握文件存储方式的使用,能够实现使用文件存储数据的功能;

3.掌握SharedPreferences的使用,能够实现数据存储的功能;

4.掌握SQLite数据库的使用,能够实现数据的增删改查功能。

  • 实验工具

Android studio。

  • 实验内容

运行效果图如下:

  1. 完成上图的布局;
  2. 利用SQLite数据库的创建与增删改查操作,完成上图添加、删除、修改、查询通讯录内容:姓名、电话。

  • 实验过程(代码)

activity_main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   
android:layout_width="match_parent"
   
android:layout_height="match_parent"
   
android:background="@drawable/bg"
   
android:orientation="vertical"
   
android:padding="16dp" >
    <
LinearLayout
       
android:layout_width="match_parent"
       
android:layout_height="wrap_content"
       
android:layout_marginTop="130dp">
        <
TextView
           
android:layout_width="wrap_content"
           
android:layout_height="wrap_content"
           
android:text="姓名:"
           
android:textSize="18sp"/>
        <
EditText
           
android:id="@+id/et_name"
           
android:layout_width="match_parent"
           
android:layout_height="wrap_content"
           
android:hint="请输入姓名"
           
android:textSize="16sp"/>
    </
LinearLayout>
    <
LinearLayout
       
android:layout_width="match_parent"
       
android:layout_height="wrap_content"
       
android:layout_marginBottom="10dp">
        <
TextView
           
android:layout_width="wrap_content"
           
android:layout_height="wrap_content"
           
android:text

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值