Skip to content

implement gridview drag and drop user long press ,and can enable click event

Notifications You must be signed in to change notification settings

604649679/android_dragdropable_gridview

 
 

Repository files navigation

android_dragdropable_gridview

  • implement gridview drag and drop
  • use long press to drag
  • implement onclick event

##for example

	mGridview.setOnItemClick(new OnItemClickListener() {
		
		@Override
		public void click(int index) {
			Log.d(TAG, "item : " + index + " -- clicked!");
		}
	});
    
    mGridview.setOnSwappingListener(new OnSwappingListener() {
		
		@Override
		public void waspping(int oldIndex, int newIndex) {
			Book book = books.get(oldIndex);
			books.remove(oldIndex);
			books.add(newIndex, book);
			
			adapter.notifyDataSetChanged();
		}
	});

##bugs

  • drag with an scrolled gridview
  • selected item animations
  • drop down to grid animation to tip

About

implement gridview drag and drop user long press ,and can enable click event

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%