android 匯入classes.jar

1.將Launcher2項目匯入eclipse中。這時候Launcher2工程已經匯入到eclipse中了,不過這時候會有100多個錯誤.2.添加Launcher2使用的包檔案。由於在Android源碼中,很多方法、成員、類、包都被打上@hide標籤,這些成員在SDK中沒有公開,以至於在編譯Launcher源碼時最常遇到的類android.view.View的成員mScrollX無法訪問。因此首先需要下載Android的代碼並且編譯好,因為要用到一些編譯完成的class.jar檔案這裡我們用到的

android aidl的建立

Service是android 系統中的一種組件,它跟Activity的層級差不多,但是他不能自己運行,只能後台運行,並且可以和其他組件進行互動。Service的啟動有兩種方式:context.startService()和context.bindService()。 使用context.startService() 啟動Service是會會經曆:context.startService()  ->onCreate()- >onStart()->Service

LInux配置ANDROID環境

開啟命令列終端Terminal, 進行第一次系統更新並安裝開發必要的軟體包shawn@e014-anle-lnx:~$ sudo su# apt-get install aptitude# aptitude update# aptitude full-upgrade## aptitude -y install sysv-rc-conf subversion subversion-tools python-svn git-core git-svn binutils binutils-dev

android安裝卸載apk

String fileName = "/sdcard/TestB.apk";       Intent intent = new Intent(Intent.ACTION_VIEW);    intent.setDataAndType(Uri.parse("file://" +new File(fileName)),"application/vnd.android.package-archive");   startActivity(intent);     1、安裝apkString

android 仿照ihone開關

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:orientation="vertical"    android:layout_width="fill_parent"    android:layout_height="fill_parent"    >   

android scorller and VelocityTracker

今天在遇到一個非常需求的一個問題,需要在listview上面的headview 加上一個可以滾動切換圖片的畫面接著就開始使用 scorller and VelocityTracker 實現,但是在滑動headview的時候,出現了情況 是:scorller 滑動時候,touch down 和touch move 都執行成功了,但是不見touch up訊息回來所以就感覺到很奇怪,開始認為是listview

android progressbar 顯示兩個進度樣式的解決方案

顯示兩個進度的原因是因為螢幕適應解析度的問題解決方案是:首先需要在AndroidMinifest。xml中配置    <supports-screens         android:largeScreens="true"         android:smallScreens="true"        android:normalScreens="true"        android:anyDensity="true"        android:xlargeScreens=

android Activity載入模式

<activity>元素的launchMode屬性可以設定四種不同的載入模式:"standard" (預設值)       "singleTop"        "singleTask"       

android 手機解析度

//////////////////////////////////1.drawable-(hdpi,mdpi,ldpi)的區別dpi是“dot per inch”的縮寫,每英吋像素數。四種密度分類: ldpi (low), mdpi (medium),hdpi (high), and xhdpi (extra high)一般情況下的普通螢幕:ldpi是120,mdpi是160,hdpi是240,xhdpi是320。2.WVGA,HVGA,QVGA的區別VGA是"Video Graphics

Google發布 Android 2.2:運行速度提高2-5倍

Google於北京時間5月20日晚上10:30點在舊金山Moscone會展中心舉辦Google I/O2010大會第二天的會議,Google正式發布了代號是“froyo 凍優酪乳”的Android作業系統2.2版(高清圖集)。下面是Android 2.2版本的改進和提升:  1.速度提升  Google介紹Android2.2時,將速度放在了第一位。Google在2.2中加入了Just-In-Time(JIT),可以使程式運行速度提高2-5倍。示範運行在2.1下的Nexus One遊戲幀數為29

Android String 轉 MD5

/*** 將字串轉成16 位MD5值* * @param string* @return*/public static String MD5(String string) {byte[] hash;try {hash = MessageDigest.getInstance("MD5").digest(string.getBytes("UTF-8"));} catch (NoSuchAlgorithmException e) {e.printStackTrace();return null;}

android save and read webpage

 l  Permission inmanifest:    <uses-permissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"/>        l  Save web Page tosdcard:                        //get file name                     String fileName =

android load 本地 html 頁面

1.在res下建一個raw的檔案夾,用於放置html檔案。2.在raw下建立一個html檔案:mypage.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><HTML><HEAD><TITLE>Actuate Viewer</TITLE></HEAD><BODY> 

通過CMD 查看android APP資料庫表

1.  ADB SHELL2. cd 到database目錄:3. sqlite3  databaseName.db;4. .tables;5. selecte * from tableName;# lslslibcachedatabasesshared_prefs# cd databasescd databases# lslswebviewCache.dbwebview.dbyb_database.db# cd yb_databasecd yb_databasecd: can't cd to

通過CMD 命令列建立android自訂模擬器

通過CMD 命令列建立android自訂模擬器1.先cd到android SDK 的tools目錄下, 2.輸入以下命令:android create avd -n myandroid1.5 -t 2其中: myandroid1.5為模擬器的名字,可以任意取, -t 2 中的2指建立android1.5 的AVD 裝置,如1表示1.1, 6表示android 2.1等等。 3.在輸入以上命令後,系統會輸出如下資訊來詢問是否繼續自訂avd裝置:Android 1.5 is a basic

android 中使用回呼函數

1.定義callback類:public abstract class AppCallback {    public abstract void startCallback();}2.在觸發callback函數的地方定義:private static AppCallback mClearAll = null;並且定義註冊和移除callback的方法:public static void registerCallback(AppCallback callback, int callBackId)

android 模擬器快速鍵大全

  F1/PgUp     Menu key   菜單鍵    F2/PgDown   Star key 星號鍵    F3          Call key 發送撥號鍵    F4          End Call key 結束通話或者說紅鍵    Home        Home key Home鍵    ESC         Back Key 後退鍵    F7          Power button 電源鍵    F8          Disable/Enable all

Android中的EditText預設時不彈出軟鍵盤的方法

http://blog.sina.com.cn/s/blog_5edb01e90101dwh7.html方法一:  在 AndroidMainfest.xml中選擇哪個activity,設定windowSoftInputMode屬性為 adjustUnspecified|stateHidden < activity android:name=".Main" android:label="@string/app_name"

[android]startActivityForResult 和 onActivityResult 問題

http://www.eifr.com/article.php?id=1464奇怪問題 startActivityForResult() 後直接調用 onActivityResult()    開發人員都知道,可以通過使用 startActivityForResult() 和 onActivityResult() 方法來傳遞或接收參數。然而在“輕聽”項目中,還沒等到被調用的 Activity 返回,onActivityResult() 就被執行了。找了很久,終於通過小道訊息得知,這與

Android在JNI中輸出輸出LOG

http://hi.baidu.com/theonlyking/blog/item/58dcc61373a98ac8f7039ebc.html現在Android發展的如火如荼,但是它的一些程式還是需要調用到C的代碼,這期間的銜接(JAVA與C之間)就叫做JNI。不熟悉JNI的可以先百度一下,另外,還需要NDK的一個開發環境,我用的是NDK5。話不多說,開始:建立一個Android工程,之後,在裡面建立一個類,裡面只需要包含一個native方法即可,例:package

總頁數: 2771 1 .... 2105 2106 2107 2108 2109 .... 2771 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.