什么是Fragment 自从Android 3.0中引入fragments 的概念,根据词海的翻译可以译为:碎片、片段。其目的是为了解决不同屏幕分辩率的动态和灵活UI设计。大屏幕如平板小屏幕如手机,平板电脑的设计使得其有更多的空间来放更多的UI组件,而多出来的空间存放UI使其会产生更多的交互,从而....
分类:
移动开发 时间:
2014-08-18 20:02:42
阅读次数:
451
Fragments 是android3.0以后添加的。主要是为了方便android平板端的开发。方便适应不同大小的屏幕。此代码是为了最简单的Fragment的使用,往一个Activity中添加Fragment,主要涉及的知识点有:1、Fragment类的创建,2、Fragment的添加3、无UI的 ...
分类:
移动开发 时间:
2014-08-18 18:28:53
阅读次数:
275
ViewPager是android的support库中的一个控件,也是一个在许多应用开发中都用得比较多的控件。目前为止,对ViewPager的使用,我一般是用ViewPager + Fragment的组合,偶尔也有ViewPager加View的组合。关于ViewPager + Fragment的使用,已经有FragmentAdapter的实现可以帮助我们快速进行开发了,但是每次使用ViewPage...
分类:
其他好文 时间:
2014-08-18 16:22:32
阅读次数:
198
近期刚学了Fragment,突然想在Fragment中实现TabHost,查阅相关资料后发现现在TabHost已经被FragmentTabHost替代了,因此就想着学习一下,并记录下来,接下来把一些心得分享一下。一、使用场景首先FragmentTabHost不仅可以在FragmentActivity中使用,也可以在Fragment中使用,..
分类:
其他好文 时间:
2014-08-17 01:12:32
阅读次数:
170
Activity 保存状态1. void onCreate(Bundle savedInstanceState)当Activity被第首次加载时执行。我们新启动一个程序的时候其主窗体的onCreate事件就会被执行。如果Activity被销毁后(onDestroy后),再重新加载进Task时,其on...
分类:
其他好文 时间:
2014-08-16 16:23:50
阅读次数:
150
本文是由英文帮助翻译所得:“任务流 task flows”可以包括非可视化的组件,比如方法调用。“页片段 page fragment”可以运行在一个页面的某个局部区域,最大限度地提高复用性。ADF Task Flow是在JSF Controller的基础上扩展而来的,它除了包括View Activi...
分类:
其他好文 时间:
2014-08-15 12:36:18
阅读次数:
413
1.FrameAnimation原理:多个关键帧按照顺序快速(100毫秒)切换三个要素:图片/顺序/时间2.TweenAnimation原理:系统通过改变View的大小位置角度透明度code和xml创建Animationxml:简单,不可动态改变code:灵活,可以动态改变缺点:只是视图上改变了控件,控件实际的位置不变3.P..
分类:
其他好文 时间:
2014-08-15 02:55:27
阅读次数:
175
When designing your application to support a wide range of screen sizes, you can reuse your fragments in different layout configurations to optimize the user experience based on the available screen space.
For example, on a handset device it might be appr...
分类:
移动开发 时间:
2014-08-15 01:33:26
阅读次数:
344
In order to reuse the Fragment UI components, you should build each as a completely self-contained, modular component that defines its own layout and behavior. Once you have defined these reusable Fragments, you can associate them with an Activity and conn...
分类:
移动开发 时间:
2014-08-15 01:33:16
阅读次数:
333