




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
第Android小程序?qū)崿F(xiàn)個(gè)人信息管理系統(tǒng)Intentintent=newIntent(AddActivity.this,MainActivity.class);
startActivity(intent);
}
對(duì)應(yīng)布局文件如下:
LinearLayoutxmlns:android=/apk/res/android
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical
android:padding=10dp
TableLayout
android:id=@+id/TableLayout
android:layout_width=wrap_content
android:layout_height=wrap_content
android:stretchColumns=1
TableRow
android:id=@+id/TableRow01
android:layout_width=wrap_content
android:layout_height=wrap_content
TextView
android:id=@+id/textview1
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=姓名/
EditText
android:id=@+id/name
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=/
/TableRow
TableRow
android:id=@+id/TableRow02
android:layout_width=wrap_content
android:layout_height=wrap_content
TextView
android:id=@+id/textview2
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=年齡/
EditText
android:id=@+id/age
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=/
/TableRow
TableRow
android:id=@+id/TableRow03
android:layout_width=wrap_content
android:layout_height=wrap_content
TextView
android:id=@+id/textview3
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=性別/
EditText
android:id=@+id/sex
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=/
/TableRow
TableRow
android:id=@+id/TableRow04
android:layout_width=wrap_content
android:layout_height=wrap_content
TextView
android:id=@+id/textview4
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=學(xué)歷/
EditText
android:id=@+id/edu
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=/
/TableRow
Button
android:id=@+id/ButtonAdd
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=添加/
/TableLayout
/LinearLayout
(4)QueryActivity.java代碼如下:
packagecom.example.system;
importandroid.app.AlertDialog;
importandroid.app.ListActivity;
importandroid.content.DialogInterface;
importandroid.database.Cursor;
importandroid.os.Bundle;
importandroid.view.View;
importandroid.widget.AdapterView;
importandroid.widget.AdapterView.OnItemClickListener;
importandroid.widget.ListView;
importandroid.widget.SimpleCursorAdapter;
publicclassQueryActivityextendsListActivity{
privateListViewlistview=null;
@Override
publicvoidonCreate(BundlesavedInstanceState){
super.onCreate(savedInstanceState);
this.setTitle(瀏覽信息
listview=getListView();
finalDBHelperhelper=newDBHelper(this);
Cursorc=helper.query();
String[]from={_id,name,age,sex,edu
int[]to={R.id.text0,R.id.text1,R.id.text2,R.id.text3,R.id.text4};
SimpleCursorAdapteradapter=newSimpleCursorAdapter(this,R.layout.activity_query,c,from,to);
listview.setAdapter(adapter);
}
對(duì)應(yīng)布局文件如下:
LinearLayoutxmlns:android=/apk/res/android
android:layout_width=match_parent
android:layout_height=match_parent
TextView
android:id=@+id/text0
android:layout_width=wrap_content
android:layout_height=wrap_content
TextView
android:id=@+id/text1
android:layout_width=wrap_content
android:layout_height=wrap_content
TextView
android:id=@+id/text2
android:layout_width=wrap_content
android:layout_height=wrap_content
TextView
android:id=@+id/text3
android:layout_width=wrap_conte
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024-2025學(xué)年六年級(jí)語(yǔ)文課題研究計(jì)劃
- 2024-2025學(xué)年人教版一年級(jí)數(shù)學(xué)課堂管理計(jì)劃
- 海外代購(gòu)產(chǎn)品供貨合同
- 2025-2030非小細(xì)胞肺癌的靶向藥物BRAF抑制劑行業(yè)市場(chǎng)現(xiàn)狀供需分析及投資評(píng)估規(guī)劃分析研究報(bào)告
- 分銷商協(xié)議范本
- 河南水利與環(huán)境職業(yè)學(xué)院《開(kāi)采損害與環(huán)境保護(hù)》2023-2024學(xué)年第二學(xué)期期末試卷
- 幼兒園疫情期間藝術(shù)活動(dòng)計(jì)劃
- 麗江職業(yè)技術(shù)學(xué)院《蘭州歷史與文化》2023-2024學(xué)年第二學(xué)期期末試卷
- 長(zhǎng)春師范大學(xué)《產(chǎn)品設(shè)計(jì)1》2023-2024學(xué)年第二學(xué)期期末試卷
- 2025-2030股票基金產(chǎn)業(yè)政府戰(zhàn)略管理與區(qū)域發(fā)展戰(zhàn)略研究咨詢報(bào)告
- 十年(2015-2024)高考真題數(shù)學(xué)分項(xiàng)匯編(全國(guó))專題03 平面向量(學(xué)生卷)
- 2023-2024學(xué)年天津市部分區(qū)八年級(jí)(下)期末數(shù)學(xué)試卷(含答案)
- 管線探挖方案
- 期末質(zhì)量測(cè)試卷(試題)-2023-2024學(xué)年牛津上海版(三起)英語(yǔ)五年級(jí)下冊(cè)
- 中藥連翹課件
- 心肺康復(fù)進(jìn)修個(gè)人總結(jié)
- DZ∕T 0219-2006 滑坡防治工程設(shè)計(jì)與施工技術(shù)規(guī)范(正式版)
- 2020年《科學(xué)通史》期末復(fù)習(xí)完整考試題庫(kù)208題(含答案)
- 2023-2024學(xué)年貴州省遵義市仁懷市年小升初總復(fù)習(xí)語(yǔ)文測(cè)試卷含答案
- 大學(xué)生職業(yè)生涯規(guī)劃與就業(yè)指導(dǎo)智慧樹(shù)知到期末考試答案2024年
- (完整版)保證藥品信息來(lái)源合法、真實(shí)、安全的管理措施、情況說(shuō)明及相關(guān)證明
評(píng)論
0/150
提交評(píng)論