Time of Update: 2016-04-15
標籤:1.簡訊介面<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <EditText
Time of Update: 2016-04-15
標籤:I had recently come across the need for a vertical progress bar but was unable to find a solution using the existing Progress Bar widget. The solutions I came across generally required an extension of the current Progress Bar or a completely new
Time of Update: 2016-04-15
標籤:在AndroidManifest.xml檔案中增加兩個東西,分別是:1、uses-library ,位於application裡面。2、instrumentation,與application同級。完整的AndroidManifest.xml檔案如下: 1 <?xml version="1.0" encoding="utf-8"?> 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
Time of Update: 2016-04-15
標籤:一、沙箱iOS的每一個應用程式都有自己的目錄來存放資料,這個目錄稱為沙箱目錄。沙箱目錄是一種資料安全性原則,它設計的原理是只能允許自己的應用訪問目錄,而不允許其他的應用訪問,這樣可以保證資料的安全,應用之間是不能共用資料的。一些特有的應用(如通訊錄)需要特定的API才能共用資料。下面簡單介紹一下,應用程式的沙箱目錄,先直觀的看一下示範程式的沙箱目錄結構。該應用程式的沙箱路徑為:/Users/"使用者名稱"/Library/Developer/CoreSimulator/Devices/8D
Time of Update: 2016-04-15
標籤:把從網路擷取的圖片資料儲存在SD卡上,先把許可權都加上網路許可權 android.permission.INTERNETSD卡讀寫權限android.permission.MOUNT_UNMOUNT_FILESYSTEMSandroid.permission.WRITE_EXTERNAL_STORAGE總體布局 寫介面,使用ListView,建立條目的布局檔案,水平擺放的ImageView TextView在activity中擷取到ListView對象,調用setAdapter(
Time of Update: 2016-04-15
標籤:Android系統在2015年佔全球市場份額的的81.6%,而且近幾年一直持增長趨勢,走在大街上,隨處可見的安卓手機,毋庸置疑,安卓已經成為當前智能手機作業系統的老大。當我們想要搞明白Android驅動開發的時候,其實就是在學習linux驅動開發的過程,只不過安卓增加了一個HAL,這是Android特有的。Google這樣設計的原因有很多,例如由於Linux核心基於CPL開源協議,而很多驅動廠商不想開放原始碼,所以增加HAL層後,可已經Linux驅動的商務邏輯放在HAL層。 &n
Time of Update: 2016-04-15
標籤:這個模組封裝了Automapper,使其更便於使用。描述了改模組涉及的所有類之間的關係。 AutoMapAttribute,AutoMapFromAttribute和AutoMapToAttribute:這三個attribute用於標註一個類到另外一個類的map方向。 AutoMapperHelper: 通過調用Automapper的API,根據類的AutoMap的特性完成類型之間的Map. AbpAutoMapperModule: 1.
Time of Update: 2016-04-15
標籤:上文簡單介紹了BUILD_JAVA_LIBRARY 與BUILD_STATIC_JAVA_LIBRARY編譯出來jar包的區別,那麼你如果拿到了一個內容是dex格式的jar包,而你又偏偏需要這個jar包匯入Eclipse來做開發,手頭偏偏又沒有這個jar包的源碼,或者有源碼,但是沒有Android源碼編譯(mm)的環境,怎麼辦?這個時候Google安卓反編譯工具(dex2jar,
Time of Update: 2016-04-15
標籤: 在github中有許多大牛封裝好的第三發類庫,其中有個自適應cell高度的類庫:https://github.com/gsdios/SDAutoLayoutmodel類commentsModel#import "JSONModel.h"#import "getCommentData.h"@interface commentsModel : JSONModel@property(nonatomic,copy)NSArray<getCommentData>
Time of Update: 2016-04-15
標籤:model類commentsModel#import "JSONModel.h"#import "getCommentData.h"@interface commentsModel : JSONModel@property(nonatomic,copy)NSArray<getCommentData> *commentList;@end#import "commentsModel.h"@implementation commentsModel@endgetCommentData#
Time of Update: 2016-04-15
標籤:實現WebApplicationinitializer介面的類都可以在web應用程式啟動時被載入。那麼來想一個問題:為什麼實現了WebApplicationInitializer這個介面後,onStartup方法就會自動執行?我們來簡單分析一下它的實現原理,下面先貼上WebApplicationInitializer介面相關代碼:servlet的ServletContainerInitializer介面:package javax.servlet;import java.util.Set;
Time of Update: 2016-04-15
標籤:- (float)checkTmpSize{ float totalSize = 0; NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:_diskCachePath]; for (NSString *fileName in fileEnumerator) { NSString *filePath =
Time of Update: 2016-04-15
標籤:iOS可以利用NSKeyedArchiver類將對象序列化成NSData儲存在磁碟上,但前提是該對象所屬的類必須遵從NSCoding協議。NSCoding協議包含兩個方法,要序列化的類必須實現它們- (void)encodeWithCoder:(NSCoder *)aCoder; //序列化的時候將資料encode (將資料編碼)- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder; // 還原序列化的時候將資料decode
Time of Update: 2016-04-15
標籤:本文轉自:http://blog.csdn.net/smking/article/details/40432287 下面講一下JSONModel的使用方法。 @inteface MyModel : JSONModel 1. 使用JSONModel時,不需要額外去檢查所要的伺服器屬性是否有返回。JSONModel的initWithDictionary方法會自動去進行檢查並處理。 2. 有效性檢查,如果指定的伺服器返回的某個欄位沒有返回,而且又是必須的,
Time of Update: 2016-04-15
標籤:.找到 SDWebImage找到SDImageCache類添加如下方法- (float)checkTmpSize{ float totalSize = 0; NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:_diskCachePath]; for (NSString *fileName in fileEnumerator) {
Time of Update: 2016-04-14
標籤:call,apply,bind一、call&applycall, apply都屬於Function.prototype的方法,因為屬於Function.prototype,所以每個Function對象執行個體,也就是每個方法都有call,
Time of Update: 2016-04-14
標籤:我們平時用手機調試時,經常是手不離機,以前可以下載個jar包能把手機屏映射到電腦案頭,但是運行比較卡,後來就放棄了,再之,手機接資料線有時也不太方便 ,pc與手機(連wifi)如處同一網段,就可以通過無線來調試!使用無線調式方法:一:cmd開啟命令視窗:(設定adbd 監聽連接埠)adb tcpip 5555 <設定adbd服務的連接埠> 二,cmd再開啟另一個視窗:(開啟adb網路偵錯模式)&
Time of Update: 2016-04-14
標籤:package com.example.meidiaplayar; import android.os.Bundle;import android.os.Environment;import android.app.Activity;import android.view.Menu;import android.widget.MediaController;import android.widget.VideoView;public class MainActivity
Time of Update: 2016-04-14
標籤:1、先在工程的libs檔案下匯入.so檔案2、在build.gradle中(本工程的gradle檔案)中的android{}段內填入/** 匯入so檔案 */task nativeLibsToJar(type: Zip, description: "create a jar archive of the native libs") { destinationDir file("$projectDir/libs") baseName "Native_Libs2"
Time of Update: 2016-04-14
標籤:一般情況下,在Android源碼下編譯一個jar包的典型makefile(Android.mk)如下:在檔案中加入以下內容:LOCAL_PATH:= $(call my-dir)#make jarinclude $(CLEAR_VARS)LOCAL_SRC_FILES := $(call all-subdir-java-files)LOCAL_MODULE := mytestjarinclude $(BUILD_JAVA_LIBRARY)#include