Time of Update: 2018-12-05
Android 4.0.1 源碼下載,模擬器編譯和運行http://blog.csdn.net/rambo2188/article/details/6943382http://www.linuxidc.com/Linux/2011-11/47808.htm轉注:本文由rambo2188在CSDN上首發,linuxidc上的貌似該文的轉載----------------------------------------------------------------[1] Android ICS
Time of Update: 2018-12-05
1.自訂一個view檔案MyView.java2.定義自訂屬性檔案values/attrs.xml<?xml version="1.0" encoding="utf-8" ?><resources> <declare-styleable name="MyAtrr"> <attr name="textcolor" format="color"/> <attr name="textsize"
Time of Update: 2018-12-05
public String convertStreamToString(InputStream is) { /* * To convert the InputStream to String we use the BufferedReader.readLine() * method. We iterate until the BufferedReader return null which means *
Time of Update: 2018-12-05
package com.android.httppost;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.net.HttpURLConnection;import java.net.URL;import android.app.Activity;import
Time of Update: 2018-12-05
一、綁定服務介紹前面文章中講過一般的通過startService開啟的服務,當訪問者關閉時,服務仍然存在;但是如果存在這樣一種情況:訪問者需要與服務進行通訊,則我們需要將訪問者與服務進行綁定;如果使用Context.bindService()方法啟動服務,則在服務未建立時,系統會調用服務的onCreate()方法,接著調用onBind()方法,這時就訪問者與服務已經綁定;如果多次調用bindService()多次綁定服務,則不會有副作用(導致多次綁定);綁定服務的運行流程如所示:二、Bind
Time of Update: 2018-12-05
ListView是類似於將一個介面分為一行一行,如:注意:listView.getItemAtPosition(int pos)內部調用了adapter.getItem(int
Time of Update: 2018-12-05
一、ListView介紹 ListView是類似於將一個介面分為一行一行,如: ListView只是一個視圖,而如果要在這個列表視圖中顯示資料,則必須要通過“Adapter”,我們通常有三種Adapter:(1)ArrayAdapter:每行只能是一個文本;(2)SimpleAdapter:此種方式不是很好,經過測試,只能顯示一行資料;(3)繼承BaseAdapter:此種方式較靈活,可以自訂將每行對應到不同的布局xml中;(4)SimpleCursorAdapter:此處傳入的資料不是Lis
Time of Update: 2018-12-05
文章目錄 1.儲存2.讀取 一、SharedPreferences應用情境SharedPreferences 用於儲存參數;內部是以XML檔案進行儲存的,位於/data/data/package/shared_prefs目錄中;二、SharedPreferences核心代碼1.儲存SharedPreferences preference = context.getSharedPreferences("xiazdong",
Time of Update: 2018-12-05
一、設定部分字型的顏色通過SpannableStringBuilder style = new SpannableStringBuilder(CharSequence cs);style.setSpan(new ForegroundColorSpan(color), begin, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);tv.setText(style);設定,由於此種方法比較複雜,我實現了一個輔助類,能夠快速實現部分字型的顏色;final class
Time of Update: 2018-12-05
文章目錄 1.監聽器 一、Button的繼承結構java.lang.Object|-android.view.View|-android.widget.TextView|-android:widget.Button二、Button使用1.監聽器android.view.View.OnClickListener btn.setOnClickListener(new
Time of Update: 2018-12-05
第一種:使用KSOAP2庫原帖例子來自 http://www.cnblogs.com/ghj1976/archive/2011/04/26/2028904.html這東西看起來好是好,可我最終還是以失敗告終。第一次崩潰是因為版本問題,首頁上下載的最新2.5.7不知怎麼搞的,編譯沒問題,一運行就程式崩潰。後來換成2.4的總算成功了。第二次也不知道什麼原因。例子能跑通,我自己的程式卻死活不行,再次崩潰。 原帖分析的不錯,copy一下。1、指定 WebService 的命名空間和調用方法import
Time of Update: 2018-12-05
sencha如果不做設定,是一個framework頁面,當點擊瀏覽器返回或者Android的返回鍵的時候會跳出頁面或整個程式所以需要實現route路徑網上麼有特別詳細的說明,研究了很久分享一個首先,需要在main的地方開始就加入曆史路徑。在app.jslaunch: function() {//增加曆史路徑,設定main為homethis.getApplication().getHistory().add(Ext.create('Ext.app.Action', {
Time of Update: 2018-12-05
package com.lxl.demo;import android.app.Activity;import android.os.Bundle;import android.view.Window;import android.view.WindowManager;public class DemoActivity extends Activity {/** Called when the activity is first created. */@Overridepublic void
Time of Update: 2018-12-05
1. View.onDraw( ) method is a very performance-criticalpiece of code, so it’s best to do as little as possible there.• If possible, avoid doing any object allocations in the method onDraw( ).• Prefetch things such as color constants elsewhere (for
Time of Update: 2018-12-05
Android Studio 1.0的前瞻版發布了,今早馬上下載嘗下鮮。如下:https://developer.android.com/sdk/installing/studio.html很顯然的IntelliJ IDEA的樣貌,下面是一些:選擇了“New
Time of Update: 2018-12-05
(啊,一不小心把這篇文章刪了,沒有備份,只能重來了。)在API Demo的View->Animation下可以找到四個Animation的Demo,第一個3D
Time of Update: 2018-12-05
Android高手進階教程(二)之----Android Launcher抽屜類SlidingDrawer的使用!Android高手進階教程(三)之----Android 中自訂View的應用.Android高手進階教程(四)之----Android 中自訂屬性(attr.xml,TypedArray)的使用!Android高手進階教程(五)之----Android 中LayoutInflater的使用!Android高手進階教程(七)之----Android
Time of Update: 2018-12-05
1:下載SDL2.0的版本2:r8下編譯的,還好,這個版本可以直接在windows下用了3:把sdl目錄裡的sdl_config.h改成android的。4:一開始運行ndk-build,提示 EGL/egl.h 找不到,原來需要在 jni目錄裡的Application.mk指定9以上的版本像下面的APP_ABI := armeabiAPP_PLATFORM := android-94:ndk-build就OK了不過現在SDL2的文檔似乎還不怎麼完善,改起來有點小痛苦
Time of Update: 2018-12-05
安裝Ubuntu Android應用程式開發環境需要如下幾個軟體Java開發包:JDK 1.5/1.6開發Integration Environment(IDE): Eclipse 3.5.2Android開發環境:ADTAndroid SDK一.安裝JDK 根據ubuntu官方網站的 java安裝配置 ,我們在中端中輸入如下命令:view plaincopy to
Time of Update: 2018-12-05
設定TextView預設字型的辦法:Java代碼 textView.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); 設定字型為預設粗體,粗體字型Java代碼 textView.setTypeface(Typeface.DEFAULT_BOLD, Typeface.BOLD); 設定字型為等寬字型,斜體字型Java代碼 textView.setTypeface(Typeface.MONOSPACE,