Giter Site home page Giter Site logo

viewholder-slide-helper's Introduction

ViewHolder-Slide-Helper

A grace recycleriew holder animation library for Android

Screenshots

ViewHolder-Slide-Helper use Animation and Scroller, expend recyclerview holder

Gradle

Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Add the dependency:

	dependencies {
	        compile 'com.github.ruzhan123:ViewHolder-Slide-Helper:v1.3'
	}

Usage

1, recyclerview adapter create ISlideHelper

public class SlideAdapter extends RecyclerView.Adapter {
private ISlideHelper mISlideHelper = new ISlideHelper();

2, use ISlideHelper add holder

@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

OneSlideViewHolder oneSlideViewHolder = new OneSlideViewHolder(
	LayoutInflater.from(parent.getContext()).inflate(R.layout.one_item, parent, false));
//add holder
mISlideHelper.add(oneSlideViewHolder);
return oneSlideViewHolder;
}

Developed by

ruzhan - [email protected]

License

Copyright 2017 ruzhan

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.

viewholder-slide-helper's People

Contributors

zhan2046 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

viewholder-slide-helper's Issues

itemView 的点击事件

默认状态下,不点击编辑事件。点击item,也会回有响应,只是被你的图片所覆盖。这边写的有问题。adapter这样写,有什么好处?如果将勾选图片先gone掉,然后在点击编辑的时候visible是不是会更好一些?

mCurrentState静态会导致显示错误

public class SlideAnimationHelper {

public static final int STATE_CLOSE = 20000;
public static final int STATE_OPEN = 30000;

viewpager多个相同的页面会导致显示错误,设置成非静态的得多加代码才能保持正常
private static int mCurrentState = STATE_CLOSE;

adapter加的代码如下
holder.bind(state);
viewholder加的代码
public void bind(int state) {
/必须调用这个方法设置打开和关闭的状态/
setState(state);
/设置总的偏移量/
setOffset(offsetDp);
//slide must call
onBindSlide(itemView);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.