Time of Update: 2015-04-22
標籤:android callback 一.簡介,例子 CallBack是回調的意思,"回呼函數"或者"回調方法"是軟體設計與開發中一個非常重要的概念,掌握"回呼函數"的思想對程式員來說(不管用哪種語言)是非常必要的。
Time of Update: 2015-04-21
標籤:因為要使用開源 androidannotations 註解,發現eclipse沒有Annotation Processin 解決辦法: 需要配置外掛程式:http://download.eclipse.org/releases/juno Annotation
Time of Update: 2015-04-22
標籤:android 圖片 colormatrix 圖片特效 原圖:效果1:效果2:效果3:效果4:查看官方的API,其中ColorMatrix的說明如下:5x4 matrix for transforming the color+alpha components of a Bitmap. The matrix is stored in a
Time of Update: 2015-04-21
標籤:webview 視頻支援橫屏 裝置豎屏 介面豎屏 裝置旋轉 ios裝置支援旋轉的方法: 1、修改工程的info.plist中"Supported interface orientations"的值(一般在工程的Taget-> General ->
Time of Update: 2015-04-22
標籤:Happy Number2015.4.22 12:39Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and
Time of Update: 2015-04-21
標籤:from http://blog.csdn.net/jake9602/article/details/18414841在android 中儲存資料時經常用SharedPreference, 並且在提交資料時一直用的是Editor的commit方法, 今天無意了看到了系統用了apply,看了方法的介紹, 原來這個方法也是可以提交資料的.apply方法在官方SDK說明如下:Commit your preferences changes back from this Editor
Time of Update: 2015-04-22
標籤:全屏在Activity的onCreate方法中的setContentView(myview)調用之前添加下面代碼requestWindowFeature(Window.FEATURE_NO_TITLE);//隱藏標題getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//設定全屏 橫屏(兩種)1、修改Activity的onRe
Time of Update: 2015-04-22
標籤:Creating automatic test suites for your application is a good way to make it robust. It allows you to work in a very agile way.Play tests are built using JUnit 4 or Selenium depending what you want to test.Writing testsThe
Time of Update: 2015-04-22
標籤:一、掛起當有電話進來或者鎖屏,這時你的應用程會掛起,在這時,UIApplicationDelegate委託會收到通知,調用 applicationWillResignActive 方法,你可以重寫這個方法,做掛起前的工作,比如關閉網路,儲存資料。C代碼 - (void)applicationWillResignActive:(UIApplication*)application{
Time of Update: 2015-04-22
標籤:android broadcastreceiver Android中的廣播大致有兩種:有序廣播和標準廣播。標準廣播是一種完全非同步執行的廣播,廣播發出後,廣播接收器幾乎都會在同一時刻接收到這條廣播訊息,因此它們之間沒有任何先後順序而言,這種廣播的執行效率較高,但是也以為這它是無法被截斷的。有序廣播是一種同步執行的廣播,廣播發出後,同一時刻只會有一個廣播接收器接收到廣播,當這個廣播接收器中的邏輯執行完畢後才會繼續傳播訊息。並
Time of Update: 2015-04-22
標籤:paint colorfilter colormatrixcolorfilt lightingcolorfilter porterduffcolorfilte 轉載請註明出處:http://blog.csdn.net/allen315410/article/details/45059989平時在Android開發中,一般不
Time of Update: 2015-04-21
標籤: 前言:”安得廣廈千萬間,大庇天下寒士俱歡顏“——杜甫。在帝都住的朋友們都可能會遇到租房子困難的問題(土豪請無視),找房子真是力氣活,還耗費時間,佔用我寶貴的寫部落格時間,沒辦法,誰讓咱沒錢還想住的好點,努力努力掙錢!!!以上發點牢騷,現在進入正題。上一篇部落格《 Bitmap那些事之記憶體佔用計算和載入注意事項》,寫了Bitmap基礎知識和使用Bitmap需要知道的注意事項,這一片部落格我會寫在Android應用中Bitmap的建立和載入。
Time of Update: 2015-04-21
標籤:擷取控制項的寬度和高度在Android中,有時需要對控制項進行測量,得到的控制項寬度和高度可以用來做一些計算。在需要自適應螢幕的情況下,這種計算就顯得特別重要。另一方便,由於需求的原因,希望一進入介面後,就能得到控制項的寬度和高度。 可惜的是,根據驗證,利用網上轉載的那些方法在OnCreate函數中擷取到的仍然是0(希望搞技術的能自己驗證過再轉載),例如Measure方法之後調用getMeasuredWidth的值還是0。  
Time of Update: 2015-04-22
標籤:ios nstimer 倒計時 #import "ViewController.h"#import "QSSDateHelper.h"@interface ViewController ()@property (nonatomic,strong) UIButton *btn;@property (nonatomic,assign) BOOL
Time of Update: 2015-04-22
標籤: 在Archive項目時,出現了“Your build settings specify a provisioning profile with the UUID “”, however, no such provisioning profile was found”的出錯。一直提示指定UUID的provisioning profile找不到,感覺很奇怪。明明自己的provisioning
Time of Update: 2015-04-22
標籤:需要配置許可權 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 判斷Android的WIFI與GPS狀態 private void checkWifiAndGpsStatus() {
Time of Update: 2015-04-22
標籤:1.反編譯APK檔案反編譯APK需要利用ApkTool工具,https://bitbucket.org/iBotPeaches/apktool/downloads http://ibotpeaches.github.io/Apktool/install/
Time of Update: 2015-04-22
標籤:android如果一個activity在橫屏狀態下切換到豎屏狀態,是不是會把整個activity重新載入一遍呢?這樣的話,所有變數和方法都被初始化了,顯然,一般我們不想這樣。AndroidManifest.xmlandroid:configChanges="keyboardHidden|orientation"就是如果配置了這個屬性,當我們橫豎屏切換的時候會直接調用onCreate方法中的onConfigurationChanged方法,而不會重新執行onCreate方
Time of Update: 2015-04-22
標籤: 來源:HTTP://WWW.CNBLOGS.COM/GOODHACKER/P/3864680.HTMLANDROID應用安全防禦Android應用的安全隱患包括三個方面:代碼安全、資料安全和組件安全。1. 代碼安全 代碼安全主要是指Android apk有被篡改、盜版等風險,產生代碼安全的主要原因是apk很容易被反編譯、重打包。我們可以採用以下方法對apk進行保護:1.1 代碼混淆 代碼混淆可以在一定程度上增加apk逆向分析的難度。Androi
Time of Update: 2015-04-22
標籤: 最近用ThinkPHP開發一個項目,本地開發測試完成上傳到伺服器後,第一次開啟正常,再重新整理頁面時就出現 “頁面調試錯誤,無法找開頁面,請重試”的錯誤,我就鬱悶啦,明明本地設定define(‘APP_DEBUG‘, false)