工程结构 TabAFm到TabEFm都是Fragment,并且每个Fragment对应一个布局文件。TabAFm.java package com.yydcdut.tabhoststudy;import android.app.Activity;import android.os.Bundle;im...
分类:
移动开发 时间:
2014-08-08 23:58:16
阅读次数:
776
ActionBar-PullToRefresh是一个开源的下拉刷新控件,基于ActionBar的,在下拉时变化的是ActionBar,ActionBar的低端有横向滑动的进度条。
这里我记录一下我是如何使用它的。...
分类:
其他好文 时间:
2014-08-08 18:15:16
阅读次数:
336
工程架构 TabAFm到TabEFm都是Fragment,并且每个Fragment对应一个布局文件。TabAFm.java package com.yydcdut.viewpagerstudy;import android.app.Activity;import android.os.Bundle;...
分类:
移动开发 时间:
2014-08-08 15:17:26
阅读次数:
439
在上一篇关于ActionBar的博文中,我们知道了ActionBar是Android3.0的重要更新之一。本篇博文就来写一个开发中经常用到的例子。用ActionBar提供基于下拉的导航方式。
下拉式导航的ActionBar在顶端生成下拉列表框,当用户单击某个列表项时,系统根据用户单击导航指定Fragment。
为了使用ActionBar实现Tab导航,按如下步骤进行即可。
(1)调用Acti...
分类:
移动开发 时间:
2014-08-08 12:54:46
阅读次数:
221
1 在res/values/colors.xml#000000 #886C2A2 /res/color 定义文件 tab.xml3 res/values/styles.xml4 在同个文件style name="Theme.yourTheme" parent="@style/Theme.Sherlo...
分类:
移动开发 时间:
2014-08-08 01:51:25
阅读次数:
221
两个单独的Fragment是 不应该进行通信的,应该用他们所在的activity作为 通信的纽带。 为了实现 两个Fragment的交互,我们在Fragment中定义一个接口,然后在中定义 一个方法,在 Fragment的onAttach()方法中调用这...
分类:
其他好文 时间:
2014-08-07 13:35:50
阅读次数:
262
The action bar provides your users a familiar and predictable way to perform actions and navigate your app, but that doesn't mean it needs to look exactly the same as it does in other apps. If you want to style the action bar to better fit your product bra...
分类:
移动开发 时间:
2014-08-07 03:07:49
阅读次数:
605
要实现的就是类似于Actionbar标签的那种效果,底部有一条指示条。
实现代码:
实现的关键是写上android:top="-6dp" android:left="-6dp" android:right="...
分类:
移动开发 时间:
2014-08-06 02:02:40
阅读次数:
266
1问题:FragmentStatePagerAdapter+viewpager第二次进入该fragment不显示数据解决方法:在含有ViewPager的Fragment的onCreateView方法中添加代码:if(view!=null){ ViewGroupparent=(ViewGroup)view.getParent(); if(parent!=null){ parent.removeView(view); } ret..
分类:
移动开发 时间:
2014-08-05 22:56:31
阅读次数:
302