GIthub开源项目实现翻页效果(FlipView)
来源:互联网 发布:vscode 快捷键 编辑:程序博客网 时间:2024/05/16 06:13
Github项目地址:https://github.com/openaphid/android-flip
效果图一:
效果图二:
先看一下,使用是多么简单,首先有两个布局。
布局一:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@android:color/white"><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="24dip" android:text="@string/first_page_title" android:background="@android:color/white" android:textColor="@android:color/black" android:textStyle="bold"/><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" android:layout_marginTop="8dp" android:textSize="16dp" android:background="@android:color/white" android:textColor="@android:color/black" android:text="@string/first_page_description"/><ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:color/white" android:src="@drawable/aphid_logo"/></LinearLayout>
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@android:color/white"><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="24dip" android:text="@string/second_page_title" android:background="@android:color/white" android:textColor="@android:color/black" android:shadowColor="@android:color/background_light" android:shadowDx="2" android:shadowRadius="5"android:textStyle="bold"/><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" android:layout_marginTop="8dp" android:textSize="16dp" android:background="@android:color/white" android:textColor="@android:color/black" android:text="@string/second_page_description"/><ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:color/white" android:src="@drawable/aphid_kid"/></LinearLayout>
然后看在MainActivity里面是如何使用的
<span style="font-family: Arial, Helvetica, sans-serif;">private FlipViewGroup contentView;//声明ViewGroup</span>
/** * Called when the activity is first created. */@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setTitle(R.string.activity_title);contentView = new FlipViewGroup(this);//初始化ViewGroup//将布局添加到ViewGroup中contentView.addFlipView(View.inflate(this, R.layout.second_page, null));contentView.addFlipView(View.inflate(this, R.layout.first_page, null));setContentView(contentView);contentView.startFlipping(); //make the first_page view flipping}
- GIthub开源项目实现翻页效果(FlipView)
- android 上下翻页效果(FlipView)
- Aphid FlipView Demo 折叠翻页效果
- 亲 谁知道有android电子书翻页效果可运行的Demo,或github开源项目
- Android开源项目分类汇总(四)TextView、ScrollView、TimeView、TipView、FlipView
- Android 实现书籍翻页效果(原理)
- 通过手势(GestureDetector)实现翻页效果
- viewpager实现翻页效果(fragment)
- PagerView实现翻页效果
- 实现Ajax翻页效果
- js实现翻页效果
- Android实现翻页效果
- transform3D实现翻页效果
- 翻页效果实现
- js翻页效果实现
- Android 开源项目android-open-project解析之(三) ScrollView,TimeView,TipView,FlipView
- 网页翻页效果的实现
- 纯CSS实现翻页效果
- user32大全
- php面试题汇总二
- 实现网页布局的自适应
- Android Studio 1.2版安装设置图文教程
- iOS开发之Xcode6之后不再自动创建Pch预编译文件
- GIthub开源项目实现翻页效果(FlipView)
- 【WinForm】创建自定义控件
- 专家解读政府购买服务热点
- Cross-compiling C++11 without going mad(der)
- List单链表实现
- java date
- struts2 标签s:select在table中单行显示
- vc2008中ProEssentials控件使用
- 345. Reverse Vowels of a String