Skip to content

A view capable of displaying categories and sub categories beatifully inspired by Ebay.

License

Notifications You must be signed in to change notification settings

okaybroda/VRCategoryView

Repository files navigation

VRCategoryView

View Preview

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 ...
    });

About

A view capable of displaying categories and sub categories beatifully inspired by Ebay.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages