Android PopupWindow that can be easily located relative to anchor View.
Extend RelativePopupWindow class and call showOnAnchor().
popup.showOnAnchor(anchor, VerticalPosition.ABOVE, HorizontalPosition.CENTER);
See detail example in ExampleCardPopup.kt. (This example is written in Kotlin, sorry!)
- ABOVE
- ALIGN_BOTTOM
- CENTER
- ALIGN_TOP
- BELOW
- LEFT
- ALIGN_RIGHT
- CENTER
- ALIGN_LEFT
- RIGHT
This library is available in jcenter.
compile 'com.labo.kaji:relativepopupwindow:0.1.2'
MIT License.