`
文章列表
2014.02.11 ——— android volley 打包 参考:http://blog.csdn.net/superbinbin1/article/details/9336085 1、下载ant http://ant.apache.org/bindownload.cgi 解压到D盘 2、配置环境变量 2.1、配置ANDROID_HOME D:\android\adt-bundle-windows-x86-20130717\sdk 2.2、配置JAVA_HOME C:\Program Files\Java\jdk1.7.0_25 2.3、配置ANT_HOME D:\apache-ant- ...
2014.01.22 ——— GSON 参考:http://blog.csdn.net/lk_blog/article/details/7685190 主要说下GsonBuilder的用法 //注意这里的Gson的构建方式为GsonBuilder,区别于test1中的Gson gson = new Gson(); Gson gson = new GsonBuilder() .excludeFieldsWithoutExposeAnnotation() //不导出实体中没有用@Expose注解的属性 .ena ...
2014.01.21(2)——— android开发实例之viewpager无限循环+自动滚动 1、用到了一个开源库,但是没有用library的方式,我把代码内嵌进去了 详见:https://github.com/JakeWharton/Android-ViewPagerIndicator 2、关于无限循环 原理 http://www.cnblogs.com/xinye/archive/2013/06/09/3129140.html 不再细说 就说下代码中注意的 private void setData(){ mArrData.add(R.drawable.sam ...
2014.01.21 ——— android 关联android-support源码 参考:http://blog.csdn.net/xiaanming/article/details/9031141 总结一下: 1、在libs新建一个properties文件,名字和jar包名字一致,并且也带有jar后缀名 例如 你用到的是 android-support-v4.jar 那么 新建一个文件为 android-support-v4.jar.properties 2、properties内容 src=D:\\android\\adt-bundle-windows-x86-20130717\ ...
2014.01.16 ——— android 关于适配的工具类 import android.content.Context; import android.util.DisplayMetrics; import android.util.TypedValue; import android.widget.TextView; /** * 主要用于适配 * 最好都用px,这样计算的精确 */ public class UtilFit { //ui设计的时候 基于的屏幕的宽和高 private int mBaseWidth; pr ...
2014.01.16 ——— android 调整屏幕分辨率 参考:http://www.cnblogs.com/fanfeng/p/3263853.html 1、android4.3以上的版本 adb shell wm size 720x1280 adb shell wm size reset adb shell vm density 160 2、其他版本 adb shell am display-size 720x1280 adb shell am display-size reset 这个不能调整密度 对了,貌似是正能调整到比自己分辨率低的,高的我试了 没有反应
2014.01.14(2) ——— git学习之工具 我这边做android开发,git相关的工具 主要用三个 1、sourceTree 下载地址:http://www.sourcetreeapp.com/ 这个很直观的可以看到不同的分支,并且也能方便的比较代码, 然后还有命令行,我一般操作都是在这个命令行下执行的 2、egit 下载地址:http://www.eclipse.org/egit/ 这个是一个eclipse的插件,可以再eclipse里面明显的看出来那些文件修改了,也可以用来比较版本 3、Beyond compare 下载地址:http://dlsw.baidu.com/sw- ...
2014.01.14 ——— git学习之github 简单入门 参考:http://wuyuans.com/2012/05/github-simple-tutorial/ 1、首先在本地创建ssh key $ ssh-keygen -t rsa -C "your_email@youremail.com" 之后会要求确认路径和输入密码,我们这使用默认的一路回车就行。成功的话会在C:\Users\XXX\下生成.ssh文件夹,进去,打开id_rsa.pub,复制里面的key 接下来我们要做的就是把本地仓库传到github上去,在此之前还需要设置username和email ...
2014.01.13(2) ——— android listview fastScrollEnabled 参考:http://blog.csdn.net/java2009cgh/article/details/7301197 使用app的时候,经常见到如下所示的情况: 一直以为是自定义,原来listview里面已经有了 android:fastScrollEnabled="true" 或 mLst.setFastScrollEnabled(true); 就可以实现这个功能了,当然必须listview的item个数在4屏内显示不全的时候,才会出现右边的图片 ...
2014.01.13 ——— android 控制ScrollView滚动速度 参考:http://www.cnblogs.com/over140/archive/2011/10/06/2199891.html /** * 快/慢滑动ScrollView * @author 农民伯伯 * */ public class SlowScrollView extends ScrollView { public SlowScrollView(Context context, AttributeSet attrs, ...
2014.01.10 ——— android listview 记录和恢复位置 参考:http://stackoverflow.com/questions/3014089/maintain-save-restore-scroll-position-when-returning-to-a-listview 首先网上流行的方法http://www.linuxidc.com/Linux/2012-04/58601.htm,如这篇文章里面说的,第二种方法不精确,而第一种方法我试了不管用,getScrollX和getScrollY一直都是返回0的 靠谱的方法: 1、 private Parcel ...
2014.01.07 (2)——— android开源库之Android-PullToRefresh 下载地址:https://github.com/chrisbanes/Android-PullToRefresh 1、介绍一下xml属性 attrs.xml <resources> <declare-styleable name="PullToRefresh"> <!-- A drawable to use as the background of the Refreshable View --> ...
2014.01.07 ——— android开发实例之QuickActionBar 参考:https://github.com/cyrilmottier/GreenDroid 这个组件是类似于联系人里面点击头像的操作,用法如下: MainActivity package com.example.testquickactionbar; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; ...
2013.01.03 (2)——— android开发实例之仿QQExpandableListView 参考:http://blog.csdn.net/way_ping_li/article/details/9090793 自定义的ExpandableListView package com.example.testiphonetreeview; import android.content.Context; import android.graphics.Canvas; import android.util.AttributeSet; import android.view. ...
2014.01.03 ——— android ExpandableListView position和groupPosition之间的转换 ExpandableListView如何得到当前显示的第一个item的groupposition和childposition int tPostion = getFirstVisiblePosition();//得到当前显示的第一个item的position long flatPostion = getExpandableListPosition(tPostion );//转换为ExpandableListView特有的类似于position的东西 ...
Global site tag (gtag.js) - Google Analytics