Time of Update: 2018-12-05
更改CameraConfigurationManager.java檔案在 Log.d(TAG, "Screen resolution: " + screenResolution);這句之後增加Point screenResolutionForCamera = new Point(); screenResolutionForCamera.x = screenResolution.x; screenResolutionForCamera.y =
Time of Update: 2018-12-05
如果你手工配置build path,把SDK1.5的android.jar加入到某些工程中,你可能會遇到下面的編譯錯誤:> Attempt to include a core VM class in something other than a core> library.> It is likely that you have attempted to include the core library from> a desktop> virtual
Time of Update: 2018-12-05
1. 建立你的應用程式,使用google api庫 2. 在你的布局RelativeLayout中引入一個MapView類 3. 擷取MD5認證指紋 用keytool產生認證(該工具在你的JDK bin目錄下): keytool -genkey -alias agps -keyalg RSA -keystore mykey 說明: 這裡-alias agps是表示產生的這個認證的別名叫agps,-keyalg RSA
Time of Update: 2018-12-05
*)if you run the android app, and it displays an exception, then you find the resource returned by findviewbyid is null,most likely you are using the old style "id" in you xml layout file, change it to "android.id" will fix your problem. *)if there
Time of Update: 2018-12-05
文章目錄 適配器Adapter 使用者介面User Interface關鍵類View ViewGroup Widget classes 在一個Android應用中,使用者介面是由View
Time of Update: 2018-12-05
在手機上提交使用者資料資訊(如需要頭像、暱稱),或者提交一個商品資訊(商品圖片和標籤),或者共用一個圖片到伺服器上。我們都需要同時處理檔案上傳和一般類型資料的提交。這個在web應用中很常見也很簡單。行動裝置 App可以類比web頁面提交一個HTTP POST請求,其中Content-type為multipart/form-data。具體程式碼範例如下: HttpClient httpClient = new DefaultHttpClient(); HttpPost
Time of Update: 2018-12-05
Android NDK 基本就是 Linux的開發,不過主要是產生.so形式供SDK調用。涉及的工具,就是Linux開發工具+SDK介面組件 建立 NDK 編譯環境1. 下載android NDK r4 Windows 安裝包,解壓縮到你想放的位置,如d:/android2. 安裝較新版本的cygwin,安裝中需要選擇安裝的Linux相關組件,主要是make、gcc、g++工具3. 運行cygwin, 設定檔.bash_profile中添加環境變數
Time of Update: 2018-12-05
原文 : http://www.cnblogs.com/growing/archive/2010/11/19/1881372.html
Time of Update: 2018-12-05
http://www.cnblogs.com/supersugar/archive/2011/08/02/2125450.html想要設定View的背景,但是只有一張小圖,直接設定到background的時候,將被展開。想要使用平鋪模式,如下:一個xml檔案,名為point_bg.xml 內容:<bitmap
Time of Update: 2018-12-05
聲明:本文轉載自android開發網,http://www.android123.com.cn/androidkaifa/683.html 前幾天Android123有關Android JNI開發系列教程中有關的原始碼,可以在本文中尋找:一、 在JNI中執行Java方法class AndroidJniDemo { private native void executeMethod(); private void show() { System.out.println("Java cwj
Time of Update: 2018-12-05
最近發現kernel.org被牆了,為什麼這種網站也能被牆了?要想下載源碼的話,只能繞過去了。下面是我從網上搜尋到的一些下載方法;==============================================================================================原文連結是:http://cache.baidu.com/c?m=9d78d513d98316ed05fa950e1a67a371685497153ac0a61f6b93d3169c
Time of Update: 2018-12-05
當接收一條多媒體訊息時,首先會從多媒體訊息中心收到一條push資訊,PushReciever.java的OnReceive()方法被觸發,接著會執行ReceivePushTask的doInbackground()方法,在該方法裡,會擷取raw push-pdu 資訊,解析並存入到資料庫中(pdu表)中。這時會把多媒體訊息的date欄位和expir欄位加到資料庫中,然後執行TransactionService服務。 NotificationTransaction.java類的run(
Time of Update: 2018-12-05
在項目中經常會使用到WebView控制項,當載入html頁面時,會在/data/data/應用package目錄下產生database與cache兩個檔案夾如如示:請求的url記錄是儲存在webviewCache.db,而url的內容是儲存在webviewCache檔案夾下. 為了便於理解,接下來類比一個案例,定義一個html檔案,在裡面顯示一張圖片,用WebView載入出來,然後再試著從緩衝裡把這張圖片讀取出來並顯示。 第一步:建立一個Android工程命名為Web
Time of Update: 2018-12-05
一、AIDLDemoServer Person.javapackage com.aidl.aidl;import android.os.Parcel;import android.os.Parcelable;public class Person implements Parcelable {private int id;private String name; public int getId() {return id;}public void setId(int id)
Time of Update: 2018-12-05
第一次接觸android應用程式(這裡指的是JAVA層的UI程式,也難怪了,Google放出的API就只支援JAVA應用程式了),很難搞明白內部是如何?的。但是,從原理上分析,應該是有一個訊息迴圈,一個訊息佇列,然後主線程不斷得從訊息佇列中取得訊息並處理之。然而,google封裝得太厲害了,所以一時半會還是搞不清楚到底是怎麼做的。本文將分析android內的looper,這個是用來封裝訊息迴圈和訊息佇列的一個類,handler其實可以看做是一個工具類,用來向訊息佇列中插入訊息的。好比是Wind
Time of Update: 2018-12-05
原文地址:http://www.2cto.com/kf/201108/100990.html 由於接觸android開發的時間並不久,對於android系統、機制的理解也是一知半解。所以在開發中陸陸續續遇到很多莫名其妙的問題,其中最讓人頭疼的就是application crash。application的crash可能由於很多的原因所引起的,有可能是因為資料的問題,或者是非同步AsyncTask的運用不合理,等等等等,都可能造成application
Time of Update: 2018-12-05
1.monkey runner出了一個錄製的工作,這個錄製工具是在android源碼裡提取出來的,它的環境是python 2.要求把monkey_recorder.py檔案放入adnroid
Time of Update: 2018-12-05
一般情況下我們使用startService(Intent service)來啟動一個服務,但這種情況下無法得到Service對象的引用,通過bindService方法啟動服務則可以實現此功能。下面給一個小例子示範一下:1.調用者package com.zhf.local;import android.app.Activity;import android.content.ComponentName;import android.content.Context;import
Time of Update: 2018-12-05
原文地址:http://blog.csdn.net/lnb333666/article/details/74712541、http用gzip壓縮,設定連線逾時時間和響應逾時時間http請求按照業務需求,分為是否可以緩衝和不可緩衝,那麼在無網路的環境中,仍然通過緩衝的httpresponse瀏覽部分資料,實現離線閱讀。2、listview效能最佳化(1)複用convertView在getItemView中,判斷convertView是否為空白,如果不為空白,可複用。如果couvertview中的v
Time of Update: 2018-12-05
android圖表引擎AchartEngine製作柱圖源碼 導讀:網上關於AChartEngine繪製柱狀圖的介紹非差稀少,而AchartEngine它本身Api協助文檔寫的非常的簡略,給我們學習帶來很大的不便。所以我在這裡憑藉個人的理解,以一個簡單的柱狀圖的例子來解釋Ach 廢話不多說 關於android圖表製作引擎AchartEngine的介紹我這裡直接略去