失效链接处理 |
Android数据存储SQLite PDF 下蝲
本站整理下蝲Q?/strong>
链接Q?a target="_blank">https://pan.baidu.com/s/1QlUa6NBZdusPuEW8PzRG4g
提取码:(x)e9h4
相关截图Q?/strong>
![]()
主要内容Q?/strong>
一、实验目?/div>
1. 掌握SharePreferences的用方法;
2. 掌握Android内部文g?qing)SD卡存储文件的Ҏ(gu)?/div>
3Q掌握SQLite数据库的使用?/div>
二、实验学?/div>
2学时/ơ,?学时
三、实验环?/div>
Android StudioQJDK1.7QPC?/div>
四、实验内容和要求
1. .使用SQLite数据存储实现如下功能
d联系Z息、ƈ查询信息
对Tom手机号信息修改,后两位11Ҏ(gu)00Qƈ查询l果
SQLite数据库信息:(x)
SQLite数据库存放位|:(x)
点击删除Q将联系Z息全部清除:(x)
用户交互界面设计代码Q?/div>
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="MissingConstraints"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="25sp"
android:gravity="center"
android:text="通讯?quot;/>
<LinearLayout
android:id="@+id/ll_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/ll_phone"
android:layout_alignLeft="@+id/ll_btn"
android:layout_alignStart="@+id/ll_btn"
tools:ignore="MissingConstraints">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="?名:(x)" />
<EditText
android:id="@+id/et_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:hint="误入姓?quot; />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ll_phone"
android:layout_marginBottom="10dp"
android:layout_above="@+id/ll_btn"
android:layout_alignLeft="@+id/ll_name"
android:layout_alignStart="@+id/ll_name"
tools:ignore="MissingConstraints">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
|