摘要: 主要参考:http://blog.csdn.net/zhaokaiqiang1992/article/details/40371031 http://www.open-open.com/lib/view/open1405218387226.html 1、导入 library 2、继承 Sl... 阅读全文
posted @ 2016-03-21 20:55 云中鹤5786 阅读(782) 评论(0) 推荐(0) 编辑
摘要: 一、定义 /** * @类名 BaseFragment * @创建者 ppa * @创建时间 2016-3-21 * @描述 TODO */ public abstract class BaseFragment extends Fragment { public Ac... 阅读全文
posted @ 2016-03-21 20:41 云中鹤5786 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1、常规代码 SharedPreferences sp = getSharedPreferences("config",MODE_PRIVATE); sp.edit().putBoolean("is_guide_showed",true).commit(); SharedPreference... 阅读全文
posted @ 2016-03-21 14:41 云中鹤5786 阅读(115) 评论(0) 推荐(0) 编辑
摘要: class GuideAdapter extends PagerAdapter{ @Override public int getCount() { return mImages.length; } @Override public boolean... 阅读全文
posted @ 2016-03-21 14:06 云中鹤5786 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 一、主流屏幕 1280*720 二、常见适配方法 1、图片适配 2、布局适配 layout-800x480 values-1280x720 dimen 定义不同屏幕尺寸 3、尺寸适配 dp=px ... 阅读全文
posted @ 2016-03-19 21:45 云中鹤5786 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 一、步骤 1、定义并调用本地方法 private native int add(int i,int j); 2、在根目录下创建jni文件夹 3、jni文件夹里创建c文件 #include jint Java_com_exampl... 阅读全文
posted @ 2016-03-19 14:34 云中鹤5786 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 一、添加指示点 1、用xml文件设置selecet方式的state_enable=true/false属性 2、用2个xml文件设置shape形式 二、实现无限循环滑动 1、设置中间值 int dex=Integer.MAX_VALUE/2-... 阅读全文
posted @ 2016-03-18 11:07 云中鹤5786 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 一、实现的思路 1、获取网络地址path 2、建立url对象 3、建立url连接conn 4、设置conn的连接方法 5、获取conn的输入流 7、new一个byte[] 数组 8、建立一个本地的文件File,并获取file的outputstream 9、用outputstream将... 阅读全文
posted @ 2016-03-17 15:50 云中鹤5786 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 一、条件: 1、访问网络权限 2、访问网络需另开线程 3、获取网络资源后需用handmsg辅助线程刷新页面 二、代码: 1、确定网址 String path="http://192.168.2.101:8080/ppa_web/i... 阅读全文
posted @ 2016-03-17 11:09 云中鹤5786 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1、定义style.xml文件 2、在控件中引用 阅读全文
posted @ 2016-03-17 08:44 云中鹤5786 阅读(127) 评论(0) 推荐(0) 编辑