Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.hovans.dynamicgrid:dynamicgrid

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.hovans.dynamicgrid:dynamicgrid

Dynamic Grid for Android

  • 1.0.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

DynamicGrid

Drag and drop GridView for Android.

Depricated

It's much better to use solutions based on recycler view. For example https://github.com/h6ah4i/android-advancedrecyclerview

Demo

example

Requirements

Rearranging items require api 8 (Froyo). All grid item animations require api 11 (Honeycomb).

Usage

All the same as for normal GridView. Adapter must extends AbstractDynamicGridAdapter or BaseDynamicGridAdapter

gridView = (DynamicGridView) findViewById(R.id.dynamic_grid);
// pass to adapter context, list of items and number of columns count
gridView.setAdapter(new MyDynamicGridAdapter(this, itemsList, 3));

To start Drag'n'drop mode:

gridView.startEditMode();

Or from onItemClik() and onItemLongClick()

gridView.startEditMode(position);

To stop:

gridView.stopEditMode();

Adding drop listener:

gridView.setOnDropListener(new DynamicGridView.OnDropListener(){
    @Override
    public void onActionDrop(){
        // stop edit mode immediately after drop item
        gridView.stopEditMode();
        }
    });

You can find more detailed usage example here.

Credits

DynamicGridView based on Daniel Olshansky ListView cell dragging and rearranging example.

FAQs

Package last updated on 19 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc