• Stars
    star
    2,107
  • Rank 21,901 (Top 0.5 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This library provides advance views for lists and stacks. Some of the views are build on top of RecyclerView and others are written in their own. Annotations are compiled by annotation processor to generate bind classes. DOCS -->

PlaceHolderView
An advance view for lists and stacks

Download 2.x License

Some Implementations


Documentation

You can find the PlaceHolderView documentation here which has extended usage instructions and other useful information.


About PlaceHolderView

Some of the views in PlaceHolderView library is build on top of RecyclerView and rest are written in its own.

All the annotations are processed during build time to generate the binding classes

There are two versions available for use.

  1. Old version (branch 1.x): Uses Java reflection
  2. New version (branch 2.x): Uses Annotation Processing.

This library provides 5 different type of views

  1. PlaceHolderView
    It is build on top of RecyclerView and abstracts most of the boiler plate. It provides APIs through annotations.

  2. InfinitePlaceHolderView
    It is build on PlaceHolderView and adds the functionality of handling load more views when the user has scrolled to the bottom of the list.

  3. ExpandablePlaceHolderView
    It is build on PlaceHolderView and creates ExpandableListView with parent-child relation.

  4. SwipePlaceHolderView
    It is not build on RecyclerView. Its a ground up implementation. We can create a variety of card stack views using this class. It provides APIs that could easily build Tinder like cards.

  5. SwipeDirectionalView
    It is build on top of SwipePlaceHolderView. It provides callbacks for swipe directions and touch events.

How to use newer version (2.x branch) with annotation processing

Gradle dependency:

Java

dependencies {
    ...
    compile 'com.mindorks.android:placeholderview:1.0.3'
    annotationProcessor 'com.mindorks.android:placeholderview-compiler:1.0.3'

    // RecyclerView dependency is added to override the
    // default 25.4.1 RecyclerView dependency used by placeholderview.
    // If you are using the support libraries other than 25.x in the project
    compile 'com.android.support:recyclerview-v7:<current-version>' // example: 27.1.0
}

Kotlin

dependencies {
    ...
    // RecyclerView dependency is added to override the
    // default 25.4.1 RecyclerView dependency stated by placeholderview
    // since we are using the 27.+ support libraries in the project
    implementation 'com.android.support:recyclerview-v7:27.1.0'
    implementation 'com.mindorks.android:placeholderview:1.0.3'
    kapt 'com.mindorks.android:placeholderview-compiler:1.0.3'
}

For use with Kotlin refer to Kotlin docs.

Migration:

It is super easy to migrate to 2.x branch library version.

To migrate from 1.x to 2.x see Migration doc here.


How to Use older version (1.x branch)

If you want to use older version of PlaceHoldeView that used reflection, then you can use below dependecies.

Gradle dependency:

dependencies {
    compile 'com.mindorks:placeholderview:0.7.3'
}

Dependency: It depends on the RecyclerView

Add below lines in your app's build.gradle if recyclerview above v7:25 is being used

    // NOTE: change the version of recyclerview same as the your project's support library version
    com.android.support:recyclerview-v7:25.+

Proguard Note:

If you are using proguard, then add this rule in proguard-project.txt

  -keepattributes *Annotation*
  -keepclassmembers class ** {
    @com.mindorks.placeholderview.annotations.** <methods>;
  }

If this library helps you in anyway, show your love โค๏ธ by putting a โญ on this project โœŒ๏ธ

TO-DOs

  • Update/Refresh the View already shown in the stack.
  • Callback when a card comes on top of the stack.
  • Provide Undo for the entire swipe history.
  • Provide Sort for the PlaceHolderView.

License

   Copyright (C) 2016 Janishar Ali Anwar

   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

More Repositories

1

mit-deep-learning-book-pdf

MIT Deep Learning Book in PDF format (complete and parts) by Ian Goodfellow, Yoshua Bengio and Aaron Courville
Java
11,661
star
2

android-mvp-architecture

This repository contains a detailed sample app that implements MVP architecture using Dagger2, GreenDao, RxJava2, FastAndroidNetworking and PlaceholderView
Java
4,426
star
3

android-mvvm-architecture

This repository contains a detailed sample app that implements MVVM architecture using Dagger2, Room, RxJava2, FastAndroidNetworking and PlaceholderView
Java
2,958
star
4

nodejs-backend-architecture-typescript

Node.js Backend Architecture Typescript - Learn to build a backend server for production ready blogging platform like Medium and FreeCodeCamp. Main Features: Role based, Express.js, Mongoose, Redis, Mongodb, Joi, Docker, JWT, Unit Tests, Integration Tests.
TypeScript
2,443
star
5

android-kotlin-mvp-architecture

This repository contains a detailed sample app that implements MVP architecture in Kotlin using Dagger2, Room, RxJava2, FastAndroidNetworking and PlaceholderView
Kotlin
700
star
6

android-dagger2-example

This project implements the dagger 2 in android for dependency injection
Java
456
star
7

android-mvp-interactor-architecture

Extension of the android-mvp-architecture for very large projects.
Java
403
star
8

react-app-architecture

React.js Isomorphic Web Application Architecture - Learn to build a complete website for a blogging platform like Medium, FreeCodeCamp, MindOrks etc using React.js, Redux, Material-UI, Express.js, Typescript, Webpack, Babel, and Docker. OpenSource project by AfterAcademy
TypeScript
232
star
9

annotation-processing-example

It is the example project for the annotation processing tutorial.
Java
139
star
10

JPost

Java and Android class communication library: New and improved Pub-Sub
Java
117
star
11

post-office-simulator-looper-example

This Android project simulates a Post Office using HandlerThread
Java
114
star
12

ParaCamera

Simple android camera to take and get image bitmaps
Java
96
star
13

Tutorials

Published tutorial files
Java
85
star
14

data-analytics-project-template

A python project starter template for data-analytics and data-science.
Jupyter Notebook
44
star
15

ButterKnifeLite

View binding library
Java
20
star
16

node-api-backend-architecture

JavaScript
19
star
17

graph-library

Data Structure and Algorithm for Graphs
Java
14
star
18

node-mvc-architecture

JavaScript
7
star
19

nodejs-bot-app

Create Bot using JavaScript in NodeJs. Use this program to create bots for automating the daily and repetitive tasks
JavaScript
5
star
20

cpp-course-for-beginners

c++ free course for beginners
C++
4
star
21

examples

Java
4
star
22

janishar.github.io

Docs for github page
3
star
23

janishar

My Profile
1
star
24

MindorksLibraryTest

Upload to repository test
Java
1
star