Comments (9)
I'm going to migrate to androidx shortly, and I'll investigate that bug as soon as I have a second.
I hope to fix the bug as soon as possible, but I haven't touched this library in over two years.
But I don't see any information about using FlowLayoutManager.
from flowlayoutmanager.
That's how i'm using FlowLayoutManager
in my project.
- Creating
private val ingredientsFlowLayoutManager by lazy {
val flowLayoutManager = FlowLayoutManager()
flowLayoutManager.isAutoMeasureEnabled = true
flowLayoutManager.setAlignment(Alignment.LEFT)
flowLayoutManager
}
- Setting
private fun setupIngredients() {
ingredientsRecyclerView?.layoutManager = ingredientsFlowLayoutManager
ingredientsRecyclerView?.adapter = ingredientsAdapter
}
from flowlayoutmanager.
in the new version I do not see this problem, I suppose it was for an incompatibility between pre-androidX and androidX
If you're still having problems, try forking and modifying the sample app and notify me.
from flowlayoutmanager.
from flowlayoutmanager.
I'm updated version to 1.8.0
and nothing changes, so I forked project and start experiment with it.
Finally, i'm comment this line, inside in MainActivity
:
RecyclerView.ItemDecoration itemDecoration = new RecyclerView.ItemDecoration() {
@Override
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
// outRect.set(5, 5, 5, 5);
}
};
But in XML each view has android:layout_margin="5dp"
, so they must not be so close to each other.
And it looks like:
If i'm adding ItemDecoration
and overriding getItemOffsets
all works fine.
from flowlayoutmanager.
Sorry, I didn't understand if you want the tags close together or far apart?
Ok, so it's not a compatibility problem between androidx and legacy stuff, but a hardcoded value problem in the code, as I think you can imagine I didn't write this library, but I based it on existing code. Can you commit your changes?
from flowlayoutmanager.
in fact it was a iusse in the original repo
xiaofeng-han#21
from flowlayoutmanager.
Yeap, i just want some space between items, like that:
Yeap, seems that it's the same problem in #xiaofeng-han#21.
So closing the issue, because root of problem not in your code.
Thanks for your attention.
from flowlayoutmanager.
The original code hasn't been updated for years, I was the last code maintainer.
from flowlayoutmanager.
Related Issues (3)
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 flowlayoutmanager.