https://github.com/Meetic/MaryPopup
Expand your view with no problem ;)
https://github.com/Meetic/MaryPopup
Last synced: 2 months ago
JSON representation
Expand your view with no problem ;)
- Host: GitHub
- URL: https://github.com/Meetic/MaryPopup
- Owner: Meetic
- Created: 2016-05-03T14:00:23.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-01T08:10:38.000Z (about 9 years ago)
- Last Synced: 2024-08-03T01:25:59.098Z (11 months ago)
- Language: Java
- Homepage:
- Size: 5.62 MB
- Stars: 924
- Watchers: 26
- Forks: 124
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - MaryPopup - 无忧扩展视图 (对话框)
- awesome-android-ui - https://github.com/Meetic/MaryPopup
README
MaryPopup
=======[][repo]
[](http://android-arsenal.com/details/1/3531)
[](https://travis-ci.org/Meetic/MaryPopup)Expand your view with no problem ;)
[][repo][][repo]
# Usage
Open marypopup from a view
```java
MaryPopup marypopup = MaryPopup.with(context)
.cancellable(true)
.blackOverlayColor(Color.parseColor("#DD444444"))
.backgroundColor(Color.parseColor("#EFF4F5"))
.content(R.layout.popup_content)
.from(clickedView)
.show();
``````java
CustomView customView = LayoutInflater...
MaryPopup marypopup = MaryPopup.with(context)
.cancellable(true)
.blackOverlayColor(Color.parseColor("#DD444444"))
.backgroundColor(Color.parseColor("#EFF4F5"))
.content(customView)
.from(clickedView)
.show();
```# Center
[][repo]
```java
MaryPopup marypopup = MaryPopup.with(context)
...
.center(true)
...
.show();
```# Draggable
[][repo]
```java
MaryPopup.with(context)
...
.draggable(true)
...
.show();
```[][repo]
```java
MaryPopup.with(context)
...
.draggable(true)
.scaleDownDragging(true);
...
.show();
```[][repo]
```java
MaryPopup.with(context)
...
.draggable(true)
.fadeOutDragging(true);
...
.show();
```# Close
Don't forget to handle the activity's `onBackPress`
```java
@Override
public void onBackPressed() {
if(!marypopup.close(true)){
super.onBackPressed();
}
}
```# Download
Add into your **build.gradle**
[  ](https://bintray.com/meetic-android/maven/MaryPopup/_latestVersion)
```groovy
compile 'com.meetic.marypopup:marypopup:(last version)'
compile 'com.meetic.dragueur:dragueur:1.0.3'
```Move your views with [Dragueur][Dragueur] !
# Credits
A project initiated by Meetic
This project was first developed by Meetic and has been open-sourced since. We will continue working on it.
We encourage the community to contribute to the project by opening tickets and/or pull requests.[][meetic]
Contributor: [Florent Champigny][florent]
# License
Copyright 2016 Meetic, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.[repo]: https://github.com/Meetic/MaryPopup
[androidarsenal]: http://android-arsenal.com/details/--------
[meetic]: http://www.meetic.fr/
[dragueur]: https://github.com/Meetic/Dragueur
[florent]: https://github.com/florent37