原创 Eclipse打不開。The Eclipse executable launcher was unable to

Eclipse出現“The Eclipse executable launcher was unable to locate its companion shared library”錯誤的解決方法如下:    一、打開eclip

原创 android.intent.category以及android.intent.action.MAIN

轉自:http://blog.csdn.net/bage1988320/article/details/6583324 一. android.intent.category.LAUNCHER與android.intent.catego

原创 list.ensureCapacity()的作用

 我們在使用Arraylist時,經常要對它進行初始化工作,在使用add()方法增加新的元素時,如果要增加的數據量很大,應該使用ensureCapacity()方法,該方法的作用是預先設置Arraylist的大小,這樣可以大大提高初始化速

原创 讓兩個HorizontalScrollView聯動

有這樣一個需求(相信股票列表會用的比較多,呵呵),需要當其中一個HorizontalScrollView滾動的時候另一個HorizontalScro

原创 Android 裏面的android_secret_code

原文:http://blog.csdn.net/learnrose/article/details/6223048; 在android的手機裏,進入撥號程序,輸入*#*#4636#*#* 可以看到一個測試應用。   查看Phone

原创 ContentObserver

轉自:http://blog.csdn.net/qinjuning/article/details/7047607            前言: 工作中,需要開啓一個線程大量的查詢某個數據庫值發送了變化,導致的開銷很大,後來在老大的

原创 如何使用android-support-V7包中ActionBar(Eclipse版)

以前3.0以前的版本要使用ActionBar,必須使用國外大牛寫的ActionBarSherlock這個開源項目。今年的Google/IO大會之後,Google官方在android-support-v7包中添加了ActionBar,開始

原创 Gridview的stretchMode詳解附自動寬度

<GridView android:id="@+id/grid" android:layout_width="fill_parent" android:layout_height="fill_parent" android:vertica

原创 ADT在線安裝(http://dl-ssl.google.com/android/eclipse 打不開)

以往安裝ADT根本就不是個問題,可是現在就是個大問題了,聯通的寬帶網絡連www.google.com.hk都打不開,你叫我們這些P民怎麼活?  https://dl-ssl.google.com/android/eclipse  htt

原创 android中dip、dp、px、sp和屏幕密度

     dip: device independent pixels(設備獨立像素). 不同設備有不同的顯示效果,這個和設備硬件有關,一般我們爲了支持WVGA、HVGA和QVGA 推薦使用這個,不依賴像素。       px: pix

原创 Intent的FLAG_ACTIVITY_CLEAR_TOP和FLAG_ACTIVITY_REORDER_TO_FRONT

Activity的兩種啓動模式:FLAG_ACTIVITY_CLEAR_TOP和FLAG_ACTIVITY_REORDER_TO_FRONT   1. 如果已經啓動了四個Activity:A,B,C和D。在D Activity裏,我們要

原创 android Launcher基礎知識

轉自:http://blog.csdn.net/xianming01/article/details/7678050    本文將www.bangchui.org網絡中的《android手把手教你開發launcher》系列文章進行了整

原创 android PorterDuffXfermode ,PorterDuff.Mode 使用 以及Porter-Duff規則詳解

轉自:http://www.cnblogs.com/jacktu/archive/2012/01/02/2310326.html 1.下面的Xfermode子類可以改變這種行爲: AvoidXfermode  指定了一個顏色和容差,

原创 android 撥號啓動祕密app 無界面 receiver

至少在API=8,android還是支持無界面app的,比如一個app只有一個receiver,實現特定的功能;但到至多android 4.0已經默認不支持這樣只有一個receiver的app了,即app必須具有activity,至於系統

原创 Java多線程中join方法的理解

轉自http://uule.iteye.com/blog/1101994 thread.Join把指定的線程加入到當前線程,可以將兩個交替執行的線程合併爲順序執行的線程。比如在線程B中調用了線程A的Join()方法,直到線程A執行完畢