Skip to content

Simplified customizable grid menu for Android

License

Notifications You must be signed in to change notification settings

rogcomfox/gridmenu

 
 

Repository files navigation

GridMenu

GridMenu is a simple-but-customizable view consisted list of menu arranged in grid-fashioned way.

Download

Gradle:

Step 1. Add the JitPack repository to your build file

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

Step 2. Add the dependency

dependencies {
    implementation 'com.github.bccfilkom:gridmenu:1.0.0'
}

Maven:

Step 1. Add the JitPack repository to your build file

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Step 2. Add the dependency

<dependency>
    <groupId>com.github.bccfilkom</groupId>
    <artifactId>gridmenu</artifactId>
    <version>1.0.0</version>
</dependency>

Usage

Include following code in your layout:

<com.bcc.gridmenuview.GridMenu
    android:id="@+id/menu"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:spanCount="4"/>

Include following code in your activity:

GridMenu menu = findViewById(R.id.menu);
menu.setMenuItems(list);
menu.setOnClickListener(new OnItemClickListener() {
    @Override
    public void onClick(int position) {
        // do something
    }
});

Supported xml Attributes

Attribute Description Value Default Value
spanCount Number of columns in GridMenu. integer 3

Contributing to this project

Interested in contributing? please check out the Contributing Guide to get started

About

Simplified customizable grid menu for Android

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%