Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bq/drag-drop-grid
Biblioteca para crear un ViewGroup similar a un GridLayout al que se le pueden añadir objetos ImageViews que se pueden reordenar con un efecto de drag and drop. También se puede establecer una zona de borrado a la que arrastrar los ImageViews para eliminarlos del grid.
https://github.com/bq/drag-drop-grid
Last synced: 5 days ago
JSON representation
Biblioteca para crear un ViewGroup similar a un GridLayout al que se le pueden añadir objetos ImageViews que se pueden reordenar con un efecto de drag and drop. También se puede establecer una zona de borrado a la que arrastrar los ImageViews para eliminarlos del grid.
- Host: GitHub
- URL: https://github.com/bq/drag-drop-grid
- Owner: bq
- Created: 2014-03-29T21:26:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-11-04T11:12:37.000Z (about 4 years ago)
- Last Synced: 2024-08-05T19:36:13.194Z (3 months ago)
- Language: Java
- Size: 427 KB
- Stars: 17
- Watchers: 19
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
This project provides an Android library for a drag and drop scrolling grid view and a delete zone view if you need it.
This project is mainly inspired in the `DraggableGridView `_ of thquinn, and in the `PagedDragDropGrid `_ of mrKlar for the animations and the delete zone.
==============
drag-drop-grid
==============drag-drop-grid is an Android library for creating a drag and drop grid. You can add different types of views and rearrange them. Moreover, you can add a delete zone, that if you drop the view over it, you delete it.
It allows you to:
* Add ImageViews or TextViews to the grid. It's scrollable so you can add as many as you want.
* Rearrange the views by doing a click in an item or a long click, but you can change this default behaviour by setting a new OnItemClickListener or OnItemLongClickListener.
* Set a delete zone view if you want. You can drop the view on the delete zone to delete it.* You can add views of different sizes and the grid resizes its items to the biggest one, in order to get the same number of columns and rows. If there is no more space for another view, the items are centered in the grid layout.
* You can set a fixed number of columns (no more than the available for the limited width of the device).
* You can center the items in the grid.
* You can set a fixed width and height for all the views in the grid.
* Now you can customize your delete zone with other image, background and highlight color or background
There is an example project, ExampleDragDropGrid, where you can see how can the library be used.
Usage
=====#. Clone the repository::
git clone https://github.com/bq/drag-drop-grid.git
#. Install in your local repository:
* Gradle version equal or lower than 1.10 and drag-drop-grid version equal or lower than 1.6::
cd drag-drop-grid/drag-drop-grid
gradle publishToMavenLocal* Gradle version greater than 1.10 and drag-drop-grid version greater than 1.6::
cd drag-drop-grid/drag-drop-grid
gradle install#. Add your local repository to your root project's build.gradle file::
repositories {
mavenLocal()
}#. Add the drag-drop-grid dependency to your app's build.gradle file:
* Gradle version equal or lower than 1.10 and drag-drop-grid version equal or lower than 1.6::
dependencies {
compile('com.bq.robotic:drag-drop-grid:1.6@jar')
}* Gradle version greater than 1.10 and drag-drop-grid version greater than 1.6::
dependencies {
compile('com.bq.robotic:drag-drop-grid:1.10@aar')
}Installation
============#. Install `Android Studio `_ and `Gradle `_.
#. If you use a 64 bits Linux, you will need to install ia32-libs-multiarch::
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ia32-libs-multiarch#. Clone the repository::
git clone https://github.com/bq/drag-drop-grid.git
#. Install the drag-drop-grid library in your local repository:
* Gradle version equal or lower than 1.10 and drag-drop-grid version equal or lower than 1.6::
cd drag-drop-grid/drag-drop-grid
gradle publishToMavenLocal* Gradle version greater than 1.10 and drag-drop-grid version greater than 1.6::
cd drag-drop-grid/drag-drop-grid
gradle install#. In Android Studio go to ``File`` > ``Open`` and select the drag-drop-grid gradle project inside the previous cloned project (that with the green robot icon, the drag-drop-grid library folder not the repository one with the example project inside too).
#. If your are going to use drag-drop-grid for one of your projects, follow the instructions of the `Usage section `_ in order to installing it in your local repository and add to it the dependency needed.
Requirements
============- `Java JDK `_
- `Android Studio `_
- `Maven `_. If you use Ubuntu::
sudo apt-get update
sudo apt-get install maven- `Gradle `_ version 3.3
License
=======drag-drop-grid is distributed in terms of LGPL license. See http://www.gnu.org/licenses/lgpl.html for more details.