Git Product home page Git Product logo

Comments (16)

justasm avatar justasm commented on September 13, 2024

Glad you managed to solve the issue 👍, sorry I didn't respond sooner.

from draglinearlayout.

Virthuss avatar Virthuss commented on September 13, 2024

No problem, and thanks for this amazing library! However I noticed some troubles while I'm using it in a scrollview. The library then work once every ten click, like if the scrollview was stealing the focus. Am I missing something? It working fine without the scrollview. I can open a new issue if needed.

from draglinearlayout.

justasm avatar justasm commented on September 13, 2024

That shouldn't be happening, but it's difficult to say what's up without seeing your code / layout. Perhaps your touch targets are too small.

The sample includes a demo of the DragLinearLayout inside of a ScrollView, might be a good place to look at for reference. You're of course welcome to open an issue if you don't manage to resolve it.

from draglinearlayout.

Virthuss avatar Virthuss commented on September 13, 2024

I will try to fix it by myself and will open a new issue thread about that with more technical informations if needed. As a beginner may I ask you if it's possible to override some features of your library quite easily? I would like to activate your feature on a longclick only and be able to change the background color as well.

from draglinearlayout.

meesec avatar meesec commented on September 13, 2024

for long tap check out my fork. i have been meaning to merge back the changes to justas' code but haven't gotten to it yet. it might even have code related to changing the background in it - i remember playing around with that as well.

from draglinearlayout.

justasm avatar justasm commented on September 13, 2024

You can customize the background just like you would for any other View in Android, most commonly through the android:background property.

And for long-press, as always, I can depend on @meesec jumping in :) Check out the fork here.

from draglinearlayout.

Virthuss avatar Virthuss commented on September 13, 2024

I'll check the fork thanks :)

However for the view it's possible to do so, but my aim is to 'highlight' the element touched by the user after a long click ( since the 'quick' onclick open a new fragment ) while his finger is pressing the screen. On release the color must return to an original value. I did it easily with a ontouchlistener but it seems that in this case, the listener in charge of the drag and sort is not working anymore.

:(

from draglinearlayout.

meesec avatar meesec commented on September 13, 2024

yes, that's the kind of change i did in the fork (changing the elevation / shadow of the item and i think it also slightly translates the views position). i think it is working in the current state, it's mainly the documentation that i haven't updated that keeps me from creating a pull request.

from draglinearlayout.

justasm avatar justasm commented on September 13, 2024

Yes, the library overrides the View's existing OnTouchListener. You may want to consider whether it's all necessary; as you can see in the sample, clickable buttons can happily coexist with the drag feature without resorting to long press. If it is, @meesec's fork or your own modifications may be your best bet.

The library would definitely be improved if it delegated events to any existing OnTouchListener, and / or had additional callbacks for drag start / stop.

from draglinearlayout.

Virthuss avatar Virthuss commented on September 13, 2024

Just another beginner question: How to get the fork version instead of the main branch's one?

from draglinearlayout.

meesec avatar meesec commented on September 13, 2024

as far as i know you can't because i haven't published the fork to maven central or sth like that. you'd have to manually download it.

The reason i'm not publishing it is that i'd rather have the changes merged to the main lib at some point - although that might create issues with existing users of the lib as the behavior of components would change.

from draglinearlayout.

Virthuss avatar Virthuss commented on September 13, 2024

I'll try with the zip file then. Thanks 👍

from draglinearlayout.

Virthuss avatar Virthuss commented on September 13, 2024

Sadly I didn't success to import your lib as a zip file... That was the problem I encountered before finding a solution with my edit on the first post... which is not applicable on this new case

from draglinearlayout.

justasm avatar justasm commented on September 13, 2024

Haven't reviewed all the additions / changes @meesec made to the library,
but it may be sufficient to just drop in the main class file
(DragLinearLayout.java) to your project, it is largely self-contained.

On Fri, Sep 18, 2015 at 11:18 AM, Virthuss [email protected] wrote:

Sadly I didn't success to import your lib as a zip file... That was the
problem I encountered before finding a solution with my edit on the first
post... which is not applicable on this new case


Reply to this email directly or view it on GitHub
#13 (comment)
.

Justas Medeisis

from draglinearlayout.

Virthuss avatar Virthuss commented on September 13, 2024

Error:Cannot access first() element from an empty List

Is returned every time...

from draglinearlayout.

justasm avatar justasm commented on September 13, 2024

Sorry @Virthuss but I'm closing this issue as it has diverged too far from its original intent.

The information you have provided about your error is not detailed enough. Please post a new issue with the full stack trace, and we may be able to help.

from draglinearlayout.

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.