Comments (9)
Do you talk about the background of each item's view or the space between the items?
from pageddragdropgrid.
I mean the space between the elements.
from pageddragdropgrid.
Although in my xml there is no padding, margin, etc.. items are always slightly apart, unless I specify a width for the entire set ...
from pageddragdropgrid.
In particular what I do is to specify values ββfor variables widthMode and heighMode. That way extra spaces go away. I don't know if this makes any sense for you...
from pageddragdropgrid.
Well, i have a hard time just figuring what that extra space is. Could you send a picture?
from pageddragdropgrid.
Would like to get what appears on the image on the right. Is it possible?
from pageddragdropgrid.
In auto mode, the grid will try to fit the maximum number of item in a row. It is your item view created in your adapter that specify its size.
In the example, the padding is 15, so the extra space comes from that padding + the space needed to lay the items evenly in the row.
You can manually specify the row and column count. If you go that route, the grid will resize the items so they will fit with the specified values.
from pageddragdropgrid.
Thank you so much for the clarification. Now i'm trying to add some margin to the entire ScrollView and this is what i get:
The code for the ScrollView is:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
<ca.laplanete.mobile.pageddragdropgrid.PagedDragDropGrid
android:id="@+id/gridview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</ScrollView>
The entire set moves to the left when there is space enough to fill the remaining gaps and be centered. Any clues?
from pageddragdropgrid.
Well, the scroll view wrapping in the example is kind of an ugly patch for the lack of vertical scrolling in the grid.
The vertical scroll for each page is in dev, but is a big rewrite so i do not have a release date.
My guess is the grid does not know about the scrollview margin so it takes the screen width to compute its page width. Try to put a margin in both to see...
from pageddragdropgrid.
Related Issues (20)
- Dynamic add to gridview
- Question: Is there some limit to the amount of views in a page? HOT 1
- Vertical Scrolling
- Vertical Scrolling Problem HOT 1
- Manage max number of children per page
- Get itemId
- long click on item android 4.4 HOT 13
- VerticalScroll HOT 7
- is there a support for manually deleting an item without dragging it to the delete view zone? HOT 2
- notifayDataSetChange
- Adding items dynamically is broken after merging #47 HOT 1
- Horizontal Scroll View as a base layout for Grid
- get Drag Event
- I am not able to update data of grid view HOT 2
- Scrolling issue
- How to get Item in onClickListener
- LongClick then Drop Issue
- My Implementation to move items instead of swap
- Animation when drag item in gridview
- How to Swap item view between pages?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pageddragdropgrid.