TShopping

 找回密碼
 註冊
搜索
TShopping 精選文章 Android 手機開發
 
訂閱

Android 手機開發

GridView元件的實作流程:
GridView元件的實作流程:
完成圖 1.準備圖形檔案放在專案的res/drawable目錄內 2.在layout檔案內新增GridView元件 3.繼承BaseAdapter類別並改寫getCount()、getItem()、getItemId()、getView()方法,系統會自動呼叫這些方法 4.呼叫setAdapt ...
2013-7-10 19:58
[Android智慧型手機設計_Gallery元件]
[Android智慧型手機設計_Gallery元件]
完成圖 layout上建立ImageView Gallery 1.建立 attr.xml ?xml version=1.0 encoding=utf-8? resources declare-styleable name=GalleryCCTU attr name=android:galleryItemBackground /attr /declare-styleable ...
2013-7-10 19:58
[Android智慧型手機設計_Activity生命週期]
[Android智慧型手機設計_Activity生命週期]
package com.example.activitylife; //匯入類別庫 import android.os.Bundle; import android.app.Activity; import android.util.Log; import android.view.Menu; public class ActivityLife extends Activity { ...
2013-7-10 19:58
[Android開發環境建置]
[Android開發環境建置]
主要可以分為四個步驟,如下所示:•Step 1:下載和安裝JDK。http://java.oracle.com•Step 2:下載和安裝Eclipse IDE。http://www.eclipse.org/downloads/•Step 3:下載和安裝Android SDK。http://developer.andro ...
2013-7-10 19:58
Android 翻頁 返回 功能
Android 翻頁 返回 功能
步驟一:定義繼承Activity類別的新類別 準備建立活動2的Activity類別,然後在onCreate()方法的最後加上一行setContentView()方法 步驟二:建立意圖來啟動新活動 在FirstActivity.java建立button1_Click()事件處理程 ...
2013-7-10 19:58
[Android智慧型手機設計_傳遞資料給其他活動以Intent6_2為例]
[Android智慧型手機設計_傳遞資料給其他活動以Intent6_2為例]
完成圖 1.來源_First.java /* //1.建立Intent物件 Intent myIntent = new Intent(); //2.藉由setClass()方法設定來源與目的地類別 myIntent.setClass(First.this, Second.class); //3.建立Bundle物件,利用putStr ...
2013-7-10 19:57
Android切換鎖定活動的方向
Android切換鎖定活動的方向
1.Android應用程式有時可能需要切換鎖定活動的方向,此時我們可以新增Button元件來切換活動的方向。在Android是呼叫Activity類別的setRequestedOrientation()方法來鎖定活動的方向,如下所示: setRequestedOrientat ...
2013-7-10 19:57
Download and Install Android USB Drivers For Windows – Phone & Tablet
USB cable is one of the easiest way for connecting our mobile devices to the computer. For conventional devices, drivers will be automatically downloaded once your device is recognized by the computer ...
2013-7-10 19:54
[Android智慧型手機設計_Ch8_3_SQLite新增功能]
[Android智慧型手機設計_Ch8_3_SQLite新增功能]
存取SQLite資料庫的說明如下: 資料新增的說明如下: 1.呼叫getWritableDatabase()建立、開啟資料庫並回傳資料庫物件 SQLiteDatabase db = getWritableDatabase(); 2.建立ContentValues物件儲存欲新增的資料 ContentV ...
2013-7-10 19:54
[Android智慧型手機設計_Ch8_2_SQLite瀏覽功能]
[Android智慧型手機設計_Ch8_2_SQLite瀏覽功能]
存取SQLite資料庫的說明如下: SQLiteDatabase類別提供2種查詢功能的方法 1.rawQuery():僅接受單純的SQL查詢語法 rawQuery(String sql, String selectionArgs) 2.query():將SQL查詢語法依照query()的參數來切割 q ...
2013-7-10 19:54
[Android智慧型手機設計_Ch8_1_SQLite查詢功能]
[Android智慧型手機設計_Ch8_1_SQLite查詢功能]
存取SQLite資料庫的說明如下: 1.繼承SQLiteOpenHelper並改寫onCreate() 2.第一次呼叫getWritableDatabase()或getReadableDatabase()時會建立資料庫並自動呼叫onCreate() 3.SQLiteOpenHelper子類別內增加其他存取資料 ...
2013-7-10 19:54
[Android智慧型手機設計_shared preferences:存取偏好檔案的內容]
[Android智慧型手機設計_shared preferences:存取偏好檔案的內容]
存取偏好設定檔案的說明如下: 1.呼叫Context的getSharedPreferences()取得SharedPreferences getSharedPreferences settings=getSharedPreferences(String?name, int mode) 2.呼叫SharedPreferences的edit()以取得S ...
2013-7-10 19:53
[Android智慧型手機設計_assets:存取assets目錄內的資源]
[Android智慧型手機設計_assets:存取assets目錄內的資源]
package com.example.ch7_1_asset; import java.io.IOException; import java.io.InputStream; import android.os.Bundle; import android.app.Activity; import android.util.Log; import android.view.Menu; impo ...
2013-7-10 19:53
[Android智慧型手機設計_隱含意圖Google Map]
[Android智慧型手機設計_隱含意圖Google Map]
Google map座標工具:http://app.essoduke.org/gmap/ 模擬器:target=Google Inc.:Google APIs:17 1.顯示地圖定位 使用Intent.ACTION_VIEW,關聯資料格式如下: geo:latitude,longitude geo:latitude,longitude?z=zo ...
2013-7-10 19:53
[Android智慧型手機設計_External storage:存取行動裝置的記憶體]
[Android智慧型手機設計_External storage:存取行動裝置的記憶體]
可以將檔案儲存在可移除儲存媒體上(例如:SD卡),這種方式稱為外部儲存,說明如下: 私有的外部檔案:儲存在「/sdcard/Android/data/package_name/files/」,會隨著應用程式被移除而一同移除 公開的外部檔案:儲存 ...
2013-7-10 19:53
 


Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-26 08:21 , Processed in 0.023940 second(s), 8 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

返回頂部