Giter VIP home page Giter VIP logo

Comments (9)

mrKlar avatar mrKlar commented on July 1, 2024

Do you talk about the background of each item's view or the space between the items?

from pageddragdropgrid.

JAlcaraz avatar JAlcaraz commented on July 1, 2024

I mean the space between the elements.

from pageddragdropgrid.

JAlcaraz avatar JAlcaraz commented on July 1, 2024

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.

JAlcaraz avatar JAlcaraz commented on July 1, 2024

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.

mrKlar avatar mrKlar commented on July 1, 2024

Well, i have a hard time just figuring what that extra space is. Could you send a picture?

from pageddragdropgrid.

JAlcaraz avatar JAlcaraz commented on July 1, 2024

Would like to get what appears on the image on the right. Is it possible?

clearextraspace

from pageddragdropgrid.

mrKlar avatar mrKlar commented on July 1, 2024

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.

JAlcaraz avatar JAlcaraz commented on July 1, 2024

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:

clearextraspace_globalmargins

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.

mrKlar avatar mrKlar commented on July 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.