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

正文內(nèi)容

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

2024-10-28 18:41本頁面
  

【正文】 16 參考文獻(xiàn) [1]靳巖,姚尚朗 .Google Android 開發(fā)入門與實(shí)踐 [M].北京: 人民郵電出版社, 2020, 37~59. [2]楊豐盛 .Android 應(yīng)用開發(fā)揭秘 [M].北京:機(jī)械工業(yè)出版社, 2020, 44~109, 15~17. [3 ]E2EColud 工作室 .深入淺出 Google Android[M].北京:人民郵電出版社, 2020, 178~194. [4]余志龍,陳昱勛,鄭明杰,陳小鳳,郭秩均 .Google Android SDK 開發(fā)范例大全 [M].北京:人民郵電出版社, 2020, 42~53. [5] 印旻,王行言 . Java 語言與面向?qū)ο蟪绦蛟O(shè)計(jì) [M](第 2 版) .北京:清華大 學(xué)出版社, 2020, 44~57. [6]張仕成 . 基于 Google Android 平臺的應(yīng)用程序開發(fā)與研究 [J].電腦知識與技術(shù) .2020, 28: 54~66. 。 七、 體會 在 沒有接觸 android 開發(fā)環(huán)境的時候,覺得它很深奧,要入門應(yīng)該會很困難,畢竟它為我們帶來了如此豐富多彩的安卓世界,便利我們的生活。 通過 這次 對一款基于 Android 平臺的 簡易日記本 程序的實(shí)例開發(fā) , 較為詳細(xì)的 學(xué)習(xí) 了 Android 系統(tǒng)的數(shù)據(jù)存儲方式以及用戶界面的設(shè)計(jì) ,了解了 android 虛擬機(jī)和 XML 布局文件,學(xué)習(xí)到 了數(shù)據(jù)庫的設(shè)計(jì)與創(chuàng)建 ,和 用戶界面的創(chuàng)建??梢钥吹? Android 的整體數(shù)據(jù)顯示框架有點(diǎn)像 MVC 的方式。 關(guān)于 數(shù)據(jù)模型 , 在與界面打交道的 Cursor、 ContentResolver 等數(shù)據(jù)操作層中,大量采用觀察者模式建立數(shù)據(jù)層與顯 示層的聯(lián)系?;旧?, ContentProviderDatabaseHelper 類扮演了一個 singleton 的角色,提供單一的實(shí)例 化 入 口 點(diǎn) , 并 屏 蔽 了 數(shù) 據(jù) 庫 創(chuàng) 建 、 打 開 升 級 等 細(xì) 節(jié) 。實(shí)例化一個 SQLiteDatabase 類對象,通過它的 APIs 可以搞定大部分的操作。然后,在代碼中分別處理一下在不同 界面時,從資源里加載組件并為組件綁定一個事件處理器 , 最后在 onCreate 的時候,也就是啟動后的 main 界面上設(shè)置一下按鈕事件處理器 即可。 界面過程如下: 15 六、 總結(jié) 關(guān)于 Activity, 在一個 Activity 中 可 使用多個 View 如果把 Activity 看作 MVC 中的 Control, 它負(fù)責(zé)管理 UI 和接受事件(包括用戶的輸入),雖然說一個 Activity 通常對應(yīng)一個屏幕,但事實(shí)上,是可以只用一個Activity 管理多個不同的 View 來實(shí)現(xiàn)簡單的邏輯。 updateListView()。(刪除 , new () {public void onClick(DialogInterface dialog, int which) {()。 (確定刪除? )。 }(l, v, position, id)。 14 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)。 11 (, (()))。 Intent i = new Intent(this, )。 Cursor c = mDiaryCursor。 } // 需要對 position 和 id 進(jìn)行一個很好的區(qū)分 // position 指的是點(diǎn)擊的這個 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 類實(shí)現(xiàn)日記的創(chuàng)建和刪除。 return (DATABASE_TABLE_DIARY, args, KEY_ROWID + = + rowId, nul
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1