Android: FlexBoxLayout


A FlexBoxLayout (Flexible box layout) in android is similar to the one in CSS. Its work is to make a layout flexible. As you know the android have limited screen size so sometimes the length of the data increases throwing our views out. In vertical layout it can be solved with applying a parent ScrollView but things got really weird with Horizontal Layouts. Then there comes the FlexBoxLayout to our rescue.

The FlexBoxLayout contains many properties like flex direction, flex_wrap, justifyContent and many more. But I am especially using the flex_wrap property as it let me put any number of views in horizontal layout. It wraps the horizontal content such that if there is no space it will go to next line. Isn’t it great?

for using FlexBoxlayout you have to add a dependency to your project

And then you can use it anywhere like I used it add a address in my view such that

And with that you got what actually you wanted. As I had already said it has many more properties its just a demo. You can check more here.


. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.

Josh Arnold

Josh Arnold

Owner, Shop ATV Escape

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home