https://github.com/bitvale/fabdialog
:balloon: Fab into Dialog Animation on Android
https://github.com/bitvale/fabdialog
android android-library android-ui dialog fab ui
Last synced: 19 days ago
JSON representation
:balloon: Fab into Dialog Animation on Android
- Host: GitHub
- URL: https://github.com/bitvale/fabdialog
- Owner: bitvale
- Created: 2018-07-20T05:20:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-13T03:38:30.000Z (almost 7 years ago)
- Last Synced: 2025-04-08T21:22:41.812Z (about 2 months ago)
- Topics: android, android-library, android-ui, dialog, fab, ui
- Language: Kotlin
- Size: 738 KB
- Stars: 35
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
FabDialog
=================
[](https://opensource.org/licenses/Apache-2.0)
[](http://developer.android.com/index.html)
[](https://android-arsenal.com/api?level=21)This is an Android project allowing to animate a custom Floating Action Button into a custom Dialog.
USAGE
-----Just add FabDialog view in your layout XML and FabDialog library in your project via Gradle:
```gradle
dependencies {
implementation 'com.bitvale:fabdialog:1.0.1'
}
```XML
-----```xml
```
You must use the following properties in your XML to change your FabDialog.
##### Properties:
* `app:fabBackgroundColor` (color) -> default ?attr/colorAccent
* `app:dialogBackgroundColor` (color) -> default ?attr/colorBackgroundFloating
* `app:dialogCornerRadius` (dimension) -> default 8dp
* `app:dimBackgroundEnabled` (boolean) -> default true
* `app:dimBackgroundColor` (color) -> default BLACK with transparency (#99000000)
* `app:closeOnTouchOutside` (boolean) -> default trueKotlin
-----```kotlin
with(dialog_fab) {
setTitle(R.string.dialog_title)
setMessage(R.string.dialog_message)
setDialogIcon(R.drawable.android_icon)
setFabIcon(R.drawable.android_icon)
setFabBackgroundColor(ContextCompat.getColor(context, R.color.fabColor))
setDialogBackgroundColor(ContextCompat.getColor(context, R.color.dialogColor))
setPositiveButton(R.string.positive_btn) { // some action }
setNegativeButton(R.string.negative_btn) { dialog_fab.collapseDialog() }
setOnClickListener { dialog_fab.expandDialog() }
setListener(this@MainActivity)
}
```LICENCE
-----FabDialog by [Alexander Kolpakov](https://play.google.com/store/apps/dev?id=7044571013168957413) is licensed under a [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).