Time of Update: 2013-12-10
Activities提供了一種方便管理的建立、儲存、回複的對話方塊機制,例如 onCreateDialog(int), onPrepareDialog(int, Dialog),
Time of Update: 2013-12-10
public class Main extends Activity { int number = 1000; Drawable[] array; @Override public void onCreate(Bundle
Time of Update: 2013-12-10
前言 之前講過EditText,有興趣的朋友可以看一下。這篇部落客要說明的是自動完成文字框,它實際上也是一個文本編輯框,可以理解為對EditText功能的擴充,它對輸入的內容可以進行提示並且自動完成。本文會講解常用屬性設定,以及如何向AutoCompleteTextView增加提示資料,最後將使用一個demo示範一下。 說明 自動完成文字框(AutoCompleteTextView),可以從官方文檔上看出,是從EditText繼承而來,所以它實際上也是一個文本編輯框,只是多了一
Time of Update: 2013-12-10
private final static int kSystemRootStateUnknow = -1; private final static int kSystemRootStateDisable = 0; private final static int kSystemRootStateEnable = 1
Time of Update: 2013-12-10
由於本人英文能力實在有限,不足之初敬請諒解本部落格只要沒有註明“轉”,那麼均為原創,轉貼請註明本部落格網站連結接 Processing Bitmaps Off the UI Thread在UI線程之外處理Bitmap The BitmapFactory.decode* methods, discussed in the Load Large Bitmaps Efficiently lesson, should not be executed on
Time of Update: 2013-12-10
老夫最近需要做一個項目,需要調用伺服器段的一些網頁來選擇檔案,剛開始還挺糾結的,不知從何下手,網上大致預覽了大神們走過的路,他們傳統的方式都是使用一下代碼:[java]public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) { mUploadMessage =
Time of Update: 2013-11-16
相關Android藍芽知識直接略過,大家可以上百度搜搜。此代碼經過項目驗證,完全OK直接上代碼步驟: private BluetoothAdapter adapter;1.// 擷取藍芽適配器 adapter = BluetoothAdapter.getDefaultAdapter(); // 開啟藍芽 if
Time of Update: 2013-11-16
查看了下網上關於TextView載入帶圖片標籤的Html解決方案若干,發現很多都是講下面這種:1:重寫ImageGetter,直接擷取網狀圖片(這是比較通用的做法,但是遇到大圖片或者網路不好的情況下,會阻塞主進程)ImageGetter imgGetter = new Html.ImageGetter() { public Drawable getDrawable(String source) { Drawable drawable = null;
Time of Update: 2013-11-16
筆者用C#在伺服器端寫了一個Webservice,然後再Android用戶端通過soap2調用webservice的函數,遇到了HTTP request failed, HTTP status:
Time of Update: 2013-11-16
本文將以Direct dial
Time of Update: 2013-11-16
最近遇到一個適配問題,現在Android4.0以後出現了很多內建虛擬鍵的手機,一般1280*720 1280*800這種解析度手機實踐上的高度會是1280以下,因為項目需要效果的大屏手機和小屏手機有很大的差別,res下配置的一般是固定的layout-1280x720或者是layout-800x480,在內建虛擬鍵手機下面看到的會是layout-800x480的效果,想來想去,既然內建虛擬鍵影響了識別layout,那就在res下面加上layout-nohpi,讓那些內建虛擬鍵手機統一使用一套布局,
Time of Update: 2013-11-16
ViewPagerViewPager類提供了多介面切換的新效果。新效果有如下特徵:[1] 當前顯示一組介面中的其中一個介面。[2] 當使用者通過左右滑動介面時,當前的螢幕顯示當前介面和下一個介面的一部分。[3] 滑動結束後,介面自動跳轉到當前選擇的介面中ViewPager來源於google 的補充組件android-support-v4.jar,位置在androidSDK檔案夾android-sdks\extras\android\support\ 下
Time of Update: 2013-11-05
// returns the current touch location in screen coordinatesCCPoint CCTouch::getLocationInView() const { return m_point; }②從觸摸點擷取到在OpenGL座標系中的座標// returns the current touch location in OpenGL coordinatesCCPoint CCTouch::getLocation() const{
Time of Update: 2013-11-05
偶爾在網上看到matlab中怎麼訪問網頁這個話題,在百度裡搜了一下,這方面的回答比較少。所以就想研究一下到底是怎麼個回事。下面把實現過程記錄如下。在實現怎麼訪問網頁之前,先來解決一個問題。就是怎麼使得網頁中的中文不以亂碼的形式出現在顯示器上?老外的東西,就是麻煩,總是要解決類似的以為語言的不同所帶來的問題。我使用的是MATLABR2008a版本的,其實都大同小異,具體情況具體分析。因此,我們需要修改matlab中的urlread()函數,因為在matlab中是使用urlread()
Time of Update: 2013-11-05
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
Time of Update: 2013-11-05
google protocl buffer 序列化和還原序列化的一個例子需要先定義協議檔案 relation.proto,檔案內容如下:package mooon.rpc;option cc_generic_services = true;message ReqUserInfo{ required uint32 userid = 1; required string mask = 2;}message
Time of Update: 2013-11-05
public class CheckIdCard {/** * 校正銀行卡卡號 * * @param cardId * @return */public static boolean checkBankCard(String cardId) {char bit = getBankCardCheckCode(cardId.substring(0, cardId.length() - 1));if (bit == 'N') {return false;}return
Time of Update: 2013-11-05
wifi的狀態有以下幾種WIFI_STATE_DISABLED = 1, 已經關閉WIFI_STATE_DISABLING = 0, 正在關閉WIFI_STATE_ENABLED = 3, 已經開啟WIFI_STATE_ENABLING = 2, 正在開啟WIFI_STATE_UNKNOWN = 4 未知狀態為什麼會有進行中的操作呢?是由於開啟或關閉一個裝置需要時間。對wifi的操作就是操作WifiManager類,要想操作Wifi我們首先要擷取Wif服務WifiManager wifi = (
Time of Update: 2013-11-05
import QtQuick 2.0Item{ Rectangle { color: "blue" width: 50 height: 50 border.color: "green" border.width: 10 radius: 20 }}運行效果:import QtQuick 2.0Item{ Rectangle {
Time of Update: 2013-11-05
配置方式建立請看上文。 if (!CCDirector::sharedDirector()->getOpenGLView()) { CCEGLView *view = &CCEGLView::sharedOpenGLView(); view->setFrameSize(w, h); // set the design resolution screen size, if you want to use Design