zhierfeifei / RelativePopupWindow

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RelativePopupWindow

Platform API Android Arsenal

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

Art

Usage

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!)

Position Parameters

VerticalPosition

  • ABOVE
  • ALIGN_BOTTOM
  • CENTER
  • ALIGN_TOP
  • BELOW

HorizontalPosition

  • LEFT
  • ALIGN_RIGHT
  • CENTER
  • ALIGN_LEFT
  • RIGHT

Install

This library is available in jcenter.

compile 'com.labo.kaji:relativepopupwindow:0.1.2'

License

MIT License.

About

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

License:MIT License


Languages

Language:Java 60.0%Language:Kotlin 40.0%