christmas sale

Flat 10% off on the purchase of any two apps or more. Use coupon code - FESTIVAL10

Grab It Now
Check Mobile App
Read now
Start a Project

Android: FlexBoxLayout

Save

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.

Source: https://github.com/google/flexbox-layout

UI
. . .

Leave a Comment

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


Be the first to comment.

css.php

When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

Michael Urresta

Michael Urresta

Talk to Sales

Global

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