Android开发小技巧汇总
1.Android根据包名打开应用: public void startAPP(String appPackageName){ |
2.Android根据包名判断是否安装某个应用: public static boolean checkApkExist(Context context, String packageName) { |
3.Android检查是否有网络访问: public static boolean isNetworkAvaliable(Context context) { |
4.Android获取设置下面帐户信息: Account[] accounts = AccountManager.get(this).getAccounts();
记得添加权限:<uses-permission android:name="android.permission.GET_ACCOUNTS" /> |
5.监听ListView滑动到底部: listview.setOnScrollListener(new OnScrollListener(){
|