Skip to content
Android PopupWindow that can be easily located relative to anchor View.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
art Update screenshot Mar 27, 2017
example Migrate to AndroidX Jul 11, 2019
gradle/wrapper Upgrade build tools to latest Jul 11, 2019
relativepopupwindow Bump version Jul 11, 2019
.gitignore Add ignored file Dec 25, 2018
LICENSE Initial commit Jul 8, 2016
README.md Update README Jul 11, 2019
build.gradle Migrate to AndroidX Jul 11, 2019
gradle.properties Add source and example Jul 9, 2016
gradlew Add source and example Jul 9, 2016
gradlew.bat Add source and example Jul 9, 2016
settings.gradle Add source and example Jul 9, 2016
wercker.yml Install wercker instead of travis Mar 25, 2017

README.md

RelativePopupWindow

wercker status Platform API Android Arsenal

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.0'
  • for legacy Support Library:
implementation 'com.labo.kaji:relativepopupwindow:0.3.1'

License

MIT License.

You can’t perform that action at this time.