3.31
今天学习了安卓开发
sqlite增删改查
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="姓 名:"
android:textSize="17sp"
/>
<EditText
android:id="@+id/et_name"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="wrap_content"
android:hint="请输入姓名"
android:inputType="text"
android:background="@drawable/focusedit"
android:maxLength="10"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="年 龄:"
android:textSize="17sp"
/>
<EditText
android:id="@+id/et_age"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="wrap_content"
android:hint="请输入年龄:"
android:inputType="number"
android:background="@drawable/focusedit"
android:maxLength="5"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="专 业:"
android:textSize="17sp"
android:maxLength="15"
/>
<EditText
android:id="@+id/et_class"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="wrap_content"
android:hint="请输入专业"
android:inputType="text"
android:background="@drawable/focusedit"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:text="性 别:"
android:textSize="17sp"
/>
<RadioGroup
android:id="@+id/rg_sex"
android:layout_weight="1.3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<RadioButton
android:id="@+id/rb_male"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="男"
/>
<RadioButton
android:id="@+id/rb_female"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="女"
/>
</RadioGroup>
</LinearLayout>
<Button
android:id="@+id/bt_add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="增加"
android:textSize="17sp"
/>
<Button
android:id="@+id/bt_delete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="删除"
android:textSize="17sp"
/>
<Button
android:id="@+id/bt_update"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="修改"
android:textSize="17sp"
/>
<Button
android:id="@+id/bt_select"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="查询"
android:textSize="17sp"
/>
</LinearLayout>
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步