
Android
啪啪
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Android 使用懸浮視窗
1. 在Activity 啟動 Service startService(new Intent(this, FloatingShortcutService.class)); android:name="com.yenhsun.floatingshortcut.FloatingShortcutService" /> 2. 加入 permission 3. 設定 params原创 2013-08-04 00:21:45 · 1100 阅读 · 0 评论 -
Android IDE
https://play.google.com/store/apps/details?id=com.aide.ui&hl=en super cool原创 2013-09-24 14:30:30 · 607 阅读 · 0 评论 -
Android objectAnimator
v.setPivotX(v.getWidth()* 1.05f); AnimatorSet rtn = new AnimatorSet(); rtn.play(ObjectAnimator.ofFloat(v, View.SCALE_X, sx, fx)).with( ObjectAnimator.ofFloat(v, View.SC原创 2013-09-18 11:08:39 · 722 阅读 · 0 评论 -
Android alertDialog
public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper( getActivity(), android.R.style.Theme_De原创 2013-09-17 17:06:18 · 552 阅读 · 0 评论 -
Android applications state
String pkgName = getPackageName(); boolean isBuildIn = false; boolean isSigned = false; boolean isDownload = false; try { PackageInfo pk原创 2013-09-16 17:21:25 · 956 阅读 · 0 评论 -
run android unit test
adb shell pm list instrumentation adb shell am instrument -w原创 2013-09-16 15:29:58 · 484 阅读 · 0 评论 -
Simple lru cache
public class LruCache extends LinkedHashMap { private int mCacheSize = 30; // as default private int mEvict = 0; public AsusLruCache(int cacheSize) { mCacheSize = c原创 2013-09-05 14:43:46 · 508 阅读 · 0 评论 -
Android 判斷 app 安裝在external storage
List packages; PackageManager pm = getPackageManager(); packages = pm.getInstalledApplications(0); for (ApplicationInfo p : packages) { boolean isInternal = (p.flag原创 2013-09-03 13:54:01 · 803 阅读 · 0 评论 -
get different locale application label
private boolean getApplicationLabel(ApplicationInfo target, Locale defaultLocale) throws NameNotFoundException { Resources appResource = null; Locale previousLocale = null;原创 2013-09-06 10:54:06 · 571 阅读 · 0 评论 -
Send email from Android device
Intent email = new Intent(Intent.ACTION_SEND); email.putExtra(Intent.EXTRA_EMAIL, new String[]{"emailYouWantToSend@gmail.com"}); email.putExtra(Intent.EXTRA_SUBJECT, "subject原创 2013-08-24 14:06:02 · 597 阅读 · 0 评论 -
Android unlock screen
import android.os.Bundle; import android.os.PowerManager; import android.app.Activity; import android.app.KeyguardManager; import android.app.KeyguardManager.KeyguardLock; import android.content.Conte原创 2013-08-04 00:12:06 · 1133 阅读 · 0 评论 -
拿到Android 手機 Sqlite 設置
import java.util.ArrayList; import android.app.Activity; import android.content.Context; import android.database.DatabaseUtils; import android.database.sqlite.SQLiteDatabase; import android.database.s原创 2013-08-03 19:03:48 · 549 阅读 · 0 评论 -
Android 拿到所有 Launcher app icon
Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); List packages = pm.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED); for (ResolveInf原创 2013-08-03 18:48:44 · 1304 阅读 · 0 评论 -
Android application usage time
用電話撥打 *#*#4636#*#* 就會出現一個神秘的 google 測試框架,在繼續深入追查會發現系統有 service 紀錄app的使用時間跟次數,詳細請看下面的source code。 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/1.原创 2013-09-28 02:34:36 · 632 阅读 · 0 评论