Comments (6)
HI, sorry, I cant find where are they overlapping.
As I can see from code and image flowlayout is using only for letters "DSTQQS", the other image parts are using different linear layouts.
As I can see those letters are not overlapping each other, and just did not fit in parent container (or this is a problem?) - maybe because of its size.
Can you provide more details (and remove information that is not related to the problem).
from android-flowlayout.
I need to display 7 letters within the FlowLayout (D S T Q Q S S), and if you look at the screenshot you will see that the last letter is overlapped, it should be move to the second line, should not it?
Apparently the problem is with the margin. I put the letters in a "LinearLayout" to test, because only the "TextView" had the same problem.
I think I got a way to work. I kept the LinearLayout and put the margin in TextView.
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="D"
android:singleLine="true"
android:id="@+id/tvDomingo"
android:layout_margin="5dp" />
</LinearLayout>
Looking at the source code of the FlowLayout, I noticed that he measures the child's size to see if it should be added to the current row or the next.
Apparently, when the margin was in LinearLayout, this measures was not correct.
Sorry, I put all the source code of my layout, so that they could understand the complete structure, and look at the wrap_content and fill_parent.
from android-flowlayout.
Hi, I have found, that it is reproducable for this layout as well:
<?xml version="1.0" encoding="utf-8"?>
<org.apmem.tools.layouts.FlowLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:f="http://schemas.android.com/apk/res-auto"
f:debugDraw="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_margin="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="D"/>
</org.apmem.tools.layouts.FlowLayout>
and the problem was in spacings calculations.
I have fixed it and also create tests.
from android-flowlayout.
@ApmeM Thank you for your dedication.
Off: I'm curious. You have planned to convert the FlowLayout as a LayoutManager for RecyclerView?
from android-flowlayout.
When will you release the updated library?
from android-flowlayout.
@douglasjunior : before your comment I even did not know about RecyclerView and it LayoutManagers. Therefore I did not have such plans, but now I will check it. I have created another issue: Support for 'RecyclerView' #59.
Can you please add example of usage or any code that is already implementing this feature to #59 issue so I can check and apply it to this FlowLayout?
@dadino : I was going to fix #50 issue before release. I think release will be today or tomorrow.
from android-flowlayout.
Related Issues (20)
- HORIZONTAL SCROLL VIEW WITH FLOWLAYOUT HOT 2
- Break before *this* element, only if line breaks at all
- flow layout + RadioGroup HOT 2
- failed to set margins in between two items of flow layout its displaying continuously with no margins , padding ? HOT 4
- Support for TextView and Edit Text HOT 2
- FlowLayoutManager should be constructable using a Context to support setting from XML
- When RecyclerView layout_height set to wrap_content, there will be nothing show on the screen. HOT 3
- Clipped child views on Android 4.1 - 4.3 HOT 1
- Display abnormal when using removeViewAt(int index); HOT 1
- Display Black Background with recyclerview in Samsung Galaxy Star Pro GT-s7262
- [Discussion] Should this library be deprecated in favor of Google's FlexboxLayout? HOT 3
- FlowLayout does not work with enclosing ScrollView HOT 2
- ava.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@70e62c7
- java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@70e62c7 HOT 1
- How to get number of lines
- Gradle 'android-flowlayout-master' project refresh failed with Android Studio 3.0.0
- Get actual height
- Flow Layout doesnot work inside a Recyclerview
- Target API 26 HOT 1
- Check if child on start of line HOT 1
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 android-flowlayout.