模仿2014 google io写的一个parallax view

jopen 9年前

介绍:

模仿2014 google io写的一个parallax view ,下拉缩放,上滚固定头部。

运行效果:

./slide.gif

使用说明:

在gradle.build中加入

compile 'me.biubiubiu.googleioview:library:1.0'

在xml中配置

<me.biubiubiu.iolistview.library.GoogleIOView      xmlns:android="http://schemas.android.com/apk/res/android"      xmlns:app="http://schemas.android.com/apk/res-auto"      android:layout_width="match_parent"      android:layout_height="match_parent"      app:parallax_color="#66ccff"      />

设置背景图片

    GoogleIOView ioView = (GoogleIOView) findViewById(R.id.io);      ioView.getImageBackground().setImageResource(R.drawable.go_lang_item);

设置背景颜色

    app:parallax_color="#66ccff"

设置标题内容

    ioView.setTitle("hongbosb");

项目主页:http://www.open-open.com/lib/view/home/1427959868365