将margin设为负值,一般-8dp差不多


为什么?求解释!

当android:orientation="horizontal"   与 android:layout_gravity =“right”一起用的时候不能完全居右

注意 只有android:orientation="vertical"  才能完全居右


且android:layout_gravity  是针对LinearLayout布局


而 android:layout_alignParentRight="true" 是相对于RelativeLayout


在实际开发种LayoutInflater这个类还是非常有用的,它的作用类似于 findViewById(), 不同点是LayoutInflater是用来找layout下xml布局文件,并且实例化!而findViewById()是找具体xml下的具体 widget控件(如:Button,TextView等)。

关于android 静态接口实例化: http://blog.csdn.net/yzw2013/article/details/17637701

ViewPager


Overview

ViewPager一般是和Fragment联合使用,Fragment提供一个方便的方法来提供和管理每一个page 的生命周期。对于ViewPager 的Fragment 有标准的Adapter : FragmentPagerAdapter 和 FragmentStatePagerAdapter。


PagerAdapter

When you implement a PagerAdapter, you must override the following methods at minimum:

  • instantiateItem(ViewGroup, int)
  • destroyItem(ViewGroup, int, Object)
  • getCount()
  • isViewFromObject(View, Object)

更多相关文章

  1. Android(安卓)UI设计模式实例代码
  2. gridview实例
  3. ProgressBar的使用实例
  4. Android计算器开发实例
  5. Activity XML 属性详解
  6. Android的设计模式-单例模式
  7. 《Android实例剖析笔记》系列文章
  8. 《Android实例剖析笔记》系列文章
  9. 《Android实例剖析笔记》系列文章

随机推荐

  1. 北京android待遇 月薪过万秘籍分享
  2. linux下android开发环境的配置
  3. android 开源项目集锦
  4. ubuntu android 调用 动态链接库
  5. Android布局优化
  6. android button 自定义
  7. Android Design版微信首度亮相:微信的一小
  8. Android之Android(安卓)Studio三种方式导
  9. Android图像处理技术(实现Android中的PS)(一
  10. Android点击WebView网页中的email发送邮