随笔分类 -  android

1 2 3 下一页
android:descendantFocusability用法简析
摘要:android:descendantFocusability Defines the relationship between the ViewGroup and its descendants when looking for a View to take focus. Must be one o 阅读全文
posted @ 2016-01-27 14:47 冲锋的路上的兵 阅读(557) 评论(0) 推荐(0)
问题集合
摘要:1.不同手机 获取手机相册相机问题 2.长图超出android标准无法显示 3.动态图问题 4.ScrollView和其他滑动控件冲突问题 5.动画卡顿问题 6.硬件加速 setlayertype 阅读全文
posted @ 2015-11-23 11:02 冲锋的路上的兵 阅读(163) 评论(0) 推荐(0)
Scoket 局域网广播收发
摘要:Scoket 局域网广播收发public class SocketGroup { public static final int MSG_SEND_SUCCESS = 0; public static final int MSG_SEND_FAILE = 1; public sta... 阅读全文
posted @ 2015-05-06 15:25 冲锋的路上的兵 阅读(389) 评论(0) 推荐(0)
android Fragment 内嵌套 ViewPage+Fragment
摘要:最近做了一个界面一个Fragment内嵌套ViewPage,ViewPage里显示多个Fragment,遇到问题的总结。1.在主Fragment初始化适配器要传的FragmentManager 必须是getChildFragmentManager()。 如果使用mActivity.getSuppor... 阅读全文
posted @ 2015-04-03 09:44 冲锋的路上的兵 阅读(950) 评论(0) 推荐(0)
ADT 安装ant
摘要:eclipse 原版是自带Ant的 ADT需要自己安装解决方法--->https://code.google.com/p/android/issues/detail?id=734271. Help -> Install New SoftWare2. Work With -> "http://down... 阅读全文
posted @ 2015-02-06 10:12 冲锋的路上的兵 阅读(460) 评论(0) 推荐(0)
PhoneGap3.0 环境搭建android Demo
摘要:今日由于项目要求,使用到PhoneGap,以下是PhoneGap的android 环境搭建:1、准备工作: (1)Nodo.js 环境,Java环境,android环境,PhoneGap环境,Ant环境,cordova环境(这个在配置PhoneGap环境会自动装)看到这么做的环境头都晕了,那么一... 阅读全文
posted @ 2014-12-28 01:16 冲锋的路上的兵 阅读(163) 评论(0) 推荐(0)
Wi-Fi广播监听
摘要:/** * Wifi广播接收 */ private BroadcastReceiver mNetworkStateReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Int... 阅读全文
posted @ 2014-11-10 17:07 冲锋的路上的兵 阅读(499) 评论(0) 推荐(0)
ScollerView 内嵌套 ListView
摘要:package com.bluedragonfly.widget;import android.content.Context;import android.util.AttributeSet;import android.view.View.MeasureSpec;import android.w... 阅读全文
posted @ 2014-10-28 16:26 冲锋的路上的兵 阅读(824) 评论(0) 推荐(0)
百度地图初始用只显示网格问题
摘要:1.Authentication Error errorcode: 102 uid: null appid -1 msg 这个错误说明你的当前运行的签名和百度申请的key不同2.Authentication Error errorcode: -1 uid: -1 appid -1 msg ........ 阅读全文
posted @ 2014-10-25 10:54 冲锋的路上的兵 阅读(503) 评论(0) 推荐(0)
不同进程访问”相同“资源
摘要:今天碰到一个服务在配置文件里android:process=":updataService" 是个独立的线程在Application里我有个SharedPreferences统一管理单例工具,当我在Service里访问并设置了一个SP(发现会new这个SP工具!!!)但在Application反问时... 阅读全文
posted @ 2014-09-24 17:14 冲锋的路上的兵 阅读(262) 评论(0) 推荐(0)
android 调用相册-照相机封装
摘要:把这两个功能封装起来,经常使用到。private static Uri photoUri; public static final int NONE = 0; public static final int PHOTOHRAPH = 1;// 拍照 public static final int P... 阅读全文
posted @ 2014-08-09 11:02 冲锋的路上的兵 阅读(460) 评论(0) 推荐(0)
Android 画个圆 淡入淡出
摘要:private class SimpleView extends ImageView{ int point_x; int point_y; int radius = 0; public SimpleView(Context c... 阅读全文
posted @ 2014-07-14 10:22 冲锋的路上的兵 阅读(456) 评论(0) 推荐(0)
One TextView More Style
摘要:String w = "The quick fox jumps over the lazy dog"; int start = w.indexOf('q'); int end = w.indexOf('k') + 1; Spannab... 阅读全文
posted @ 2014-06-26 16:15 冲锋的路上的兵 阅读(155) 评论(0) 推荐(0)
PullToRefreshGridView 刷新后如何回到顶部
摘要:直接上代码做记录,不多说gird.post(new Runnable() { @Override public void run() { gird.setSelection(0); } });mPull... 阅读全文
posted @ 2014-05-22 17:13 冲锋的路上的兵 阅读(433) 评论(0) 推荐(0)
openFd() -- it is probably compressed
摘要:把一些资源文件存在assets下用openFd打开文件有些文件会遇到错误原因是“文件不能打开,可能被压缩了”,网络搜索了许多,没有发现很好的解决方法。http://stackoverflow.com/questions/10141251/android-getassets-openfd-and-fi... 阅读全文
posted @ 2014-05-21 16:21 冲锋的路上的兵 阅读(489) 评论(0) 推荐(0)
ViewHolder的简易聪明写法
摘要:public class ViewHolder { // I added a generic return type to reduce the casting noise in client // code @SuppressWarnings("unchecked") public sta... 阅读全文
posted @ 2014-05-06 16:13 冲锋的路上的兵 阅读(185) 评论(0) 推荐(0)
Conversion to Dalvik format failed with error 1 解决方法
摘要:http://www.londatiga.net/it/programming/android/how-to-solve-error-conversion-to-dalvik-format-failed-with-error-1-in-android-on-export/ 阅读全文
posted @ 2014-03-24 15:04 冲锋的路上的兵 阅读(218) 评论(0) 推荐(0)
android 简单的反编译
摘要:http://blog.csdn.net/hr1986sd/article/details/8997392 阅读全文
posted @ 2013-11-26 16:46 冲锋的路上的兵 阅读(128) 评论(0) 推荐(0)
android ant打包问题总结
摘要:用Ant打包的好处就在于可以打多个渠道 常用的就是修改友盟的渠道号,而不需要每改一次输入一次keystore密码的繁琐过程。android 不知道在什么版本之后tools目录下就没有在apkbuilder.bat这个文件了,如果从别人那边 copy 过来也无法使用,提示“apkbuilder 不稳定... 阅读全文
posted @ 2013-11-21 15:41 冲锋的路上的兵 阅读(2495) 评论(3) 推荐(0)
android Sdcard 不同系统映射
摘要:Android Lint 有个关于在代码中硬编码“sdcard”路径的警告,内容为:不要硬编码(hardcode) “/sdcard/”; 使用 Environment.getExternalStorageDirectory().getPath() 替代sdcard路径详情参考: http://developer.android.com/guide/topics/data/data-storage.html#filesExternal以前的Android(4.1之前的版本)中,SDcard跟路径通过“/sdcard”或者“/mnt/sdcard”来表示,而在Jelly Bean系统中修改为了“ 阅读全文
posted @ 2013-10-14 14:31 冲锋的路上的兵 阅读(381) 评论(0) 推荐(0)

1 2 3 下一页