Android全屏以幻燈片方式展示圖片:Android-ScreenSlidePager

通過Picasso從互聯網取得圖片,然后全屏幻燈片方式展示。

demo


The indicator at the bottom of ScreenSlidePager has been extracted as an aar. Your can add it to your dependecies to use it independently.

Gradle

compile 'com.liangfeizc:SlidePageIndicator:1.0.0@aar'

Maven

<dependency>
    <groupId>com.liangfeizc</groupId>
    <artifactId>SlidePageIndicator</artifactId>
    <version>1.0.0</version>
    <type>aar</type>
</dependency>

how to use

CirclePageIndicatorandViewPagershoud be used as child views of aFramelayout. But here we usedmergeinstead, because the root view in any activity is aFrameLayout. You can useandroid:gravityto position theCirclePageIndicatorand useapp:indicator_spacingto adjust the spacing between two adjencent circle indicators.

<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    <com.liangfeizc.slidepageindicator.CirclePageIndicator
        android:id="@+id/indicator"
        android:gravity="bottom|center_horizontal"
        app:indicator_spacing="5dp"
        android:layout_marginBottom="20dp"
        android:layout_marginStart="20dp"
        android:layout_marginLeft="20dp"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</merge>


dependencies

項目主頁:http://www.baiduhome.net/lib/view/home/1429774250838


 本文由用戶 ngww 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!