展会信息港展会大全

代码片段 支持滚动时Item淡入淡出,平...
来源:互联网   发布日期:2016-01-14 11:29:06   浏览:2246次  

导读:com.flavienlaurent.discrollview.lib.DiscrollView xmlns:android=http://schemas.android.com/apk/res/android xmlns:discrollve=http://schemas.android.com/apk/res-auto android:layout_width=match_parent android:layout_height=match_parent com.fla...

<com.flavienlaurent.discrollview.lib.DiscrollView

xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:discrollve="http://schemas.android.com/apk/res-auto"

android:layout_width="match_parent"

android:layout_height="match_parent">

<com.flavienlaurent.discrollview.lib.DiscrollViewContent

android:layout_width="match_parent"

android:layout_height="match_parent">

<TextView

android:layout_width="match_parent"

android:layout_height="600dp"

android:background="@android:color/white"

android:textColor="@android:color/black"

android:padding="25dp"

android:textSize="72sp"

android:gravity="center"

android:fontFamily="serif"

android:text="Do you love cheese?" />

<View

android:layout_width="match_parent"

android:layout_height="200dp"

android:background="#007788"

discrollve:discrollve_alpha="true"

discrollve:discrollve_threshold="0.3" />

<ImageView

android:layout_width="200dp"

android:layout_height="120dp"

discrollve:discrollve_alpha="true"

discrollve:discrollve_translation="fromLeft|fromBottom"

android:src="@drawable/cheese1" />

<View

android:layout_width="match_parent"

android:layout_height="200dp"

discrollve:discrollve_fromColor="#88EE66"

discrollve:discrollve_toColor="#000000" />

<ImageView

android:layout_width="220dp"

android:layout_height="110dp"

android:layout_gravity="right"

android:src="@drawable/cheese2"

discrollve:discrollve_translation="fromRight" />

<TextView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:padding="20dp"

android:fontFamily="serif"

android:gravity="center"

android:text="When the cheese comes out everybody's happy pecorino red leicester"

android:textSize="18sp"

discrollve:discrollve_alpha="true"

discrollve:discrollve_translation="fromBottom" />

<ImageView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_margin="20dp"

android:layout_gravity="center"

android:src="@drawable/ilovecheese_heart"

discrollve:discrollve_scaleX="true"

discrollve:discrollve_scaleY="true"/>

</com.flavienlaurent.discrollview.lib.DiscrollViewContent>

</com.flavienlaurent.discrollview.lib.DiscrollView>

compile 'com.github.flavienlaurent.discrollview:library:0.0.2@aar'

赞助本站

人工智能实验室

相关热词: android开发 android教程

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港