这篇文章解决了在StackOverflow上一个经常被提到的问题。在配置发生变化(Configuration changs)时,什么是最好的保存活动对象方法,比如运行中的线程,Sockets,AsyncTask。要回答这个问题,我们要先讨论一些开发者在Activity生命周期中使用长时间后台任务时遇...
分类:
其他好文 时间:
2014-11-24 08:37:00
阅读次数:
143
Fragment切换
/**
** Fragment切换
@Params toFragment 将要切换到的Fragment
resId 装载Fragment的view Id
index Fragment的标识index
toleft 判断Fragment向左切换还是向右切换,以采用不同的动画
Notes: R.anim.push_left_...
分类:
移动开发 时间:
2014-11-23 20:17:54
阅读次数:
248
Fragment的使用越来越普遍了,掌握它的生命周期以及注意事项时非常有必要的,首先
All subclasses of Fragment must include a public empty constructor. The framework will often re-instantiate a fragment class when needed, in particular duri...
分类:
其他好文 时间:
2014-11-23 17:37:26
阅读次数:
223
仿制Google+的ActionBar跟随ListView滑动而隐藏或弹出...
分类:
移动开发 时间:
2014-11-23 14:32:36
阅读次数:
297
ViewPager+Fragment的简单讲解...
分类:
其他好文 时间:
2014-11-22 17:33:58
阅读次数:
202
ActionBar:getActionBar().getHeight();StatusBar: /** * 获取状态栏高度 * * @return */ public static int getStatusBarHeight(Context ...
分类:
移动开发 时间:
2014-11-21 23:03:54
阅读次数:
702
Android UI-SlidingMenu侧滑菜单效果 本篇博客给大家分享一个效果比较好的侧滑菜单的Demo,实现点击左边菜单切换Fragment。 效果如下: 主Activity代码:package com.infzm.slidingmenu.demo;
import android.os.Bundle;
import android.support.v4.app.Fragment;
...
分类:
移动开发 时间:
2014-11-21 20:38:43
阅读次数:
306
直接看效果图附上源码下载地址:http://www.eoeandroid.com/thread-554491-1-1.html
分类:
其他好文 时间:
2014-11-21 20:08:52
阅读次数:
181
来美图入职有几天了,刚拿到需求,看了一下所需要的actionbar,得,自定义的还没用过。。。赶紧脑补脑补,//ActionBar加载自定义布局的代码封装publicvoidsetActionBarLayout(intlayoutId){ActionBaractionBar=getActionBar();if(null!=actionBar){//隐藏图标actionBar.setDisp..
分类:
其他好文 时间:
2014-11-21 16:42:46
阅读次数:
251