Skip to content

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

License

Notifications You must be signed in to change notification settings

kakajika/RelativePopupWindow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3533d34 · Aug 3, 2019

History

59 Commits
Mar 27, 2017
Aug 3, 2019
Jul 11, 2019
Aug 3, 2019
Dec 25, 2018
Jul 8, 2016
Aug 3, 2019
Jul 11, 2019
Jul 9, 2016
Jul 9, 2016
Jul 9, 2016
Jul 9, 2016
Aug 3, 2019

Repository files navigation

RelativePopupWindow

wercker status Platform 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

  • ABOVE
  • ALIGN_BOTTOM
  • CENTER
  • ALIGN_TOP
  • BELOW

HorizontalPosition

  • LEFT
  • ALIGN_RIGHT
  • CENTER
  • ALIGN_LEFT
  • RIGHT

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.

  • for AndroidX:
implementation 'com.labo.kaji:relativepopupwindow:0.4.1'
  • for legacy Support Library:
implementation 'com.labo.kaji:relativepopupwindow:0.3.1'

License

MIT License.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published