編輯:關於Android編程
方法一:
boolean isMyLauncherDefault() { final IntentFilter filter = new IntentFilter(Intent.ACTION_MAIN); filter.addCategory(Intent.CATEGORY_HOME); Listfilters = new ArrayList (); filters.add(filter); final String myPackageName = getPackageName(); List activities = new ArrayList (); final PackageManager packageManager = (PackageManager) getPackageManager(); // You can use name of your package here as third argument packageManager.getPreferredActivities(filters, activities, null); for (ComponentName activity : activities) { if (myPackageName.equals(activity.getPackageName())) { return true; } } return false; }
public boolean isMyAppLauncherDefault() { IntentFilter filter = new IntentFilter(Intent.ACTION_MAIN); filter.addCategory(Intent.CATEGORY_HOME); Listfilters = new ArrayList (); filters.add(filter); // the packageName of your application String packageName = getPackageName(); List preferredActivities = new ArrayList (); final PackageManager packageManager = (PackageManager) getPackageManager(); // You can use name of your package here as third argument packageManager.getPreferredActivities(filters, preferredActivities, packageName); if (preferredActivities != null && preferredActivities.size()> 0) { return true; } return false; }
http://www.android-ios-tutorials.com/225/get-default-launcher-pogrammatically-android/
http://stackoverflow.com/questions/10188954/start-launcher-selection-programmatically-android
前言水波紋特效,想必大家或多或少見過,在我的印象中,大致有如下幾種: 支付寶 咻咻咻 式  
看過《Android開發藝術探索》View的繪制源碼之後,裡面在講解繪制最開始執行的方法是ViewRootImpl裡面的performTraversals,覺得有點費解,
時不時的我們就會發現,一些我們常見的應用,比如某寶,某東,在一些特殊的日子中,比如雙十一,元旦,為了迎合這樣一個日子的氣氛,在桌面的應用圖標就會發生改變,其實對於這樣的一
前言:最近做基於openfire聊天(仿QQ、微信)翻頁查看聊天記錄,為此做了根據時間倒序查看聊天記錄,先聲明這demo是根據id來倒序(原理和時間倒序一樣) 1,主界面