android工具
yunzhonghe5786
这个作者很懒,什么都没留下…
展开
-
android 开发环境配置
android 开发工具+myeclipse+tomcat原创 2015-04-09 08:41:05 · 618 阅读 · 0 评论 -
字节,字符流转换工具
1、字节流转换为String /** * 将字节流转换为字符串 * @param is * @return */ private String getStringFromStream(InputStream is){ int len=0; byte[] b=new byte[1024]; ByteA原创 2016-09-08 16:56:23 · 719 阅读 · 0 评论 -
Github 开源代码
1、图片下载开源代码 github 上搜索 Smart-img-view原创 2016-09-08 16:55:08 · 992 阅读 · 0 评论 -
Android 回调函数callBack
1、声明 /** * 回调函数 * @param callBack */ public IPCallBack ipCallBack; public void callSocket( IPCallBack callBack) { this.ipCallBack=callBack;原创 2016-07-08 21:24:28 · 658 阅读 · 0 评论 -
Android Junit Test
1、在application manifest.xml 中注册 <instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.example.test" > </instrumentation> <app原创 2016-09-01 10:57:57 · 211 阅读 · 0 评论 -
Runable 周期任务
1、启动任务 handler.postDelayed(runnable, 500);// 打开定时器,执行操作 2、周期执行 Runnable runnable = new Runnable(){ @Override public void run() { if(k<4){ handler.postDel原创 2016-09-09 22:02:43 · 312 阅读 · 0 评论 -
android 延时实现
new Handler().postDelayed(new Runnable(){ public void run() { } }, 2000);原创 2016-07-31 16:36:01 · 174 阅读 · 0 评论 -
Eclipse 中查找
1、工具栏search 注意:filename为*原创 2016-07-20 14:51:55 · 149 阅读 · 0 评论 -
android R文件丢失
1、将出错的xml文件重新命名原创 2016-07-08 10:52:07 · 162 阅读 · 0 评论 -
App 版本信息等
package com.github.lazylibrary.util; /** * Copyright 2014 Zhenguo Jin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the L转载 2016-06-20 20:38:41 · 355 阅读 · 0 评论 -
JSON 解析
解析步骤 1)、读取html文件源代码,获取一个json字符串 InputStream in = conn.getInputStream(); String jsonStr = DataUtil.Stream2String(in);//将流转换成字符串的工具类2)、将字符串传入响应的JSON构造函数中 ①、通过构造函数将json字符串转换成json对象 JSONObjec转载 2016-06-19 09:46:54 · 197 阅读 · 0 评论 -
Android 经典知识集锦
android开发流程 http://www.jianshu.com/p/d6611c8bd45c?utm_campaign=maleskine&utm_content=note&utm_medium=pc_author_hots&utm_source=recommendation1、android eclipse 调试及快捷键大全 http://www.cnblogs.com/qingblog原创 2016-05-30 14:52:57 · 189 阅读 · 0 评论 -
android 工具1 ——9-patch
1、.9.png工具在android sdk 的tools文件夹中draw9patch.bat 2、使用方法 通过黑色边线来描述图片的拉伸情况和填充文字的方式 (1)上边线表示图片水平拉伸,左边线表示垂直拉伸 (2)右边线表示垂直填充区域,下边线表示水平填充区域原创 2016-04-08 14:44:57 · 203 阅读 · 0 评论 -
android dp和px转换
public class DensityUtils { /** * dp转px */ public static int dp2px(Context ctx, float dp) { float density = ctx.getResources().getDisplayMetrics().density; int px = (in原创 2016-03-29 14:40:54 · 238 阅读 · 0 评论 -
genymotion 极速模拟器
virturebox+genymotion +jarhttp://pan.baidu.com/disk/home#path=%252Fandroid%252Fandroid_tool原创 2015-11-30 14:00:58 · 147 阅读 · 0 评论 -
genymotion 极速模拟器
virturebox+genymotion +jarhttp://pan.baidu.com/disk/home#path=%252Fandroid%252Fandroid_tool原创 2015-11-30 14:00:58 · 397 阅读 · 0 评论 -
Markdown编辑器 使用指南
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl转载 2016-10-25 09:54:38 · 199 阅读 · 0 评论 -
android 常用工具
1、判断textview是否为空 TextUtils.isEmpty(str)原创 2016-04-07 20:56:11 · 417 阅读 · 0 评论 -
Android 开源项目汇总
1、Android 开源项目分类汇总 https://github.com/Trinea/android-open-project2、codekk http://p.codekk.com/原创 2017-01-11 17:17:30 · 205 阅读 · 0 评论 -
MD5 加密工具类
public class MD5Encoder { /** * MD5加密 * @param string * @return * @throws Exception */ public static String encode(String string) throws Exception { byte[] hash原创 2017-01-15 11:43:22 · 305 阅读 · 0 评论 -
SharedPreferences 和本地文件缓存类
public class CacheUtils { private static final String SP_NAME = "hefei_news"; public static void putBoolean(Context context, String key, Boolean value) { SharedPreferences sp = context.ge原创 2017-01-15 11:34:36 · 286 阅读 · 0 评论 -
android 常用的数据库语句
1、创建openhelper类 public class MyOpenHelper extends SQLiteOpenHelper {public MyOpenHelper(Context context) {super(context, "student.db", null, 3);}@Overridepublic void onCreate(SQLiteDatab原创 2016-03-09 21:58:08 · 549 阅读 · 0 评论 -
android 编译C生成so动态链接库
一、步骤 1、定义并调用本地方法 private native int add(int i,int j); 2、在根目录下创建jni文件夹 3、jni文件夹里创建c文件 #include jint Java_com_example_animationtest_MainActivity_add(JNIEnv *env,原创 2016-03-19 14:34:25 · 1425 阅读 · 0 评论 -
Activity 完全退出
方案一://activity管理工具类public class ActivityCollector { private static List<Activity> activityLists= new ArrayList<Activity>(); public static void addActivity(Activity activity){ activityLists.原创 2016-11-24 15:25:05 · 232 阅读 · 0 评论 -
px(像素)和dp转换工具类
px :是屏幕的像素点 dp :一个基于density的抽象单位,如果一个160dpi的屏幕,1dp=1pxpublic class DensityUtil { /** * 根据手机的分辨率从 dp 的单位 转成为 px(像素) */ public static int dip2px(Context context, float dpValue) {原创 2016-12-05 15:09:58 · 536 阅读 · 0 评论 -
Android设计模式之模板(抽象类abstract)
1、定义抽象模板public abstract class Formater { public **abstract** String formating(User user);//继承该类必须实现类中的抽象方法 public String FormaterUser(User user){ String result=""; beforeFormater转载 2016-11-22 16:38:51 · 1547 阅读 · 0 评论 -
Android设计模式之策略(接口interface)
转载自:http://blog.csdn.net/sinyu890807/article/details/8986285 1、定义接口public interface Calculator { //定义计算器接口 int calculator(int x,int y);}2、实现接口的功能public class Add implements Calculator{ @Overri转载 2016-11-22 17:09:25 · 286 阅读 · 0 评论 -
Android日志打印工具
单例模式下的日志打印工具 转载自:http://blog.csdn.net/guolin_blog/article/details/8860649public class LogUtil { private static LogUtil sLogUtil; public final int DEGUB = 0; public final int INFO = 1;转载 2016-11-22 10:24:32 · 220 阅读 · 0 评论 -
提取短信验证码
/** * Created by WSN-520 on 2016/12/1. */public class SmsObserver extends ContentObserver { private static final String TAG="SmsObserver"; private Context mContext; private Handler mHand原创 2016-12-01 20:54:38 · 458 阅读 · 0 评论 -
事件分发机制(一)
1、android 事件分发机制btnNext.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { return false; //事件此次不消费,传递给子控件消费 return原创 2016-09-29 19:01:25 · 176 阅读 · 0 评论 -
eclipse 关联android源码
百度经验 http://jingyan.baidu.com/article/0320e2c1ef046c1b86507b6f.html1、android 工程的properties android ——> Perject Build Target 选择版本,API 19 Java Build Path ——》 libraries原创 2016-09-29 11:06:58 · 266 阅读 · 0 评论 -
Android 常见问题及修复
1、Android sdk content loader 0%的解决方案 方法三(删掉.android): 关闭Eclipse,删掉C:\Users\用户名.android文件夹下的所有内容,再重启Eclipse。方法四(删掉Work Space下的.metadata.plugins\org.eclipse.core.resources.projects): 关闭Eclipse原创 2016-10-25 10:04:41 · 167 阅读 · 0 评论 -
svn+totoise版本控制
svn服务器端+totoise客户端版本控制操作指南原创 2015-07-02 22:00:18 · 425 阅读 · 0 评论 -
genymotion 极速模拟器
virturebox+genymotion +jarhttp://pan.baidu.com/disk/home#path=%252Fandroid%252Fandroid_tool原创 2015-11-30 14:00:58 · 150 阅读 · 0 评论 -
android 版本控制
1、7寸情景面板_2015.06.22 1、点击情景变色,发送情景命令 2、长按设置情景模式原创 2015-06-22 15:25:08 · 269 阅读 · 0 评论