Time of Update: 2015-10-16
標籤: Android事件分發事件分發3個步驟dispatchTouchEvent(event)派發 onInterceptTouchEvent(event)攔截 onTouchEvent(event) 處理 requestDisallowInterceptTouchEvent()設定父控制項是否攔截事件MotionEvent由 Activity擷取到事件,傳遞到View,當前的View,派發-> 攔截 ->
Time of Update: 2015-10-13
標籤:package com.test.twiceexit;import java.util.Timer;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.view.KeyEvent;import android.view.Menu;import android.widget.Toast;public
Time of Update: 2015-10-13
標籤:Android的res檔案夾是用來儲存資源的,可以在res檔案夾下建立一個raw檔案夾,放置在raw檔案夾下的內容會被原樣打包,而不會被編譯成二進位檔案,並且可以通過R檔案進行很方便地訪問。比如我們可以將更新資訊、著作權資訊等放到txt檔案中,然後放到raw檔案中,然後很方便地進行訪問。 在raw中放入一個a.txt檔案,然後就可以在Activity中使用getResources().openRawResource(R.raw.a);方法擷取一個此檔案的InputStream類,
Time of Update: 2015-10-13
標籤:// Curl the image up or down CATransition *animation =
Time of Update: 2015-10-13
標籤:首先plist定義兩個string: NSLocationWhenInUseUsageDescriptionNSLocationAlwaysUsageDescription然後調用[self.locationManager requestWhenInUseAuthorization]或者[self.locationManager requestAlwaysAuthorization]例如#import "ViewController.h"@import CoreLocation;
Time of Update: 2015-10-12
標籤:一、二維碼的產生從iOS7開始整合了二維碼的產生和讀取功能此前被廣泛使用的zbarsdk目前不支援64位處理器產生二維碼的步驟:匯入CoreImage架構通過濾鏡CIFilter產生二維碼二維碼的內容(傳統的條碼只能放數字):純文字名片URL // 1. 執行個體化二維碼濾鏡CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];// 2. 恢複濾鏡的預設屬性[filter setDefaults];//
Time of Update: 2015-10-12
標籤:1 android通過架構流量統計TrafficStats類可以直接獲得 獲得總流量受理TrafficStats.getTotalRxBytes(),
Time of Update: 2015-10-12
標籤:for (int i = 0; i < 1; i++) { //< [arr count]; i++) { CIFaceFeature *feature =
Time of Update: 2015-10-11
標籤:Android開發的過程中,每次調用startService(Intent)的時候,都會調用該Service對象的onStartCommand(Intent,int,int)方法,然後在onStartCommand方法中做一些處理。從Android官方文檔中,我們知道onStartCommand有4種int傳回值,首先簡單地講講int傳回值的作用。一、onStartCommand有4種傳回值:START_STICKY:如果service進程被kill掉,保留service的狀態為開始狀態,
Time of Update: 2015-10-11
標籤:在他們的定義ContentProvider結合ContentObserver一起使用時,自己寫的ContentProvider,在運行完insert、delete和update後,要手動地調用getContentResolver().notifyChange()這種方法來通知修改的產生。直接上代碼:MainActivitypackage com.jackie.contentobserver;import java.util.ArrayList;import android.net.Uri;
Time of Update: 2015-10-11
標籤: 首先ActiveAndroid是依靠註解工作的。 @Table(name = "UserBean")public class UserBean extends Model { @Column(name = "uid") public String uid; @Column(name = "nick_name") public String nick_name; public String getUid() { return uid;
Time of Update: 2015-10-11
標籤:1.1.1. If a crash happens thisconfiguration does not guarantee that the relay log info will be consistent【環境的敘述性說明】msyql5.6.14【報錯資訊】mysql的slave啟動時,error.log中出現Warning警告:[Warning] Slave SQL: If a crash happensthis configuration does not
Time of Update: 2015-10-11
標籤:我們可以將視圖分為4個基本狀態:視圖建立、視圖可見、視圖不可見、系統低記憶體。1.其中當視圖正在建立時,會調用viewDidLoad方法,這個時候視圖並未出現,而是將視圖控制器初始化後剛載入到記憶體中,這個方法也常用來初始化視圖控制器所用,如初始化視圖中常用的控制項等。2.在視圖可見前和可見後分別會調用viewVillAppear和viewDidAppear方法。3.在視圖不可見前和不可見後分別會調用viewVillDisappear和viewDidAppear方法。4.在應用程式系統記憶
Time of Update: 2015-10-11
標籤:總結apktool 反編譯過後可以獲得資源資訊dex2jar 和 jd-gui一起使用可以獲得源碼資訊,主要是使用dex2jar獲得jar檔案。 然後通過jd-gui查看jar檔案獲得源碼dex2jar:http://pan.baidu.com/s/1o6KkmKU
Time of Update: 2015-10-11
標籤:CLGeocoder *geoCoder = [[CLGeocoder alloc] init];// 通過地理編碼,得到位置, CLLocation *loc = [[CLLocation alloc] initWithLatitude:30.662221 longitude:104.041367]; [geoCoder reverseGeocodeLocation:loc completionHandler:^(NSArray
Time of Update: 2015-10-11
標籤:
Time of Update: 2015-10-11
標籤:在iOS7以及以後有效: // base64編碼- (NSString*)base64encode:(NSString*)str { // 1.把字串轉成位元據 NSData* data = [str dataUsingEncoding:NSUTF8StringEncoding]; // 2.將二進位進行base64加密(編碼) //
Time of Update: 2015-10-11
標籤:問題描寫敘述:在Eclipse中執行ant批量打包工具出錯,日誌資訊例如以下:D:\Android\android-sdk-windows\tools\ant\build.xml:601: The following error occurred while executing this line:D:\Android\android-sdk-windows\tools\ant\build.xml:720: The following error occurred while
Time of Update: 2015-10-11
標籤:幾個基本的概念 : OS X : 屬於案頭PC層級(IMac,MacPro等)對應安裝的作業系統IOS : 屬於行動裝置層級(Iphone,Ipad等)對應安裝的作業系統XCode: 是一個IDE,也就是一個開發人員工具程式IOS SDK : 是一個編程API集合(蘋果官方提供的開發包,包含大量類與方法,供開發人員調用) 我總結了幾個如下幾個問題,並作出總結解答:IOS系統與IOS SDK的關係?SDK版本一般就是IOS的版本,例如用IOS SDK
Time of Update: 2015-10-12
標籤:視頻和音頻簡單總結1.音效播放(短時間的音頻檔案)1> AudioServicesCreateSystemSoundID2> AudioServicesPlaySystemSound2.音樂播放(長時間的音頻檔案)1> AVAudioPlayer只能播放本地的音頻檔案>MPMusicPlayerControllerm3.視頻播放1> AVPlayer(也可以播放音頻)能播放本地、遠端音頻、視頻檔案基於Layer顯示,得自己去編寫控制台2>