Comments (8)
Hi, I have included your pull request #23 into master branch, but it looks like it contains a bug therefore I cant push it into maven.
With the configuration checked into master branch on my mobile phone it start looks like this:
You can see yellow arrow on the bottom. It is overlapped with the button.
Can you fix this issue please?
from android-flowlayout.
👍 on fix @jpshelley
from android-flowlayout.
@ApmeM @z0lope0z Sorry guys been super busy. Don't know how soon I can look at fixing it. What is the yellow arrow for? Everything shows up fine when using it on my device.
from android-flowlayout.
Hi, yellow arrow in debug mode means child specified horizontal layout. In example app you can find it here:
<Button
f:layout_horizontalSpacing="32dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_horizontalSpacing"/>
Can you try to open example from app folder. Maybe I have merged it incorrectly into main branch? Can you please check it as well?
Thanks.
from android-flowlayout.
@ApmeM I'll try to give it a shot this weekend. Should have some free time available.
from android-flowlayout.
Hi,
I have checked the code you and @AndreasMattsson have made and found, that center justification is already implemented in 'gravity' code.
To do center justification you can use (see the example in MyActivity class:
layout.setGravity(Gravity.CENTER);
Therefore I've reverted this pull request #23 (but github still think it is merged into main branch).
BTW I have found, that this yellow line is incorrect 'debug' presentation because of 'horizontal' button was increased in size. I am not sure how it should looks like therefore I think it is ok for now.
I will upload latest code to maven repository at the end of this week.
from android-flowlayout.
Thanks for digging into that @ApmeM I haven't had any time, to look into it. The fork I used works okay from what I can tell. but if you suggest setting the Gravity is preferred, then I'll try to look into it as well.
from android-flowlayout.
oh I found out I can achieve it by setting Gravity.FILL_HORIZONTAL on layout, and set Gravity.CENTER on child. example:
flowLayout.setGravity(Gravity.FILL_HORIZONTAL);
FlowLayout.LayoutParams lp = new FlowLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT);
// you can set the margin here lp.setMargins();
lp.setGravity(Gravity.CENTER);
child.setLayoutParams(lp);
flowLayout.addView(child);
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.