Skip to content
PageRecyclerView achieves page turning function and unlimited carousel
Java
Branch: master
Clone or download
Latest commit 5581a22 Sep 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
apk 更新apk Sep 11, 2019
app 优化代码 Sep 8, 2019
pageview
screenRecorder 添加qq群二维码 Nov 14, 2018
.gitignore Initial commit Jan 15, 2018
LICENSE Create LICENSE Jan 15, 2018
README-ZH.md 发布PageView:1.2.8 Sep 8, 2019
README.md 发布PageView:1.2.8 Sep 8, 2019
build.gradle 1.发布PageView:1.2.2 Jul 15, 2018
config.gradle release:发布pageView:1.2.7 May 15, 2019
gradle.properties 1.发布PageView:1.2.2 Jul 15, 2018
gradlew Initial commit Jan 15, 2018
gradlew.bat Initial commit Jan 15, 2018
settings.gradle 1.移除itemanimator library Apr 6, 2018

README.md

PageRecyclerView

PageRecyclerView achieves page turning function and unlimited carousel 中文文档

Effect

carousel horizontal-grid-paging add-data
remove-data vertical-linear-paging

Demo

Download APK

Dependencies

add dependencies:

	dependencies {
		implementation 'ckrjfrog.Page:PageView:1.2.8'//gradle plugin 3.0(inclusive) above used
		//compile 'ckrjfrog.Page:PageView:1.2.8'//gradle plugin 3.0 below used
	}

Function And Use

1.layout reference

    <com.ckr.pageview.view.PageView
        android:id="@+id/pageView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        app:autoplay="true"
        app:loop="true"
	app:autosize="false"
        app:loop_interval="3000"
        app:hide_indicator="false"
        app:indicator_container_background="#fff"
        app:indicator_container_height="@dimen/viewpager_indicator_container_height"
        app:indicator_group_alignment="center"
        app:indicator_margin="@dimen/viewpager_indicator_margin"
        app:layout_flag="linear"
        app:orientation="horizontal"
        app:overlap_layout="false"
        app:clipToPadding="false"
        app:pagePadding="0dp"
        app:page_background="#fff"
        app:page_column="one"
        app:page_row="one"
        app:selected_indicator_diameter="@dimen/viewpager_selected_indicator_diameter"
        app:selected_indicator_drawable="@drawable/shape_point_selected"
        app:unselected_indicator_diameter="@dimen/viewpager_unselected_indicator_diameter"
        app:unselected_indicator_drawable="@drawable/shape_point_unselected"/>

2.attributes description

attributes       description                   type defaults      
loop start a carousel(valid when there is only one item per page) boolean false
loop_interval loop interval int 3000
autoplay automatically scroll to the next page boolean false
autosize automatically adjust the width or height of item(valid in the grid layout) boolean false
hide_indicator     hide indicator boolean false
indicator_container_background the background of indicator parent container drawable null
indicator_container_height     indicator parent container height(valid in the vertical orientation) int 90
indicator_contianer_width     indicator parent container width(valid in the horizontal orientation) int 90
indicator_group_alignment     the alignment of indicator group(eg: left,top,center) int 0x11(center)
indicator_group_marginLeft   the marginLeft of indicator group int 0
indicator_group_marginTop   the marginTop of indicator group int 0
indicator_group_marginRight   the marginRight of indicator group int 0
indicator_group_marginBottom the marginBottom of indicator group int 0
indicator_margin indicator spacing boolean false
clipToPadding the clipTopadding of recyclerView int 15
pagePadding recyclerView.setPadding(pagePadding,0,pagePading,0) int 15
layout_flag mark linear layout or grid layout int     0(linear layout)
orientation layout orientation int 0(horizontal)
overlap_layout Whether the indicator overlaps the page boolean false
page_column the number of columns per page   int 1
page_row the number of rows per page   int 1
selected_indicator_color       indicator color for the current page   int Color.RED
selected_indicator_diameter   indicator diameter for the current page   int 15
selected_indicator_drawable   indicator drawable for the current page(priority is higher than color) drawable null
unselected_indicator_color indicator color for the non-current page   int Color.BLACK
unselected_indicator_diameter indicator diameter for the non-current page   int 15
selected_indicator_drawable   indicator drawable for the non-current page(priority is higher than color) drawable null
page_background the background of the current page drawable null

3.code to use

    mainAdapter = new MainAdapter(getContext(), itemLayoutId);//MainAdapter extend BasePageAdapter<T,ViewHolder>
    pageView.setAdapter(mainAdapter);
    pageView.updateAll(items);

Thanks

banner

My Other Project

CollapsingRefresh

FlexItemDecoration

Version Tracking

  • 1.2.0-release

    • add: the settings of autoplay
    • add: the animation of scrolling to the page
  • 1.1.1-release

    • repair: When fast sliding,the indicators don't update in time
    • repair: the method of setCurrentItem(1,false) doesn't work
    • add: clipToPadding and pagePadding Settings
  • 1.1.0-release

    • add: the indicator container alignment, margin Settings, background Settings, and overlap layout styles
    • other: optimize the code
  • 1.0.9-release

    • repair: When the carousel is broadcast, the data source changes to cause confusion in the indicator point.

Community

Contact Me: 862950533
Or scan the QR code below:

License

Copyright 2018 ckrgithub

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.