Comments (16)
Glad you managed to solve the issue 👍, sorry I didn't respond sooner.
from draglinearlayout.
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.
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.
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.
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.
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.
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.
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.
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.
Just another beginner question: How to get the fork version instead of the main branch's one?
from draglinearlayout.
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.
I'll try with the zip file then. Thanks 👍
from draglinearlayout.
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.
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.
Error:Cannot access first() element from an empty List
Is returned every time...
from draglinearlayout.
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)
- How to record the position after the move it? HOT 1
- Support for horizontal dragging HOT 1
- Support drag and drop Listview or child View's elements HOT 2
- Limited Functionality HOT 1
- Crash when dragging first child HOT 1
- Support NestedScrollView
- Add Ability to Disable View Draggability HOT 1
- DragLinearLayout dont work when adding child view HOT 1
- Enable Dragging on only Long Click HOT 3
- Retrofit2 incompatibility on Android 5.x HOT 1
- Support drag&drop item (child of DragLinearLayout) between multiple draglinearlayouts? HOT 1
- very poor drag, or it barely can drag the images
- Unable to resolve depenency HOT 3
- programmatically swap children HOT 1
- update the library
- How to scroll without dragging when using it inside a ScrollView? HOT 1
- Can i get all added child position after swap and drag ? HOT 3
- Does not work <com.jmedeisis.draglinearlayout.DragLinearLayout in activty_layout.xml lit red HOT 3
- Cannot find anymore library on maven or jitpack - Is there any workaround? HOT 1
- Show shadow While click the View.
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 draglinearlayout.