All Projects → ryanlijianchang → Recyclerview Gallery

ryanlijianchang / Recyclerview Gallery

Licence: apache-2.0
Recyclerview-Gallery:This library shows you a gallery using RecyclerView.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Recyclerview Gallery

Gallerylayoutmanager
New way to implements ViewPager/Gallery in Android with RecycleView
Stars: ✭ 684 (+62.86%)
Mutual labels:  recyclerview, gallery
Banner
Android Viewpager rotation control, application guide page controls, support vertical, horizontal cycle scrolling, extended from view support animation, indicator extension and so on;Android viewpager轮播图控件、app引导页控件,支持垂直、水平循环滚动,扩展自viewpager 支持动画,指示器扩展等。
Stars: ✭ 96 (-77.14%)
Mutual labels:  recyclerview, gallery
Cardslideview
一行代码实现ViewPager卡片效果,比ViewPager2更强大,底层同样是RecyclerView
Stars: ✭ 301 (-28.33%)
Mutual labels:  recyclerview, gallery
Y divideritemdecoration
A common RecyclerView divider , supports the LinearLayoutManager and the GridLayoutManager.
Stars: ✭ 373 (-11.19%)
Mutual labels:  recyclerview
Stackcardlayoutmanager
Stars: ✭ 376 (-10.48%)
Mutual labels:  recyclerview
V Img
Stars: ✭ 400 (-4.76%)
Mutual labels:  gallery
Ngx Gallery
Angular Gallery, Carousel and Lightbox
Stars: ✭ 417 (-0.71%)
Mutual labels:  gallery
Familiarrecyclerview
一个如你熟悉ListView、GridView一样熟悉的RecyclerView
Stars: ✭ 372 (-11.43%)
Mutual labels:  recyclerview
Vue Gallery
📷 Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers.
Stars: ✭ 405 (-3.57%)
Mutual labels:  gallery
Pickimage
Shows a DialogFragment with camera and gallery options. User can choose wich provider wants to pick images from. 📸 🖼️
Stars: ✭ 386 (-8.1%)
Mutual labels:  gallery
Popupbubble
🅿️ Easily add and customise "New Post" popup button with the feeds (RecyclerView) of your app.
Stars: ✭ 385 (-8.33%)
Mutual labels:  recyclerview
Adapter
A quick adapter library for RecyclerView, GridView, ListView, ViewPager, Spinner
Stars: ✭ 376 (-10.48%)
Mutual labels:  recyclerview
Zing Gallery
基于node.js的web相册,让摄影照片的展示更加简单 Web albums based on node.js, more simple to show photography photos
Stars: ✭ 401 (-4.52%)
Mutual labels:  gallery
Zlphotobrowser
Wechat-like image picker. Support select normal photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
Stars: ✭ 3,962 (+843.33%)
Mutual labels:  gallery
Insgallery
📸 Instagram-like image picker for Android (一款 UI 炫酷高仿 Instagram 的图片、视频选择器)
Stars: ✭ 409 (-2.62%)
Mutual labels:  gallery
Klaster
Declare RecyclerView adapters in a functional way, without boilerplate and subclassing. No compromises on flexibility. If it's possible to do something by subclassing, it's possible to do it with this library.
Stars: ✭ 373 (-11.19%)
Mutual labels:  recyclerview
Recyclerviewtemplate
One Template which solves all frequently used RecyclerViews Code Snippets
Stars: ✭ 404 (-3.81%)
Mutual labels:  recyclerview
Delegationadapter
一种优雅的方式来使用RecyclerView
Stars: ✭ 382 (-9.05%)
Mutual labels:  recyclerview
Multiitem
一个优雅的实现多类型的RecyclerView类库 支持DataBinding Form表单录入 跨多个RecyclerView拖动
Stars: ✭ 381 (-9.29%)
Mutual labels:  recyclerview
Ptshowcaseviewcontroller
An initial implementation of a "showcase" view( controller) for iOS apps... Visualizes images, videos and PDF files beautifully! (by @pittleorg) [meta: image, photo, video, document, pdf, album, gallery, showcase, gallery, iOS, iPhone, iPad, component, library, viewer]
Stars: ✭ 395 (-5.95%)
Mutual labels:  gallery

