視差效果:RealParallaxAndroid
視差效果:RealParallaxAndroid 。背景圖為一張圖片的實景視差效果。

使用說明:
<com.github.hmallet.realparallaxandroid.RealHorizontalScrollView android:id="@+id/main_horizontal_scrollview" android:layout_width="match_parent" android:layout_height="match_parent" app:src="@mipmap/background"/><com.github.hmallet.realparallaxandroid.RealViewPager android:id="@+id/main_view_pager" android:layout_width="match_parent" android:layout_height="match_parent" app:parallaxVelocity="0.2"/></pre>
RealHorizontalScrollView自定義屬性
-
app:src
RealViewPager自定義屬性
-
parallaxVelocity float to manage parallax effect
Gradle
build.gradle:
dependencies { compile 'com.github.hmallet:realparallaxandroid:1.0.1' }
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!