Balloon v1.1.2 Release Notes

Release Date: 2020-03-20 // about 4 years ago
  • ๐Ÿš€ ๐ŸŽ‰ Released a new version 1.1.2 ! ๐ŸŽ‰

    What's new?

    The balloon popup wraps content from now. (#1)
    So we can use wrap_content to the custom layouts without using setWidth and setHeight methods.

    - setWidth(120)- setHeight(65)+ setPadding(8) // sets 8dp padding for all directions (left-top-right-bottom) 
    

    We can use setPaddingLeft, setPaddingTop, setPaddingRight, setPaddingBottom instead of the setPadding.
    Also, still we can use the setWidth and setHeight methods instead of the setPadding.

    Width and height

    We can control the size of the width and height using 3 ways: Padding, Specific size, Screen Ratio.

    Padding

    Balloon wraps a content. So the balloon's width and height size will be decided by the content.

    We can set the size of the balloon using paddings of the content.

    balloon.setPadding(6) // sets 6dp padding to all directions (left-top-right-bottom)balloon.setPaddingLeft(8) // sets 8dp padding to content's left.balloon.setPaddingTop(12) // sets 12dp padding to content's top.
    

    Specific size

    We can set the specific size of the balloon regardless of contents.

    balloon.setWidth(220) // sets 220dp size width.balloon.setHeight(160) // sets 160dp size height.
    

    According to screen ratio

    Also, we can set the width according to the ratio of the horizontal screen's size.

    balloon.setWidthRatio(0.5f) // sets width as 50% of the horizontal screen's size.