Time of Update: 2018-12-05
Chapter 1 ReadingWeb Apps versus Native AppsFirst Web Apps The defining characteristics of a web app are that the user interface (UI) is built with web standard technologies, it is available at a URL (public, private, or perhaps behind a log in),
Time of Update: 2018-12-05
任務、進程和線程 關於Android中的組件和應用,之前涉及,大都是靜態概念。而當一個應用運行起來,就難免會需要關心進程、線程這樣的概念。在Android中,組件的動態運行,有一個最與眾不同的概念,就是Task,翻譯成任務,應該還是比較順理成章的。Task的介入,最主要的作用,是將組件之間的串連,從進程概念的細節中剝離出來,可以以一種不同模型的東西進行配置,在很多時候,能夠簡化上層開發人員的理解難度,協助大家更好的進行開發和配置。任務 在SDK中關於Task(guide/topics
Time of Update: 2018-12-05
如果在你的C:/android-sdk-windows/tools目錄下並沒有adb.exe這個可執行檔。並且當你開啟Eclipse時,有關Android的外掛程式會報錯。這時你就應該這樣做:首先,改一下你的環境變數,把原來的C:/android-sdk-windows/tools改成C:/android-sdk-windows/platform-tools。(如果環境變數找不到,就不用設定)其次,把C:/android-sdk-windows/platform-tools目錄下的adb.exe
Time of Update: 2018-12-05
本文簡要介紹如何通過Ant指令碼Android project編譯打包成APK檔案並安裝到手機。主要步驟:1產生R.java類檔案:利用ant和命令列使用android SDK提供的aapt.ext程式產生R.java。2將.aidl檔案產生.java類檔案:利用ant和命令列使用android SDK提供的aidl.exe產生.java檔案。3第三步 編譯.java類檔案產生class檔案:利用ant和命令列使用jdk的javac編譯java類檔案產生class檔案。4第四步
Time of Update: 2018-12-05
點擊這裡下載原始碼Android中,使用手指觸摸,不能像電腦一樣有滑鼠左鍵和右鍵,所以會有一個PopupWindow來代替滑鼠右鍵。當使用者點擊的時候出現一個彈出的視窗與使用者交流資訊。好了,現在就開始介紹PopupWindow的用法。首先聲明一個PopupWindow的對象PopupWindow pop=null;初始化poppop=new
Time of Update: 2018-12-05
Notification n=new Notification(R.drawable.ic_launcher,"hello world",System.currentTimeMillis());這是建立一個Notification 的對象,的一個參數是表徵圖,顯示在頂部,第二個參數是提示的類容,第三個參數是什麼時候提示。PendingIntent pi=PendingIntent.getActivity(this, 0, new Intent(this,TestActivity.class),
Time of Update: 2018-12-05
我就直接上代碼了try{String systemId="<?xml version=\"1.0\" encoding=\"utf-8\"?><student><name>張譯成</name><age>22</age><address>湖北省</address></student>";SAXParserFactory
Time of Update: 2018-12-05
Android Spinner 有兩種用法1.使用XML布局<Spinner android:id="@+id/mySpinner" android:layout_width="fill_parent" android:layout_height="wrap_content" /><string-array name="planets"> <item>張三</item> &
Time of Update: 2018-12-05
Process localProcess = Runtime.getRuntime().exec("su");這條代碼獲得root許可權OutputStream localOutputStream = localProcess.getOutputStream();DataOutputStream localDataOutputStream = new
Time of Update: 2018-12-05
在原Activity中,使用this.startActivityForResult(intent, 1);第一個參數是Intent對象,包含要到達的Activity資訊,第二個參數是requestCode,當到達的Activity返回時可以得到這個值。在原Activity中覆蓋protected void onActivityResult(int requestCode, int resultCode, Intent data) {// TODO Auto-generated method
Time of Update: 2018-12-05
使用MediaPlayer播放音頻或者視頻的最簡單例子:JAVA代碼部分:public class MediaPlayerStudy extends Activity {private Button bplay,bpause,bstop;private MediaPlayer mp = new MediaPlayer();@Overridepublic void onCreate(Bundle savedInstanceState)
Time of Update: 2018-12-05
原創文章,轉載請註明處處:http://blog.csdn.net/zhy_cheng/article/details/8276848我的環境是ubuntu 12.04 ,android-ndk-r8,Cocos2d-2.0-x-2.0.4,eclipse 3.7.2我之前就搭建好了NDK的開發環境,NDK環境搭建請看Android
Time of Update: 2018-12-05
*res/raw和assets的相同點:1.兩者目錄下的檔案在打包後會原封不動的儲存在apk包中,不會被編譯成二進位。*res/raw和assets的不同點:1.res/raw中的檔案會被映射到R.java檔案中,訪問的時候直接使用資源ID即R.id.filename;assets檔案夾下的檔案不會被映射到R.java中,訪問的時候需要AssetManager類。2.res/raw不可以有目錄結構,而assets則可以有目錄結構,也就是assets目錄下可以再建立檔案夾*讀取檔案資源:1.讀取r
Time of Update: 2018-12-05
從網上找了一圈 大致有兩種方法方法一:Java代碼 <TabHost xmlns:android="http://schemas.android.com/apk/res/android"android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout
Time of Update: 2018-12-05
這篇文章主要介紹的是調用相機程式獲得圖片,調用Android作業系統內建的圖片處理常式處理圖片然後返回到我們的程式。先看看布局檔案:<?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="
Time of Update: 2018-12-05
在我的部落格中,上次是使用ViewPager實現左右滑動的效果的,請看文章:Android使用ViewPager實現左右滑動效果。 這次我來使用ViewFlipper實現這種效果,好了,先看看效果吧: 效果看完了就來實現這個效果。1.布局檔案主介面使用下面的布局:<?xml version="1.0" encoding="utf-8"?><FrameLayout
Time of Update: 2018-12-05
使用ViewPager用使用android的相容包,android-support-v4.jar。工程原始碼下載:點擊下載在res/layout下建立三個檔案first.xml,second.xml,third.xml,隨便加入一些控制項main.xml檔案的布局如下:<?xml version="1.0" encoding="utf-8"?><FrameLayout
Time of Update: 2018-12-05
文章目錄 1.首先使用Google的附加庫2.XML布局檔案3.主Activity中的代碼 Android版的QQ使用的是ViewPager實現的,主要是可以實現TabHost的介面,但功能比Tabhost更好,因為可以實現用手滑動實現介面的切換。QQ的如下: 下面我來實現這個效果工程下載:點擊下載1.首先使用Google的附加庫android-support-v4.jar,這個庫,點擊下載。2.XML布局檔案<?xml
Time of Update: 2018-12-05
//獲得NotificationManager執行個體String service=NOTIFICATION_SERVICE;NotificationManager nm=(NotificationManager)getSystemService(service);//執行個體化NotificationNotification n= new Notification();//設定狀態列顯示表徵圖int
Time of Update: 2018-12-05
北京時間5月7日訊息,據國外媒體報道,知情人士披露,戴爾正在考慮在將來的產品中採用Google Android作業系統的可行性。 周三,Bsquare Corp公司的一篇宣稱在為戴爾迷你筆記型電腦開發軟體的新聞稿引發了這一傳言。 該公司宣稱,已經找到了一種可以在“運行Google Android平台的戴爾迷你筆記型電腦”上使用Adobe視頻軟體的途徑。