Skip to content

Commit

Permalink
Updated docs, versions, README & CHANGELOG for release 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Zawadzki authored and zawadz88 committed Apr 16, 2019
1 parent 66a0b42 commit ba098e3
Show file tree
Hide file tree
Showing 25 changed files with 160 additions and 54 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.3.0]
### Added
- An option to keep popup open after clicking on item (#45, thanks to @Tunous)
- Allow setting item label via string resource (#42, thanks to @Tunous)
- A flag to dim background behind popup (#43, thanks to @Tunous)
- A way to customize popup padding (#44, thanks to @Tunous)

### Changed
- new project & sample app logos (#48, thanks to @ghostofiht)

### Fixed
- Incorrect menu height in case of dynamic content (#49, reported by @Tunous)
- Fix background clipping when using rounded corners (#47, thanks to @Tunous)

## [3.2.0]
### Changed
- Updated Kotlin to 1.3.21, AndroidX AppCompat to 1.0.2
Expand Down Expand Up @@ -71,6 +87,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
Initial release of the library.

[Unreleased]: https://github.com/zawadz88/MaterialPopupMenu/compare/3.3.0...HEAD
[3.3.0]: https://github.com/zawadz88/MaterialPopupMenu/compare/3.2.0...3.3.0
[3.2.0]: https://github.com/zawadz88/MaterialPopupMenu/compare/3.1.0...3.2.0
[3.1.0]: https://github.com/zawadz88/MaterialPopupMenu/compare/3.0.0...3.1.0
[3.0.0]: https://github.com/zawadz88/MaterialPopupMenu/compare/2.2.0...3.0.0
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src ="./art/components_menus.png" width="256" />
<img src ="./art/logo_vertical.png" width="256" />
</p>

# Material Popup Menu [![CircleCI](https://circleci.com/gh/zawadz88/MaterialPopupMenu.svg?style=svg)](https://circleci.com/gh/zawadz88/MaterialPopupMenu)
Expand All @@ -10,7 +10,7 @@ This library allows to create simple popup menus programmatically with a nice [t

## Download (from JCenter)
```groovy
implementation 'com.github.zawadz88.materialpopupmenu:material-popup-menu:3.2.0'
implementation 'com.github.zawadz88.materialpopupmenu:material-popup-menu:3.3.0'
```

## Getting started
Expand All @@ -28,7 +28,7 @@ To create a popup menu with a single section from an anchor view:
}
}
item {
label = "Paste"
labelRes = R.string.label_paste
iconDrawable = ContextCompat.getDrawable(this@LightActivity, R.drawable.abc_ic_menu_paste_mtrl_am_alpha) //optional
callback = { //optional
Toast.makeText(this@LightActivity, "Text pasted!", Toast.LENGTH_SHORT).show()
Expand Down Expand Up @@ -59,7 +59,7 @@ To create a popup menu with 2 sections and a section title in the second one:
}
}
item {
label = "Paste"
labelRes = R.string.label_paste
icon = R.drawable.abc_ic_menu_paste_mtrl_am_alpha
callback = {
Toast.makeText(this@LightActivity, "Text pasted!", Toast.LENGTH_SHORT).show()
Expand Down Expand Up @@ -88,6 +88,9 @@ To create a popup menu with 2 sections and a section title in the second one:
* Setting item label text color & icon color for each individual item
* Setting custom popup background color
* Adding additional offsets to where the dialog should be shown
* Keeping popup open after clicking on item
* Dimming background behind popup
* Customizing popup padding

## Custom views
<img src ="./art/sample_custom_items.png" width="360" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">android.support.v7.widget</a>&nbsp;/&nbsp;<a href="index.html">MaterialRecyclerViewPopupWindow</a>&nbsp;/&nbsp;<a href="./-init-.html">&lt;init&gt;</a><br/>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">androidx.appcompat.widget</a>&nbsp;/&nbsp;<a href="index.html">MaterialRecyclerViewPopupWindow</a>&nbsp;/&nbsp;<a href="./-init-.html">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<a name="android.support.v7.widget.MaterialRecyclerViewPopupWindow$&lt;init&gt;(android.content.Context, kotlin.Int, kotlin.Int)"></a>
<code><span class="identifier">MaterialRecyclerViewPopupWindow</span><span class="symbol">(</span><span class="identifier" id="android.support.v7.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/context">context</span><span class="symbol">:</span>&nbsp;<a href="https://developer.android.com/reference/android/content/Context.html"><span class="identifier">Context</span></a><span class="symbol">, </span><span class="identifier" id="android.support.v7.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/dropDownGravity">dropDownGravity</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html"><span class="identifier">Int</span></a><span class="symbol">, </span><span class="identifier">@StyleRes</span> <span class="identifier" id="android.support.v7.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/defStyleRes">defStyleRes</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html"><span class="identifier">Int</span></a><span class="symbol">)</span></code>
<a name="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$&lt;init&gt;(android.content.Context, kotlin.Int, kotlin.Int)"></a>
<code><span class="identifier">MaterialRecyclerViewPopupWindow</span><span class="symbol">(</span><span class="identifier" id="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/context">context</span><span class="symbol">:</span>&nbsp;<a href="https://developer.android.com/reference/android/content/Context.html"><span class="identifier">Context</span></a><span class="symbol">, </span><span class="identifier" id="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/dropDownGravity">dropDownGravity</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html"><span class="identifier">Int</span></a><span class="symbol">, </span><span class="identifier">@StyleRes</span> <span class="identifier" id="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/defStyleRes">defStyleRes</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html"><span class="identifier">Int</span></a><span class="symbol">)</span></code>
<p>A more Material version of <a href="#">ListPopupWindow</a> based on <a href="#">RecyclerView</a>.</p>
<p>Its width is a multiple of 56dp units with a minimum of 112dp and a maximum of 280dp
as stated in the Material documentation</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">android.support.v7.widget</a>&nbsp;/&nbsp;<a href="index.html">MaterialRecyclerViewPopupWindow</a>&nbsp;/&nbsp;<a href="./dismiss.html">dismiss</a><br/>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">androidx.appcompat.widget</a>&nbsp;/&nbsp;<a href="index.html">MaterialRecyclerViewPopupWindow</a>&nbsp;/&nbsp;<a href="./dismiss.html">dismiss</a><br/>
<br/>
<h1>dismiss</h1>
<a name="android.support.v7.widget.MaterialRecyclerViewPopupWindow$dismiss()"></a>
<a name="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$dismiss()"></a>
<code><span class="keyword">fun </span><span class="identifier">dismiss</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Dismiss the popupMenu window.</p>
</BODY>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">android.support.v7.widget</a>&nbsp;/&nbsp;<a href="./index.html">MaterialRecyclerViewPopupWindow</a><br/>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">androidx.appcompat.widget</a>&nbsp;/&nbsp;<a href="./index.html">MaterialRecyclerViewPopupWindow</a><br/>
<br/>
<h1>MaterialRecyclerViewPopupWindow</h1>
<code><span class="keyword">class </span><span class="identifier">MaterialRecyclerViewPopupWindow</span></code>
Expand All @@ -23,7 +23,7 @@ <h3>Constructors</h3>
<p><a href="-init-.html">&lt;init&gt;</a></p>
</td>
<td>
<code><span class="identifier">MaterialRecyclerViewPopupWindow</span><span class="symbol">(</span><span class="identifier" id="android.support.v7.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/context">context</span><span class="symbol">:</span>&nbsp;<a href="https://developer.android.com/reference/android/content/Context.html"><span class="identifier">Context</span></a><span class="symbol">, </span><span class="identifier" id="android.support.v7.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/dropDownGravity">dropDownGravity</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html"><span class="identifier">Int</span></a><span class="symbol">, </span><span class="identifier" id="android.support.v7.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/defStyleRes">defStyleRes</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html"><span class="identifier">Int</span></a><span class="symbol">)</span></code>
<code><span class="identifier">MaterialRecyclerViewPopupWindow</span><span class="symbol">(</span><span class="identifier" id="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/context">context</span><span class="symbol">:</span>&nbsp;<a href="https://developer.android.com/reference/android/content/Context.html"><span class="identifier">Context</span></a><span class="symbol">, </span><span class="identifier" id="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/dropDownGravity">dropDownGravity</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html"><span class="identifier">Int</span></a><span class="symbol">, </span><span class="identifier" id="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$<init>(android.content.Context, kotlin.Int, kotlin.Int)/defStyleRes">defStyleRes</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html"><span class="identifier">Int</span></a><span class="symbol">)</span></code>
<p>A more Material version of <a href="#">ListPopupWindow</a> based on <a href="#">RecyclerView</a>.</p>
</td>
</tr>
Expand All @@ -43,6 +43,15 @@ <h3>Functions</h3>
</tr>
<tr>
<td>
<p><a href="set-on-dismiss-listener.html">setOnDismissListener</a></p>
</td>
<td>
<code><span class="keyword">fun </span><span class="identifier">setOnDismissListener</span><span class="symbol">(</span><span class="identifier" id="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$setOnDismissListener(kotlin.Function0((kotlin.Unit)))/listener">listener</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Sets a listener that is called when this popup window is dismissed.</p>
</td>
</tr>
<tr>
<td>
<p><a href="show.html">show</a></p>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>MaterialRecyclerViewPopupWindow.setOnDismissListener - material-popup-menu</title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">androidx.appcompat.widget</a>&nbsp;/&nbsp;<a href="index.html">MaterialRecyclerViewPopupWindow</a>&nbsp;/&nbsp;<a href="./set-on-dismiss-listener.html">setOnDismissListener</a><br/>
<br/>
<h1>setOnDismissListener</h1>
<a name="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$setOnDismissListener(kotlin.Function0((kotlin.Unit)))"></a>
<code><span class="keyword">fun </span><span class="identifier">setOnDismissListener</span><span class="symbol">(</span><span class="identifier" id="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$setOnDismissListener(kotlin.Function0((kotlin.Unit)))/listener">listener</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Sets a listener that is called when this popup window is dismissed.</p>
<h3>Parameters</h3>
<p><a name="listener"></a>
<code>listener</code> - Listener that is called when this popup window is dismissed.</p>
</BODY>
</HTML>
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">android.support.v7.widget</a>&nbsp;/&nbsp;<a href="index.html">MaterialRecyclerViewPopupWindow</a>&nbsp;/&nbsp;<a href="./show.html">show</a><br/>
<a href="../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../index.html">androidx.appcompat.widget</a>&nbsp;/&nbsp;<a href="index.html">MaterialRecyclerViewPopupWindow</a>&nbsp;/&nbsp;<a href="./show.html">show</a><br/>
<br/>
<h1>show</h1>
<a name="android.support.v7.widget.MaterialRecyclerViewPopupWindow$show()"></a>
<a name="androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$show()"></a>
<code><span class="keyword">fun </span><span class="identifier">show</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Show the popupMenu list. If the list is already showing, this method
will recalculate the popupMenu's size and position.</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>android.support.v7.widget - material-popup-menu</title>
<title>androidx.appcompat.widget - material-popup-menu</title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="./index.html">android.support.v7.widget</a><br/>
<a href="../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="./index.html">androidx.appcompat.widget</a><br/>
<br/>
<h2>Package android.support.v7.widget</h2>
<h2>Package androidx.appcompat.widget</h2>
<h3>Types</h3>
<table>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>MaterialPopupMenuBuilder.AbstractItemHolder.dismissOnSelect - material-popup-menu</title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">material-popup-menu</a>&nbsp;/&nbsp;<a href="../../index.html">com.github.zawadz88.materialpopupmenu</a>&nbsp;/&nbsp;<a href="../index.html">MaterialPopupMenuBuilder</a>&nbsp;/&nbsp;<a href="index.html">AbstractItemHolder</a>&nbsp;/&nbsp;<a href="./dismiss-on-select.html">dismissOnSelect</a><br/>
<br/>
<h1>dismissOnSelect</h1>
<a name="com.github.zawadz88.materialpopupmenu.MaterialPopupMenuBuilder.AbstractItemHolder$dismissOnSelect"></a>
<code><span class="keyword">var </span><span class="identifier">dismissOnSelect</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a></code>
<p>Whether to dismiss the popup once an item gets selected.
Defaults to <code>true</code>.</p>
</BODY>
</HTML>
Loading

0 comments on commit ba098e3

Please sign in to comment.