android:theme="@android:style/theme.notitlebar"
2. openorcreatedatabase
context.openorcreatedatabase 與 sqlitedatabase.openorcreatedatabase本質上完成的功能都一樣,context.openorcreatedatabase最終是需要呼叫 sqlitedatabase.openorcreatedatabase來完成資料庫的建立的。
也就是說, sqlitedatabase類是android上對sqlite的最底層的封裝,幾乎所有的對資料庫的操作最終都通過這個類來實現。
而context裡面提供的方法,是用於上下文的時候建立資料庫,例如你在某個邏輯裡面建立的資料庫只是在特定的context裡面,對於資料庫的許可權,交由context來管理,而這個邏輯可能是會提供給不止乙個context
至於sqlitedatabase和sqliteopenhelper就更好理解了,後者只是乙個抽象類,用來告訴你怎樣使用sqlitedatabase類而已,你完全可以自己基於sqlitedatabase寫乙個自己的helper.
3. 介面返回按鈕的事件
goback = (imageview)findviewbyid(r.id.mysc_goback);
//返回按鈕的函式
goback.setonclicklistener(new onclicklistener()
4. 得到網路檔案大小的方法
long newsize = hm.getcontentlength();//獲取新檔案大小
/**
* 獲取返回內容長度
* @return
*/public long getcontentlength() catch (unsupportedencodingexception e1)
//第二步,使用execute方法傳送http post請求,並返回httpresponse物件
android 開發 瑣碎積累
1 layout weight 值越大比例越大 2 fildder抓包工具,tool option connections allow 3 2.3.3之前ui執行緒開子執行緒不報錯。4 android dalvik虛擬機器 androidl以後 art虛擬機器 5 jpush訊息推送 6 編譯器無法...
android開發積累1
requestwindowfeature window.feature no title 2 獲取window高度和寬度 設定為全屏模式 getwindow setflags windowmanager.layoutparams.flag fullscreen,windowmanager.layou...
Android 開發日常積累
胡凱 效能優化 android最佳效能實踐 1 合理管理記憶體 android最佳效能實踐 2 分析記憶體的使用情況 android最佳效能實踐 3 高效能編碼優化 android最佳效能實踐 4 布局優化技巧 android splash頁秒開 activity白屏 activity黑屏 極光推送...