相同的ListFragment 带有一个无参构造
一个有参构造在该Fragment所依附的Activity视图创建时被实例化一次
方法周期分别为1.无参构造2.onInflate3.onAttach4.onCreate5.onCreateView6.onViewCreated7.onActivity...
分类:
其他好文 时间:
2014-05-24 06:03:47
阅读次数:
241
一、我们可以使用ViewPager做什么:
1、ViewPager制作APP第一次使用时出现的导航介绍,外加底部圆点的效果,比如微信等很多导航。
2、页卡滑动,加上菜单的效果,一般这些都支持手势也支持底部图标点击。
3、ViewPager+Fragment可以做出多页面滑动效果,让我们的应用程序界面操作起来更加灵活。
先看看几个效果图:
1、使用导航,外加底部圆点的效果,比如新浪。
...
分类:
移动开发 时间:
2014-05-23 08:06:22
阅读次数:
310
这里果然是有一个数组ArrayList在管理,ArrayList是啥?是动态数组,这就意味着他是可以动态添加的,不是栈,所以里面的Fragments可以随便获取以及插入。...
分类:
其他好文 时间:
2014-05-20 16:25:38
阅读次数:
277
package com.dhy.phonedial;
import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflate...
分类:
移动开发 时间:
2014-05-18 15:58:42
阅读次数:
342
原文出自:方杰|http://fangjie.sinaapp.com/?p=141 转载请注明出处
学习Android也有一段时间了,感觉大部分的Android应用都有很多类似的组件,所以就打算做了这样一个开源项目,目的是整合一些Android开发常用的组件Demo,方便以后项目中直接拿来用。git地址:https://github.com/JayFang1993/AndroidUtil
...
分类:
移动开发 时间:
2014-05-18 06:06:04
阅读次数:
395
异常类型为:android.view.WindowManager$BadTokenException:
Unable to add window
我在fragment中public
View onCreateView(LayoutInflater
inflater, ViewGroup
container,Bundle
savedInstanceState) {中试图调用对话框静态工...
分类:
其他好文 时间:
2014-05-18 04:27:35
阅读次数:
240
简介:为什么要用Fragment?使用Fragment可以在一个Activity中实现不同的界面。Fragment与Fragment之间的动画切换,远比Activity与Activity之间的动画切换变化方式多。很多时候,我们通过使用一个Activity,切换多个Fragment。本次博客,主要列举一下Fragment与它的Activity之间进行数据交换的方式。1.Fragment中通过getA...
分类:
移动开发 时间:
2014-05-18 02:53:20
阅读次数:
426
控制焦点Focus on Control 的取值:Alternative
fragment(denoted “alt”) 与 if…then…else对应Option fragment (denoted “opt”) 与
Switch对应Parallel fragment (denoted “par...
分类:
其他好文 时间:
2014-05-17 22:05:02
阅读次数:
298