README

Download License Build

中文版文档

This library shows you a gallery using RecyclerView.

小清新的Gallery水平滑动效果

小清新的Gallery垂直滑动效果

Usage

First step, add dependence in your build.gradle.

compile 'com.ryan.rv_gallery:rv-gallery:1.1.2'

Second step, using GalleryRecyclerView in your layout file.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/rl_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorPrimary"
    android:fitsSystemWindows="true"
    android:gravity="center"
    android:orientation="vertical">

	<!-- PagerSnapHelper can move just one page when scroll -->
	<!-- LinearSnapHelper can move serveral page when scroll-->
    <com.ryan.rv_gallery.GalleryRecyclerView
        android:id="@+id/rv_list"
        android:layout_width="match_parent"
        android:layout_height="480dp"
    	app:helper="PagerSnapHelper/LinearSnapHelper" />

</RelativeLayout>

Third step, init your GalleryRecyclerView in your java code just like using the normal RecyclerView. Note that you must use the LinearLayoutManager as your LayoutManager. At the same time, you must set the orientation like HORIZONTAL or VERTICAL, to make your GalleryRecyclerView scroll horizontally or vertically.

GalleryRecyclerView mRecyclerView = findViewById(R.id.rv_list);
RecyclerAdapter adapter = new RecyclerAdapter(getApplicationContext(), getDatas());
mRecyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
mRecyclerView.setAdapter(adapter);

Finally, set some params of GalleryRecyclerView if your need, and you must use the setUp() method to make the GalleryRecyclerView to work.

mRecyclerView
        // set scroll speed(pixel/s)
        .initFlingSpeed(9000)
		// set page distance and visible distance of the nearby.
        .initPageParams(0, 40)
        // set the animation factor
        .setAnimFactor(0.1f)
		// set animation type. you can choose AnimManager.ANIM_BOTTOM_TO_TOP or AnimManager.ANIM_TOP_TO_BOTTOM
        .setAnimType(AnimManager.ANIM_BOTTOM_TO_TOP)
        // set click listener
        .setOnItemClickListener(this)
        // set whether auto play
        .autoPlay(false)
        // set auto play intervel 
        .intervalTime(2000)
        // set default position
        .initPosition(1)
        // finally call method
        .setUp();

You also can release GalleryRecyclerView if you need

@Override
protected void onDestroy() {
    super.onDestroy();
    if (mRecyclerView != null) {
        // release
        mRecyclerView.release();
    }
}

API

Java API

  1. initFlingSpeed(int speed):set scroll speed(pixel/s)
  2. setAnimFactor(float factor):set the animation factor
  3. setAnimType(int type):set animation type. you can choose AnimManager.ANIM_BOTTOM_TO_TOP or AnimManager.ANIM_TOP_TO_BOTTOM
  4. setOnItemClickListener(OnItemClickListener mListener):set click listener
  5. initPageParams(int pageMargin, int leftPageVisibleWidth):set page distance and visible distance of the nearby.
  6. getScrolledPosition(): get current position
  7. getLinearLayoutManager():get LayoutManager
  8. getOrientation():get current scroll orientation(HORIZONTAL:0 VERTICAL:1)
  9. autoPlay(boolean):set can it auto play
  10. intervalTime(int interval):set auto play intervel
  11. initPosition(int position): set default position

XML API

  1. app:helper="PagerSnapHelper/LinearSnapHelper":PagerSnapHelper can move just one page when scroll,LinearSnapHelper can move serveral page when scroll.

Version feature

see more in Releases

License

Copyright 2017 ryanlijianchang

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].