Time of Update: 2018-12-03
安卓第七天TextView和EditText TextView: android:autoLink屬性的應用 android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/autotx" <TextView android:id="@+id/tvWebUrl" android:layout_width="fill_parent
Time of Update: 2018-12-03
*/要想類比一個打電話程式,我們需要的是什麼呢?1.畫出Android的UI圖2.介面搭載在UI介面中我們的設計中,分析發現String字串有兩個,一個text文字框,一個button。首先在res-values-strings.xml中添加兩個字串<?xml version="1.0" encoding="utf-8"?><resources> <string name="hello">Hello World, MyPhoneActivity!<
Time of Update: 2018-12-03
今天是第一次學習Android,有點小激動,雖然以前用過安卓的手機和模擬器,但是終究沒有自己寫過Android項目,感覺很不錯。1.下載和安裝android-sdkandroid的官方網站是http://www.android.com,登陸該網址即可下載和安裝Android SDK。下載和安裝Android
Time of Update: 2018-12-03
main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
Time of Update: 2018-12-03
Main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <
Time of Update: 2018-12-03
main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
Time of Update: 2018-12-03
今天是學習Android的第二天,昨天我們主要學習了如何配置Android開發環境和第一個Android程式,HELLOWORLD。但是並沒有解釋清楚,我們現在來看一下,適用Eclipse開發Android應用大致需要的步驟:1.建立1個Android項目2.在XML布局檔案中定義車工那些的使用者介面3.在Java代碼中編寫業務實現現在具體介紹開發一個HelloWorld應用程式的詳細步驟:1.通過Ecclipse的建立一個Android項目。可以選擇項目的儲存位置,填寫項目的名字,包的名字和修
Time of Update: 2018-12-03
1、 Android的原始碼包括介面布局檔案、java源檔案、資源檔。2、 使用AssetManager類來訪問assets檔案夾的檔案。(瞭解一下AssetManager)。3、 資源檔分兩種:(1)res檔案下的檔案可以通過R檔案訪問。(2)無法直接存取的檔案要通過AssManager訪問。4、 /res/drawable檔案夾存放的Drawable對象的xml檔案:BitmapDrawable, NinePatchDrawable , SartateListDrawable
Time of Update: 2018-12-03
(1)定義一個Applicationpackage zxf.mobilesafe.tools;import java.util.HashMap;import java.util.Map;import zxf.mobilesafe.bean.TaskInfo;import android.app.Application;public class MobileSafeApplication extends Application { //在全域的盒子裡面定義一個變數 存放 appinfo的資料
Time of Update: 2018-12-03
getSystemService是Android很重要的一個API,它是Activity的一個方法,根據傳入的NAME來取得對應的Object,然後轉換成相應的服務物件。以下介紹系統相應的服務。 傳入的Name返回的對象說明WINDOW_SERVICE WindowManager管理開啟的視窗程序LAYOUT_INFLATER_SERVICELayoutInflater 取得xml裡定義的viewACTIVITY_SERVICEActivityManager 管理應用程式的系統狀態POWER_
Time of Update: 2018-12-03
xml檔案<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"
Time of Update: 2018-12-03
一、WIFI的基本架構 1、wifi使用者空間的程式和庫: external/wpa_supplicant/ 產生庫libwpaclient.so和守護進程wpa_supplicant。 2、hardware/libhardware_legary/wifi/是wifi管理庫。 3、JNI部分: frameworks/base/core/jni/android_net_wifi_Wifi.cpp 4、JAVA部分:
Time of Update: 2018-12-03
1、遠程服務的類的建立(1)服務類public class MyService extends Service { // 遠端服務 @Override public IBinder onBind(Intent intent) { // TODO Auto-generated method stub return new MyBinder(); } private class MyBinder extends IService.Stub{ @Override public void
Time of Update: 2018-12-03
高通wifi android層移植(bcm4329)定義好核心模組的位置(包括核心模組、韌體、NVRAM、以及其它的核心模組,比如說SDIO的驅動或是USB驅動(如果是USB網卡的話))hardware/libhardware_legacy/wifi/wifi.c要用到。Wifi.c裡面的一些宏可以在BoardConfig.mk裡面去配置。BOARD_WPA_SUPPLICANT_DRIVER := WEXTWIFI_DRIVER_MODULE_PATH :=
Time of Update: 2018-12-03
一.“初次邂逅”在我們構建設定介面的時候會用到ListPreference這個控制項,預設(2.3之前)是單選,但我們現在想要多選,就像所示二.“先看外表”我們的項目結構如下:首先我們先看布局檔案preference_layout.xml<?xml version="1.0" encoding="utf-8"?><PreferenceScreen
Time of Update: 2018-12-03
什麼是IntentService?官方的解釋是: IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand. Clients send requests through android.content.Context.startService(Intent) calls; the service is started as
Time of Update: 2018-12-03
Activity lifecyclefirst run the apk:06-01 10:54:33.646: DEBUG/u0fly ----->(283): onCreate06-01 10:54:33.646: DEBUG/u0fly ----->(283): onStart06-01 10:54:33.686: DEBUG/u0fly ----->(283): onResumepress "HOME"06-01 10:56:51.327: DEBUG/u0fly ---
Time of Update: 2018-12-03
1、EditText和TextView 對於EditText控制項往往可以設定setOnKeyListener方法,同時建立一個OnKeyListener對象作為參數,並重載它的onKey()成員方法。作用:用來攔截EditText中的鍵盤輸入事件。 2、ImageButton和Button 設定ImageButton的背景圖片可以通過ImageButton.setImageResource(),需要傳遞的參數就是圖片資源的ID,對按鈕可以設定onFocusChange、onClick等按鈕事件
Time of Update: 2018-12-03
如果要讓程式全螢幕顯示,也就是沒有標題列(title
Time of Update: 2018-12-03
Usage: android [global options] action [action options]Global options: -v --verbose Verbose mode: errors, warnings and informational messages are printed. -h --help Help on a specific command. -s --silent Silent mode: only errors are