Home

Awesome

RelativePopupWindow

wercker status Platform <img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat"> API Android Arsenal Download

Android PopupWindow that can be easily located relative to anchor View.

Art

How To Use

Extend RelativePopupWindow class and call showOnAnchor().

popup.showOnAnchor(anchor, VerticalPosition.ABOVE, HorizontalPosition.CENTER);

See detail example in ExampleCardPopup.kt or in Java, ExampleCardPopup.java.

Position Parameters

VerticalPosition

HorizontalPosition

Fit In Screen

If you want Popup not to fit in screen automatically, add parameter to disable it.

popup.showOnAnchor(anchor, VerticalPosition.ABOVE, HorizontalPosition.CENTER, false);

Install

This library is available in jcenter.

implementation 'com.labo.kaji:relativepopupwindow:0.4.1'
implementation 'com.labo.kaji:relativepopupwindow:0.3.1'

License

MIT License.