VRCategoryView

Additional

Language
Java
Version
1.0.0 (Nov 26, 2016)
Created
Nov 22, 2016
Updated
Nov 27, 2016 (Retired)
Owner
Viventhraa Rao (okaybroda)
Contributor
Viventhraa Rao (okaybroda)
1
Activity
Badge
Generate
Download
Source code

VRCategoryView

VRCategoryView is inspired by Ebay's category animation and design.

The view is capable of showing categories and sub categories. The first level will be shown in a grid with image and title. The second level can be shown however you like with passing in an adapter for RecyclerView.

Installation

Add Jitpack

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

Then add VRCategoryView

dependencies {
  compile 'com.github.okaybroda:VRCategoryView:1.0.0'
}

Usage

Include the layout in your XML:

<viven.com.vrcategoryview.lib.VRCategoryView
        android:id="@+id/vrCategoryView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

Initialize the view by passing in your category data

vrCategoryView = (VRSideCategoryView) findViewById(R.id.vrCategoryView);
vrCategoryView.setSubCategoryListBackgroundColor(Color.WHITE);
vrCategoryView.initialize(categoryItemList, new VRSideCategoryView.VRSubCategoryAdapter<ViewHolder>() { 
        //... put your adapter logic here ...
    });