freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于android的日記本開發(fā)(參考版)

2025-06-29 13:13本頁面
  

【正文】 參考文獻[1]靳巖, Android開發(fā)入門與實踐[M].北京:人民郵電出版社,2009,37~59.[2][M].北京:機械工業(yè)出版社,2010,44~109,15~17. [3 ] Android[M].北京:人民郵電出版社,2009,178~194.[4]余志龍,陳昱勛,鄭明杰,陳小鳳, Android SDK開發(fā)范例大全[M].北京:人民郵電出版社,2009,42~53. [5] 印旻,王行言. Java 語言與面向?qū)ο蟪绦蛟O(shè)計[M](第2版).北京:清華大學(xué)出版社,2007,44~57. [6]張仕成. 基于Google Android平臺的應(yīng)用程序開發(fā)與研究[J].,28:54~66. 。七、 體會在沒有接觸android開發(fā)環(huán)境的時候,覺得它很深奧,要入門應(yīng)該會很困難,畢竟它為我們帶來了如此豐富多彩的安卓世界,便利我們的生活。通過這次對一款基于Android平臺的簡易日記本程序的實例開發(fā),較為詳細(xì)的學(xué)習(xí)了Android系統(tǒng)的數(shù)據(jù)存儲方式以及用戶界面的設(shè)計,了解了android虛擬機和XML布局文件,學(xué)習(xí)到了數(shù)據(jù)庫的設(shè)計與創(chuàng)建,和用戶界面的創(chuàng)建??梢钥吹?Android的整體數(shù)據(jù)顯示框架有點像MVC的方式。關(guān)于數(shù)據(jù)模型,在與界面打交道的Cursor、ContentResolver等數(shù)據(jù)操作層中,大量采用觀察者模式建立數(shù)據(jù)層與顯示層的聯(lián)系?;旧?, ContentProviderDatabaseHelper類扮演了一個singleton的角色,提供單一的實例化入口點,并屏蔽了數(shù)據(jù)庫創(chuàng)建、打開升級等細(xì)節(jié)。實例化一個SQLiteDatabase類對象,通過它的APIs可以搞定大部分的操作。然后,在代碼中分別處理一下在不同界面時,從資源里加載組件并為組件綁定一個事件處理器,最后在onCreate的時候,也就是啟動后的main界面上設(shè)置一下按鈕事件處理器即可。界面過程如下:六、 總結(jié)關(guān)于Activity,在一個Activity中可使用多個View 如果把Activity看作MVC中的Control,它負(fù)責(zé)管理UI和接受事件(包括用戶的輸入),雖然說一個Activity通常對應(yīng)一個屏幕,但事實上,是可以只用一個Activity管理多個不同的View來實現(xiàn)簡單的邏輯。 updateListView()。(刪除, new () {public void onClick(DialogInterface dialog, int which) {()。 (確定刪除?)。 }(l, v, position, id)。 Button confirmButton = (Button) findViewById()。 mTitleText = (EditText) findViewById()。 setContentView()。此過程執(zhí)行代碼:protected void onCreate(Bundle savedInstanceState) { (savedInstanceState)。}})。 ()。 Intent mIntent = new Intent()。 if (mRowId != null) { (mRowId, title, body)。 String title = ().toString()。 } if (body != null) { (body)。 mRowId = ()。 //判斷是否為編輯狀態(tài) if (extras != null) { String title = ()。 mRowId = null。 mBodyText = (EditText) findViewById()。 setTitle(小小日記本)。 mDbHelper = new DbAdapter(this)。 private DbAdapter mDbHelper。 private EditText mBodyText。 updateListView()。 startActivityForResult(i, ACTIVITY_EDIT)。 (, (()))。 Intent i = new Intent(this, )。 Cursor c = mDiaryCursor。 } // 需要對position和id進行一個很好的區(qū)分 // position指的是點擊的這個ViewItem在當(dāng)前ListView中的位置 // 每一個和ViewItem綁定的數(shù)據(jù),肯定都有一個id,通過這個id可以找到那條數(shù)據(jù)。 } private void createDiary() { Intent i = new Intent(this, )。 return true。 ()。 /*()。 startActivity(intent)。 return true。 } //菜單選擇 public boolean onMenuItemSelected(int featureId, MenuItem item) { Intent intent。 (0, DELETE_ID, 0, 刪除).setIcon()。 } //創(chuàng)建一個菜單 public boolean onCreateOptionsMenu(Menu menu) { (menu)。 setListAdapter(notes)。 int[] to = new int[] { , }。 startManagingCursor(mDiaryCursor)。 } //更新當(dāng)前的listacvitity private void updateListView() { ()。 mDbHelper = new DbAdapter(this)。 setContentView()。 private Cursor mDiaryCursor。 private static final int DELETE_ID = + 1。 private static final int ACTIVITY_EDIT = 1。4. Diary_activity類和DiaryEditActivity類實現(xiàn)日記的創(chuàng)建和刪除。 return (DATABASE_TABLE_DIARY, args, KEY_ROWID + = + rowId, null) 0。 String created = () + 年 + () + 月
點擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1