├── docs ├── api_doc_versions │ ├── v0.javadoc │ ├── v0.kdoc │ ├── v1.javadoc │ └── v1.kdoc ├── javadoc │ ├── v0 │ │ ├── package-list │ │ ├── script.js │ │ ├── allclasses-noframe.html │ │ ├── allclasses-frame.html │ │ └── com │ │ │ └── nambimobile │ │ │ └── widgets │ │ │ └── efab │ │ │ └── package-frame.html │ ├── v1 │ │ ├── tag-search-index.js │ │ ├── module-search-index.js │ │ ├── resources │ │ │ ├── x.png │ │ │ └── glass.png │ │ ├── element-list │ │ ├── package-list │ │ ├── jquery │ │ │ ├── images │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ ├── ui-icons_888888_256x240.png │ │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ │ ├── ui-bg_glass_65_dadada_1x400.png │ │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ └── jquery-ui.structure.min.css │ │ ├── dokka-javadoc-stylesheet.css │ │ ├── package-search-index.js │ │ ├── type-search-index.js │ │ └── allclasses.html │ └── index.md ├── kdoc │ ├── v1 │ │ ├── styles │ │ │ ├── logo-styles.css │ │ │ └── jetbrains-mono.css │ │ ├── scripts │ │ │ ├── sourceset_dependencies.js │ │ │ ├── clipboard.js │ │ │ └── navigation-loader.js │ │ └── images │ │ │ ├── logo-icon.svg │ │ │ ├── copy-icon.svg │ │ │ ├── footer-go-to-link.svg │ │ │ ├── arrow_down.svg │ │ │ ├── copy-successful-icon.svg │ │ │ ├── go-to-top-icon.svg │ │ │ ├── anchor-copy-button.svg │ │ │ └── docs_logo.svg │ ├── v0 │ │ └── library │ │ │ ├── package-list │ │ │ ├── index.html │ │ │ └── com.nambimobile.widgets.efab │ │ │ ├── -fab-size │ │ │ ├── -a-u-t-o.html │ │ │ ├── -m-i-n-i.html │ │ │ ├── -c-u-s-t-o-m.html │ │ │ ├── -n-o-r-m-a-l.html │ │ │ ├── value.html │ │ │ └── index.html │ │ │ ├── -label-position │ │ │ ├── -l-e-f-t.html │ │ │ ├── -r-i-g-h-t.html │ │ │ ├── value.html │ │ │ └── index.html │ │ │ ├── -fab-option-position │ │ │ ├── -a-b-o-v-e.html │ │ │ ├── -b-e-l-o-w.html │ │ │ ├── value.html │ │ │ └── index.html │ │ │ ├── -orientation │ │ │ ├── -p-o-r-t-r-a-i-t.html │ │ │ ├── -l-a-n-d-s-c-a-p-e.html │ │ │ └── index.html │ │ │ ├── -label │ │ │ ├── position.html │ │ │ ├── label-text-color.html │ │ │ ├── label-text.html │ │ │ ├── label-background-color.html │ │ │ ├── margin-px.html │ │ │ ├── hidden-to-visible-animation-duration-ms.html │ │ │ ├── label-elevation.html │ │ │ ├── visible-to-hidden-animation-duration-ms.html │ │ │ ├── label-text-size.html │ │ │ ├── translation-x-px.html │ │ │ ├── -init-.html │ │ │ ├── overshoot-tension.html │ │ │ └── on-touch-event.html │ │ │ ├── -expandable-fab │ │ │ ├── hide.html │ │ │ ├── show.html │ │ │ ├── orientation.html │ │ │ ├── efab-color.html │ │ │ ├── fab-option-position.html │ │ │ ├── efab-icon.html │ │ │ ├── closing-animation-duration-ms.html │ │ │ ├── opening-animation-duration-ms.html │ │ │ ├── on-detached-from-window.html │ │ │ ├── icon-animation-rotation-deg.html │ │ │ ├── first-fab-option-margin-px.html │ │ │ ├── label.html │ │ │ ├── successive-fab-option-margin-px.html │ │ │ ├── closing-anticipate-tension.html │ │ │ ├── set-size.html │ │ │ ├── efab-enabled.html │ │ │ ├── set-on-click-listener.html │ │ │ ├── efab-size.html │ │ │ └── fab-option-size.html │ │ │ ├── -orientation-configuration │ │ │ ├── overlay.html │ │ │ ├── efab.html │ │ │ ├── fab-options.html │ │ │ └── -init-.html │ │ │ ├── -overlay │ │ │ ├── orientation.html │ │ │ ├── overlay-color.html │ │ │ ├── overlay-alpha.html │ │ │ ├── opening-animation-duration-ms.html │ │ │ ├── closing-animation-duration-ms.html │ │ │ └── set-on-click-listener.html │ │ │ ├── -fab-option │ │ │ ├── orientation.html │ │ │ ├── fab-option-color.html │ │ │ ├── fab-option-icon.html │ │ │ ├── closing-animation-duration-ms.html │ │ │ ├── opening-animation-duration-ms.html │ │ │ ├── label.html │ │ │ ├── opening-overshoot-tension.html │ │ │ ├── set-size.html │ │ │ ├── fab-option-enabled.html │ │ │ └── set-on-click-listener.html │ │ │ └── -expandable-fab-layout │ │ │ ├── is-open.html │ │ │ ├── portrait-configuration.html │ │ │ ├── close.html │ │ │ ├── landscape-configuration.html │ │ │ ├── remove-all-views.html │ │ │ ├── add-views.html │ │ │ ├── get-current-configuration.html │ │ │ ├── -init-.html │ │ │ └── add-view.html │ └── index.md ├── gallery │ ├── labels.gif │ ├── overlay.gif │ ├── custom_sizes.gif │ ├── fab_options.gif │ ├── expandable_fab.gif │ ├── simple_use_case.gif │ ├── highly_customizable.gif │ ├── bottom_app_bar_center.gif │ ├── snackbar_compatibility.gif │ ├── multiple_expandable_fabs.gif │ ├── bottom_app_bar_compatibility.gif │ └── bottom_app_bar_covered_right.gif ├── .gitignore ├── _config.yml ├── 404.html ├── Gemfile ├── README.txt ├── _layouts │ ├── default.html │ └── home.html └── index.md ├── examples ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── drawable │ │ │ ├── ic_plus_white_84dp.xml │ │ │ ├── ic_menu_white_24dp.xml │ │ │ ├── ic_email_white_24dp.xml │ │ │ ├── ic_create_white_24dp.xml │ │ │ ├── ic_location_white_24dp.xml │ │ │ ├── ic_more_horiz_white_24dp.xml │ │ │ ├── ic_event_white_24dp.xml │ │ │ ├── ic_note_white_24dp.xml │ │ │ ├── ic_flight_white_24dp.xml │ │ │ ├── ic_flight_white_42dp.xml │ │ │ ├── ic_train_white_24dp.xml │ │ │ ├── ic_walk_white_24dp.xml │ │ │ ├── ic_walk_white_42dp.xml │ │ │ ├── ic_reminder_white_24dp.xml │ │ │ ├── ic_lock_white_24dp.xml │ │ │ ├── ic_car_white_24dp.xml │ │ │ ├── ic_car_white_42dp.xml │ │ │ ├── ic_bike_white_24dp.xml │ │ │ └── ic_bike_white_42dp.xml │ │ ├── values │ │ │ ├── styles.xml │ │ │ ├── dimens.xml │ │ │ └── colors.xml │ │ ├── layout │ │ │ ├── navigation_drawer_header.xml │ │ │ ├── default_configuration_code_fragment.xml │ │ │ ├── navigation_drawer.xml │ │ │ ├── main_activity.xml │ │ │ └── no_faboptions_fragment.xml │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ └── menu │ │ │ └── navigation_drawer_menu.xml │ │ ├── kotlin │ │ └── com │ │ │ └── nambimobile │ │ │ └── examples │ │ │ └── efab │ │ │ ├── WackyFragment.kt │ │ │ ├── LabelsFragment.kt │ │ │ ├── OverlayFragment.kt │ │ │ ├── NoLabelsFragment.kt │ │ │ ├── FabOptionsFragment.kt │ │ │ ├── CustomSizesFragment.kt │ │ │ ├── ExpandableFabFragment.kt │ │ │ ├── OpenDownwardsFragment.kt │ │ │ ├── MultipleExpandableFabsFragment.kt │ │ │ ├── DisabledFragment.kt │ │ │ ├── SnackbarCompatibilityFragment.kt │ │ │ ├── DefaultConfigurationXmlFragment.kt │ │ │ ├── BottomAppBarCompatibility.kt │ │ │ ├── NoFabOptionsFragment.kt │ │ │ └── MainActivity.kt │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── library ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ ├── values │ │ │ ├── colors.xml │ │ │ └── dimens.xml │ │ └── drawable │ │ │ └── ic_plus_white_24dp.xml │ │ └── kotlin │ │ └── com │ │ └── nambimobile │ │ └── widgets │ │ └── efab │ │ ├── Errors.kt │ │ ├── LabelPosition.kt │ │ ├── FabOptionPosition.kt │ │ ├── Orientation.kt │ │ ├── Resources.kt │ │ └── FabSize.kt ├── proguard-rules.pro ├── build.gradle └── generate-docs-and-update-website.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── LICENSE.txt ├── gradle.properties └── gradlew.bat /docs/api_doc_versions/v0.javadoc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/api_doc_versions/v0.kdoc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/api_doc_versions/v1.javadoc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/api_doc_versions/v1.kdoc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':library', ':examples' 2 | -------------------------------------------------------------------------------- /docs/javadoc/v0/package-list: -------------------------------------------------------------------------------- 1 | com.nambimobile.widgets.efab 2 | -------------------------------------------------------------------------------- /docs/javadoc/v1/tag-search-index.js: -------------------------------------------------------------------------------- 1 | var tagSearchIndex = [] 2 | -------------------------------------------------------------------------------- /docs/javadoc/v1/module-search-index.js: -------------------------------------------------------------------------------- 1 | var moduleSearchIndex = [{"l":"library","url":"index.html"}] 2 | -------------------------------------------------------------------------------- /docs/kdoc/v1/styles/logo-styles.css: -------------------------------------------------------------------------------- 1 | #logo { 2 | background-image: url(../images/docs_logo.svg); 3 | } -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/gallery/labels.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/labels.gif -------------------------------------------------------------------------------- /docs/gallery/overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/overlay.gif -------------------------------------------------------------------------------- /docs/gallery/custom_sizes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/custom_sizes.gif -------------------------------------------------------------------------------- /docs/gallery/fab_options.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/fab_options.gif -------------------------------------------------------------------------------- /docs/gallery/expandable_fab.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/expandable_fab.gif -------------------------------------------------------------------------------- /docs/gallery/simple_use_case.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/simple_use_case.gif -------------------------------------------------------------------------------- /docs/javadoc/v1/resources/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/resources/x.png -------------------------------------------------------------------------------- /docs/kdoc/v0/library/package-list: -------------------------------------------------------------------------------- 1 | $dokka.format:html 2 | $dokka.linkExtension:html 3 | 4 | com.nambimobile.widgets.efab 5 | -------------------------------------------------------------------------------- /docs/javadoc/v1/element-list: -------------------------------------------------------------------------------- 1 | $dokka.format:javadoc-v1 2 | $dokka.linkExtension:html 3 | 4 | com.nambimobile.widgets.efab 5 | 6 | -------------------------------------------------------------------------------- /docs/javadoc/v1/package-list: -------------------------------------------------------------------------------- 1 | $dokka.format:javadoc-v1 2 | $dokka.linkExtension:html 3 | 4 | com.nambimobile.widgets.efab 5 | 6 | -------------------------------------------------------------------------------- /docs/javadoc/v1/resources/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/resources/glass.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /docs/gallery/highly_customizable.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/highly_customizable.gif -------------------------------------------------------------------------------- /docs/gallery/bottom_app_bar_center.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/bottom_app_bar_center.gif -------------------------------------------------------------------------------- /docs/gallery/snackbar_compatibility.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/snackbar_compatibility.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea 3 | .gradle 4 | /local.properties 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | -------------------------------------------------------------------------------- /docs/gallery/multiple_expandable_fabs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/multiple_expandable_fabs.gif -------------------------------------------------------------------------------- /docs/gallery/bottom_app_bar_compatibility.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/bottom_app_bar_compatibility.gif -------------------------------------------------------------------------------- /docs/gallery/bottom_app_bar_covered_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/gallery/bottom_app_bar_covered_right.gif -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /docs/kdoc/v1/scripts/sourceset_dependencies.js: -------------------------------------------------------------------------------- 1 | sourceset_dependencies='{":library:dokkaHtml/debug":[],":library:dokkaHtml/main":[],":library:dokkaHtml/release":[]}' 2 | -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/examples/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-bg_glass_65_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-bg_glass_65_dadada_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/v1/dokka-javadoc-stylesheet.css: -------------------------------------------------------------------------------- 1 | pre.wrap-overflow { 2 | overflow-x: auto; 3 | white-space: pre-wrap; 4 | white-space: -moz-pre-wrap; 5 | word-wrap: break-word; 6 | } -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nambicompany/expandable-fab/HEAD/docs/javadoc/v1/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /docs/javadoc/v1/package-search-index.js: -------------------------------------------------------------------------------- 1 | var packageSearchIndex = [{"l":"com.nambimobile.widgets.efab","url":"com/nambimobile/widgets/efab/package-summary.html"}, {"l":"All packages","url":"index.html"}] 2 | -------------------------------------------------------------------------------- /docs/kdoc/v1/images/logo-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore metadata generated by Jekyll 2 | _site 3 | .sass-cache 4 | .jekyll-cache/ 5 | .jekyll-metadata 6 | 7 | # Ignore folders potentially generated by Bundler 8 | .bundle/ 9 | vendor/ 10 | -------------------------------------------------------------------------------- /docs/kdoc/v1/images/copy-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/kdoc/v1/images/footer-go-to-link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/kdoc/v1/images/arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Apr 04 19:06:14 EDT 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /docs/kdoc/v1/images/copy-successful-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/kdoc/v1/images/go-to-top-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /library/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #000000 4 | #333333 5 | #AAAAAA 6 | #888888 7 | 8 | -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_plus_white_84dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/ic_plus_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_menu_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/kotlin/com/nambimobile/widgets/efab/Errors.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.widgets.efab 2 | 3 | @JvmSynthetic 4 | internal fun illegalState(message: String, cause: Throwable? = null): Nothing = 5 | throw IllegalStateException(message, cause) 6 | 7 | @JvmSynthetic 8 | internal fun illegalArg(message: String, cause: Throwable? = null): Nothing = 9 | throw IllegalArgumentException(message, cause) -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_email_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_create_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_location_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_more_horiz_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_event_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_note_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/kotlin/com/nambimobile/widgets/efab/LabelPosition.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.widgets.efab 2 | 3 | import android.view.Gravity 4 | 5 | /** 6 | * The legal positions of Labels, in relation to the view they're attached to. 7 | * By default, labels are positioned to the [LEFT] of the view they're attached to. 8 | * 9 | * @since 1.0.0 10 | * */ 11 | enum class LabelPosition(val value: Int) { 12 | LEFT(Gravity.START.or(Gravity.CENTER_VERTICAL)), 13 | RIGHT(Gravity.END.or(Gravity.CENTER_VERTICAL)) 14 | } -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_flight_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_flight_white_42dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_train_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4dpx 4 | 8dp 5 | 12dp 6 | 16dp 7 | 20dp 8 | 24dp 9 | 10 | 14sp 11 | 12 | 6dp 13 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | library 5 | 6 | 7 | 8 | library
9 |
10 |

Packages

11 | 12 | 13 | 14 | 17 | 19 | 20 | 21 |
15 |

com.nambimobile.widgets.efab

16 |
18 |
22 |

Index

23 | All Types 24 | 25 | 26 | -------------------------------------------------------------------------------- /library/src/main/kotlin/com/nambimobile/widgets/efab/FabOptionPosition.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.widgets.efab 2 | 3 | import android.view.Gravity 4 | 5 | /** 6 | * The legal positions of FabOptions, in relation to the previous FabOption in an orientation. 7 | * By default, FabOptions are positioned [ABOVE] the previous FabOption in an orientation. 8 | * 9 | * @since 1.0.0 10 | * */ 11 | enum class FabOptionPosition(val value: Int) { 12 | ABOVE(Gravity.TOP.or(Gravity.CENTER_HORIZONTAL)), 13 | BELOW(Gravity.BOTTOM.or(Gravity.CENTER_HORIZONTAL)) 14 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/WackyFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class WackyFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.wacky_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_walk_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_walk_white_42dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/LabelsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class LabelsFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.labels_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/OverlayFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class OverlayFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.overlay_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/NoLabelsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class NoLabelsFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.no_labels_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/FabOptionsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class FabOptionsFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.faboptions_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/CustomSizesFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class CustomSizesFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.custom_sizes_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/ExpandableFabFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class ExpandableFabFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.expandablefab_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/OpenDownwardsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class OpenDownwardsFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.open_downwards_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | title: ExpandableFab 2 | description: A highly customizable Android widget that displays the available actions of a UI via an expandable set of floating action buttons - with optional labels and fluid animations. 3 | theme: jekyll-theme-cayman 4 | 5 | # custom site-wide variables 6 | baseurl: /expandable-fab 7 | repository_url: https://github.com/nambicompany/expandable-fab 8 | nambi_company_url: http://www.nambi.io 9 | gallery_absolute_path: https://github.com/nambicompany/expandable-fab/tree/master/docs/gallery 10 | gallery_relative_path: /gallery 11 | javadoc_path: /javadoc 12 | kdoc_path: /kdoc -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-size/-a-u-t-o.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabSize.AUTO - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabSize / AUTO
9 |
10 |

AUTO

11 | 12 | AUTO 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-size/-m-i-n-i.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabSize.MINI - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabSize / MINI
9 |
10 |

MINI

11 | 12 | MINI 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/MultipleExpandableFabsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | 9 | class MultipleExpandableFabsFragment : Fragment() { 10 | override fun onCreateView( 11 | inflater: LayoutInflater, container: ViewGroup?, 12 | savedInstanceState: Bundle? 13 | ): View? { 14 | return inflater.inflate(R.layout.multiple_expandablefabs_fragment, container, false) 15 | } 16 | } -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-size/-c-u-s-t-o-m.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabSize.CUSTOM - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabSize / CUSTOM
9 |
10 |

CUSTOM

11 | 12 | CUSTOM 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-size/-n-o-r-m-a-l.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabSize.NORMAL - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabSize / NORMAL
9 |
10 |

NORMAL

11 | 12 | NORMAL 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 18 | 19 |
20 |

404

21 | 22 |

Page not found :(

23 |

The requested page could not be found. If you believe this to be in error, please contact {{ site.github.owner_name }}.

24 |
25 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label-position/-l-e-f-t.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LabelPosition.LEFT - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / LabelPosition / LEFT
9 |
10 |

LEFT

11 | 12 | LEFT 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_reminder_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label-position/-r-i-g-h-t.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LabelPosition.RIGHT - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / LabelPosition / RIGHT
9 |
10 |

RIGHT

11 | 12 | RIGHT 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option-position/-a-b-o-v-e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOptionPosition.ABOVE - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOptionPosition / ABOVE
9 |
10 |

ABOVE

11 | 12 | ABOVE 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option-position/-b-e-l-o-w.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOptionPosition.BELOW - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOptionPosition / BELOW
9 |
10 |

BELOW

11 | 12 | BELOW 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-orientation/-p-o-r-t-r-a-i-t.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Orientation.PORTRAIT - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Orientation / PORTRAIT
9 |
10 |

PORTRAIT

11 | 12 | PORTRAIT 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 192dp 4 | 5 | 12dp 6 | 14dp 7 | 16dp 8 | 20dp 9 | 24dp 10 | 11 | 12sp 12 | 14sp 13 | 16sp 14 | 18sp 15 | 20sp 16 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-orientation/-l-a-n-d-s-c-a-p-e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Orientation.LANDSCAPE - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Orientation / LANDSCAPE
9 |
10 |

LANDSCAPE

11 | 12 | LANDSCAPE 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #1976D2 4 | #1565C0 5 | #43A047 6 | 7 | #0000FF 8 | #9374DE 9 | #FF8800 10 | #7F007F 11 | #5283F5 12 | #7F7F00 13 | #007F00 14 | #58BFAB 15 | 16 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_lock_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_car_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_car_white_42dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/kdoc/v1/images/anchor-copy-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-size/value.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabSize.value - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabSize / value
9 |
10 |

value

11 | 12 | val value: Int 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/src/main/res/layout/navigation_drawer_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label-position/value.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LabelPosition.value - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / LabelPosition / value
9 |
10 |

value

11 | 12 | val value: Int 13 | 14 | 15 | -------------------------------------------------------------------------------- /library/src/main/kotlin/com/nambimobile/widgets/efab/Orientation.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.widgets.efab 2 | 3 | /** 4 | * The screen orientations that the views of this widget can be in. If you only set a single 5 | * ExpandableFab widget, it will automatically be used for both portrait and landscape orientations. 6 | * 7 | * For example: defining an Overlay, ExpandableFab and 3 FabOptions all to be in 8 | * Orientation.PORTRAIT, while also *NOT* defining anything else to be in Orientation.LANDSCAPE, 9 | * will ensure that the previously defined Overlay, ExpandableFab and 3 FabOptions will actually 10 | * show in both portrait AND landscape configurations. See [ExpandableFabLayout] for more details. 11 | * 12 | * @since 1.0.0 13 | * */ 14 | enum class Orientation { 15 | PORTRAIT, 16 | LANDSCAPE 17 | } -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option-position/value.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOptionPosition.value - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOptionPosition / value
9 |
10 |

value

11 | 12 | val value: Int 13 | 14 | 15 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /examples/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /examples/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/position.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.position - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / position
9 |
10 |

position

11 | 12 | var position: LabelPosition 13 |

The Label's LabelPosition, in relation to the view it's attached to.

14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_bike_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable/ic_bike_white_42dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/hide.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.hide - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / hide
9 |
10 |

hide

11 | 12 | fun hide(): Unit 13 |

Hides the ExpandableFab and optional label.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/show.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.show - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / show
9 |
10 |

show

11 | 12 | fun show(): Unit 13 |

Shows the ExpandableFab and optional label.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-orientation-configuration/overlay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OrientationConfiguration.overlay - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / OrientationConfiguration / overlay
9 |
10 |

overlay

11 | 12 | var overlay: Overlay? 13 |

The Overlay in this orientation. May be null.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-orientation-configuration/efab.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OrientationConfiguration.efab - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / OrientationConfiguration / efab
9 |
10 |

efab

11 | 12 | var efab: ExpandableFab? 13 |

The ExpandableFab in this orientation. May be null.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/javadoc/v0/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/label-text-color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.labelTextColor - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / labelTextColor
9 |
10 |

labelTextColor

11 | 12 | var labelTextColor: Int 13 |

The color of the Label's text. Usage of this property is preferred over the inherited 14 | setTextColor method variations.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-overlay/orientation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Overlay.orientation - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Overlay / orientation
9 |
10 |

orientation

11 | 12 | var orientation: Orientation 13 |

The Orientation this Overlay is viewable in. Default value is Orientation.PORTRAIT.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-overlay/overlay-color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Overlay.overlayColor - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Overlay / overlayColor
9 |
10 |

overlayColor

11 | 12 | var overlayColor: Int 13 |

The color of the overlay. Default value is white.

14 |

Usage of this property is preferred over the inherited setBackgroundColor method.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/orientation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.orientation - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / orientation
9 |
10 |

orientation

11 | 12 | var orientation: Orientation 13 |

The Orientation this FabOption is viewable in. Default value is Orientation.PORTRAIT.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/label-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.labelText - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / labelText
9 |
10 |

labelText

11 | 12 | var labelText: CharSequence? 13 |

The text of the Label. Can be set to null to hide the label. Usage of this property is 14 | preferred over the inherited set/getText methods.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/orientation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.orientation - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / orientation
9 |
10 |

orientation

11 | 12 | var orientation: Orientation 13 |

The Orientation this ExpandableFab is viewable in. Default value is Orientation.PORTRAIT.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/label-background-color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.labelBackgroundColor - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / labelBackgroundColor
9 |
10 |

labelBackgroundColor

11 | 12 | var labelBackgroundColor: Int 13 |

The color of the Label's background. Usage of this property is preferred over the 14 | inherited setBackgroundColor method.

15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/DisabledFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import android.widget.TextView 8 | import androidx.fragment.app.Fragment 9 | import com.nambimobile.widgets.efab.ExpandableFab 10 | 11 | class DisabledFragment : Fragment() { 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | return inflater.inflate(R.layout.disabled_fragment, container, false) 17 | } 18 | 19 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 20 | val expandableFab = view.findViewById(R.id.expandable_fab) 21 | 22 | view.findViewById(R.id.info_block).setOnClickListener { 23 | expandableFab.efabEnabled = !expandableFab.efabEnabled 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/efab-color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.efabColor - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / efabColor
9 |
10 |

efabColor

11 | 12 | var efabColor: Int 13 |

The color of the ExpandableFab. Default value is your app's colorAccent.

14 |

Usage of this property is preferred over the inherited setBackgroundColor and 15 | backgroundTintList methods.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/is-open.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.isOpen - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / isOpen
9 |
10 |

isOpen

11 | 12 | fun isOpen(): Boolean 13 |

Returns true if the ExpandableFab is currently open (any attached Overlay, FabOption and 14 | Labels are visible and all animations are done).

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/fab-option-color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.fabOptionColor - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / fabOptionColor
9 |
10 |

fabOptionColor

11 | 12 | var fabOptionColor: Int 13 |

The color of the FabOption. Default value is your app's colorAccent.

14 |

Usage of this property is preferred over the inherited setBackgroundColor and 15 | backgroundTintList methods.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-overlay/overlay-alpha.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Overlay.overlayAlpha - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Overlay / overlayAlpha
9 |
10 |

overlayAlpha

11 | 12 | var overlayAlpha: Float 13 |

The opacity of the overlay as a positive float, where 0 is completely transparent and 1 is 14 | completely opaque. Default value is 0.78431f.

15 |

Usage of this property is preferred over the inherited set/getAlpha methods.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/fab-option-position.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.fabOptionPosition - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / fabOptionPosition
9 |
10 |

fabOptionPosition

11 | 12 | var fabOptionPosition: FabOptionPosition 13 |

How each FabOption in this orientation will be positioned relative to the previous 14 | FabOption. Default value is FabOptionPosition.ABOVE.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/efab-icon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.efabIcon - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / efabIcon
9 |
10 |

efabIcon

11 | 12 | var efabIcon: Drawable? 13 |

The drawable to show as the ExpandableFab's icon. Default value is a white plus sign vector 14 | drawable.

15 |

Usage of this property is preferred over the inherited set/getImageXXX methods.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/fab-option-icon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.fabOptionIcon - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / fabOptionIcon
9 |
10 |

fabOptionIcon

11 | 12 | var fabOptionIcon: Drawable? 13 |

The drawable to show as the FabOption's icon. Default value is null (no icon shown).

14 |

Usage of this property is preferred over the inherited set/getImageXXX methods.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/closing-animation-duration-ms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.closingAnimationDurationMs - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / closingAnimationDurationMs
9 |
10 |

closingAnimationDurationMs

11 | 12 | var closingAnimationDurationMs: Long 13 |

The duration (in milliseconds as a positive long) of the ExpandableFab's closing animations. 14 | Default value is 500L.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/opening-animation-duration-ms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.openingAnimationDurationMs - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / openingAnimationDurationMs
9 |
10 |

openingAnimationDurationMs

11 | 12 | var openingAnimationDurationMs: Long 13 |

The duration (in milliseconds as a positive long) of the ExpandableFab's opening animations. 14 | Default value is 250L.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v1/styles/jetbrains-mono.css: -------------------------------------------------------------------------------- 1 | @font-face{ 2 | font-family: 'JetBrains Mono'; 3 | src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/web/JetBrainsMono-Regular.eot') format('embedded-opentype'), 4 | url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2'), 5 | url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype'); 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | @font-face{ 11 | font-family: 'JetBrains Mono'; 12 | src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/web/JetBrainsMono-Bold.eot') format('embedded-opentype'), 13 | url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Bold.woff2') format('woff2'), 14 | url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Bold.ttf') format('truetype'); 15 | font-weight: bold; 16 | font-style: bold; 17 | } -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/margin-px.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.marginPx - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / marginPx
9 |
10 |

marginPx

11 | 12 | var marginPx: Float 13 |

The margin (in pixels as a positive float) between the Label and the view it is attached to. 14 | Negative values are not allowed since clients should likely be changing the Label's 15 | position if they wanted to move the Label to the opposite side of the view it's attached 16 | to.

17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/hidden-to-visible-animation-duration-ms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.hiddenToVisibleAnimationDurationMs - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / hiddenToVisibleAnimationDurationMs
9 |
10 |

hiddenToVisibleAnimationDurationMs

11 | 12 | var hiddenToVisibleAnimationDurationMs: Long 13 |

The duration (in milliseconds as a positive long) of the animations that the Label will 14 | play when going from a hidden to visible state.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/label-elevation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.labelElevation - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / labelElevation
9 |
10 |

labelElevation

11 | 12 | var labelElevation: Int 13 |

The elevation of the Label, in pixels as a positive float. Retrieve this value in the 14 | correct form from your dimens.xml file using: 15 | resources.getDimensionPixelSize(R.dimen.name_of_elevation_size). Usage of this property is 16 | preferred over the inherited set/getElevation methods.

17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/visible-to-hidden-animation-duration-ms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.visibleToHiddenAnimationDurationMs - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / visibleToHiddenAnimationDurationMs
9 |
10 |

visibleToHiddenAnimationDurationMs

11 | 12 | var visibleToHiddenAnimationDurationMs: Long 13 |

The duration (in milliseconds as a positive long) of the animations that the Label will 14 | play when going from a visible to hidden state.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/label-text-size.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.labelTextSize - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / labelTextSize
9 |
10 |

labelTextSize

11 | 12 | var labelTextSize: Float 13 |

The size of the Label's text, as a float. Retrieve this value in the correct form from your 14 | dimens.xml file using: resources.getDimension(R.dimen.name_of_text_size). Text sizes should 15 | use sp as the unit. Usage of this property is preferred over the inherited set/getTextSize 16 | methods.

17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-overlay/opening-animation-duration-ms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Overlay.openingAnimationDurationMs - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Overlay / openingAnimationDurationMs
9 |
10 |

openingAnimationDurationMs

11 | 12 | var openingAnimationDurationMs: Long 13 |

The duration (in milliseconds as a positive long) of the animations that will be played 14 | when this Overlay is being shown from a hidden state (when the ExpandableFab is opening). 15 | Default value is 300L.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-overlay/closing-animation-duration-ms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Overlay.closingAnimationDurationMs - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Overlay / closingAnimationDurationMs
9 |
10 |

closingAnimationDurationMs

11 | 12 | var closingAnimationDurationMs: Long 13 |

The duration (in milliseconds as a positive long) of the animations that will be played 14 | when this Overlay is being hidden from a visible state (when the ExpandableFab is closing). 15 | Default value is 300L.

16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/src/main/res/layout/default_configuration_code_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 10 | 13 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/closing-animation-duration-ms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.closingAnimationDurationMs - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / closingAnimationDurationMs
9 |
10 |

closingAnimationDurationMs

11 | 12 | var closingAnimationDurationMs: Long 13 |

The duration (in milliseconds as a positive long) of the animations that will be played 14 | when this FabOption is being hidden from a visible state (when the ExpandableFab is closing). 15 | Default value is 75L.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/opening-animation-duration-ms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.openingAnimationDurationMs - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / openingAnimationDurationMs
9 |
10 |

openingAnimationDurationMs

11 | 12 | var openingAnimationDurationMs: Long 13 |

The duration (in milliseconds as a positive long) of the animations that will be played 14 | when this FabOption is being shown from a hidden state (when the ExpandableFab is opening). 15 | Default value is 125L.

16 | 17 | 18 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Kelvin Abumere and The Nambi Company 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/translation-x-px.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.translationXPx - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / translationXPx
9 |
10 |

translationXPx

11 | 12 | var translationXPx: Float 13 |

The distance (in pixels as a float) the Label will travel horizontally during animations. 14 | A negative value will make the Label travel to the left, while a positive value will make 15 | it travel to the right. See its use in visibleToHiddenAnimations and 16 | hiddenToVisibleAnimations.

17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-orientation-configuration/fab-options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OrientationConfiguration.fabOptions - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / OrientationConfiguration / fabOptions
9 |
10 |

fabOptions

11 | 12 | var fabOptions: MutableList<FabOption> 13 |

The FabOptions (with optional labels) in this orientation. May be empty.

14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/javadoc/v1/type-search-index.js: -------------------------------------------------------------------------------- 1 | var typeSearchIndex = [{"p":"com.nambimobile.widgets.efab","l":"ExpandableFab","url":"com/nambimobile/widgets/efab/ExpandableFab.html"}, {"p":"com.nambimobile.widgets.efab","l":"ExpandableFabLayout","url":"com/nambimobile/widgets/efab/ExpandableFabLayout.html"}, {"p":"com.nambimobile.widgets.efab","l":"FabOption","url":"com/nambimobile/widgets/efab/FabOption.html"}, {"p":"com.nambimobile.widgets.efab","l":"FabOptionPosition","url":"com/nambimobile/widgets/efab/FabOptionPosition.html"}, {"p":"com.nambimobile.widgets.efab","l":"FabSize","url":"com/nambimobile/widgets/efab/FabSize.html"}, {"p":"com.nambimobile.widgets.efab","l":"Label","url":"com/nambimobile/widgets/efab/Label.html"}, {"p":"com.nambimobile.widgets.efab","l":"LabelPosition","url":"com/nambimobile/widgets/efab/LabelPosition.html"}, {"p":"com.nambimobile.widgets.efab","l":"Orientation","url":"com/nambimobile/widgets/efab/Orientation.html"}, {"p":"com.nambimobile.widgets.efab","l":"OrientationConfiguration","url":"com/nambimobile/widgets/efab/OrientationConfiguration.html"}, {"p":"com.nambimobile.widgets.efab","l":"Overlay","url":"com/nambimobile/widgets/efab/Overlay.html"}, {"l":"All classes","url":"allclasses.html"}] 2 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/on-detached-from-window.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.onDetachedFromWindow - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / onDetachedFromWindow
9 |
10 |

onDetachedFromWindow

11 | 12 | protected fun onDetachedFromWindow(): Unit 13 |

Called when the view is detached from a window. At this point it no longer has a surface 14 | for drawing. Stops any animations on the ExpandableFab, as it's no longer on screen.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/portrait-configuration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.portraitConfiguration - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / portraitConfiguration
9 |
10 |

portraitConfiguration

11 | 12 | var portraitConfiguration: OrientationConfiguration 13 |

A holder for all the views of the ExpandableFab widget declared in the portrait screen 14 | orientation. Values for the views will only be populated after they are added through calls 15 | to ExpandableFabLayout's addView methods (or after they're defined via XML).

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/close.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.close - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / close
9 |
10 |

close

11 | 12 | fun close(): Unit 13 |

Attempts to close the ExpandableFab, playing the appropriate animations in the process. If 14 | the ExpandableFab is not in a position to close (it's still playing its opening 15 | animations), it will remind itself to close once it is able.

16 |

Safe to call even when no ExpandableFab is open (will do nothing).

17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/landscape-configuration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.landscapeConfiguration - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / landscapeConfiguration
9 |
10 |

landscapeConfiguration

11 | 12 | var landscapeConfiguration: OrientationConfiguration 13 |

A holder for all the views of the ExpandableFab widget declared in the landscape screen 14 | orientation. Values for the views will only be populated after they are added through calls 15 | to ExpandableFabLayout's addView methods (or after they're defined via XML).

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/-init-.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.<init> - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / <init>
9 |
10 |

<init>

11 | 12 | Label(context: Context) 13 |

Used to create a Label programmatically. Clients should not need to call this directly as 14 | all labeled Views of the ExpandableFab widget already create their own labels which can 15 | be retrieved and modified (but not reassigned) as needed.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/icon-animation-rotation-deg.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.iconAnimationRotationDeg - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / iconAnimationRotationDeg
9 |
10 |

iconAnimationRotationDeg

11 | 12 | var iconAnimationRotationDeg: Float 13 |

A float, in degrees, representing how much the ExpandableFab's icon will rotate when 14 | animating. When opening, the ExpandableFab will rotate from 0 to this value. When closing, 15 | the icon will rotate from this value to its initial position of 0. Default value is -135f.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | # Hello! This is where you manage which Jekyll version is used to run. 4 | # When you want to use a different version, change it below, save the 5 | # file and run `bundle install`. Run Jekyll with `bundle exec`, like so: 6 | # 7 | # bundle exec jekyll serve 8 | # 9 | # This will help ensure the proper Jekyll version is running. 10 | # Happy Jekylling! 11 | 12 | # This is the default theme for new Jekyll sites. You may change this to anything you like. 13 | gem "minima", "~> 2.0" 14 | 15 | # If you want to use GitHub Pages, remove the "gem "jekyll"" above and 16 | # uncomment the line below. To upgrade, run `bundle update github-pages`. 17 | gem "github-pages", "~> 206", group: :jekyll_plugins 18 | 19 | # If you have any plugins, put them here! 20 | group :jekyll_plugins do 21 | gem "jekyll-feed", "~> 0.6" 22 | end 23 | 24 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 25 | # and associated library. 26 | install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do 27 | gem "tzinfo", "~> 1.2" 28 | gem "tzinfo-data" 29 | end 30 | 31 | # Performance-booster for watching directories on Windows 32 | gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform? 33 | 34 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/label.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.label - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / label
9 |
10 |

label

11 | 12 | val label: Label 13 |

The optional label attached to this FabOption. The label will only be shown when its 14 | labelText is not null. Default values for the label are as follows:

15 |

labelText = null 16 | labelTextColor = white 17 | labelTextSize = 14sp 18 | labelBackgroundColor = gray (#333333) 19 | labelElevation = 6dp 20 | position = LabelPosition.LEFT 21 | marginPx = 50f 22 | translationPx = 100f 23 | visibleToHiddenAnimationDurationMs = 75L 24 | hiddenToVisibleAnimationDurationMs = 250L 25 | overshootTension = 3.5f

26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/src/main/res/layout/navigation_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 16 | 17 | 18 | 26 | 27 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/first-fab-option-margin-px.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.firstFabOptionMarginPx - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / firstFabOptionMarginPx
9 |
10 |

firstFabOptionMarginPx

11 | 12 | var firstFabOptionMarginPx: Float 13 |

The margin (in pixels as a positive float) between the first FabOption in this orientation 14 | and the ExpandableFab itself. Depending on the size you set for the ExpandableFab, you may 15 | want this margin to be different than successiveFabOptionMarginPx. Default value is 80f.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/label.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.label - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / label
9 |
10 |

label

11 | 12 | val label: Label 13 |

The optional label attached to this ExpandableFab. The label will only be shown when its 14 | labelText is not null. Default values for the label are as follows:

15 |

labelText = null 16 | labelTextColor = white 17 | labelTextSize = 14sp 18 | labelBackgroundColor = gray (#333333) 19 | labelElevation = 6dp 20 | position = LabelPosition.LEFT 21 | marginPx = 50f 22 | translationPx = 100f 23 | visibleToHiddenAnimationDurationMs = 125L 24 | hiddenToVisibleAnimationDurationMs = 250L 25 | overshootTension = 3.5f

26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/successive-fab-option-margin-px.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.successiveFabOptionMarginPx - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / successiveFabOptionMarginPx
9 |
10 |

successiveFabOptionMarginPx

11 | 12 | var successiveFabOptionMarginPx: Float 13 |

The margin (in pixels as a positive float) between successive FabOptions in this 14 | ExpandableFab orientation. See firstFabOptionMarginPx if trying to set the margin 15 | between the first FabOption in this orientation and the ExpandableFab itself. Default value 16 | is 75f.

17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/overshoot-tension.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.overshootTension - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / overshootTension
9 |
10 |

overshootTension

11 | 12 | var overshootTension: Float 13 |

The tension (as a positive float) in an OvershootInterpolator applied on the Label when it 14 | is being shown from a hidden state. Larger values will exaggerate the effect more.

15 |

The OvershootInterpolator allows us to have an animation where the Label will fling past 16 | its marginPx when initially appearing, before smoothly coming back toward its marginPx 17 | value.

18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/README.txt: -------------------------------------------------------------------------------- 1 | # How to test locally 2 | https://docs.github.com/en/github/working-with-github-pages/testing-your-github-pages-site-locally-with-jekyll 3 | 4 | If using Bundler: bundle exec jekyll serve --baseurl '' 5 | 6 | 7 | # General Jekyll/Liquid/GitHub Pages docs 8 | https://jekyllrb.com/docs/pages/ 9 | https://docs.github.com/en/github/working-with-github-pages/adding-content-to-your-github-pages-site-using-jekyll 10 | 11 | 12 | # Create new gifs of library functionality 13 | * First trim the video (Windows Photos app has trim feature under for mp4s under 'Edit & Create') 14 | * Use https://ezgif.com/video-to-gif to convert video to gif (other options, including built in Samsung functionality, come out too blurry) 15 | * Select max frame rate available when converting to gif 16 | * Use https://ezgif.com/resize to resize the gif 17 | * Set percentage to 45% in order to match dimensions of gifs already in the gallery folder 18 | * Save it and you're set! 19 | 20 | 21 | # General Notes 22 | * CSS from the cayman theme is overridden in _sass/jekyll-theme-cayman.scss. Specifically, we added 'max-height: [some value];' to the '.highlight pre, pre' rule set. This prevents code blocks from becoming too long when containing large code snippets. The blocks will now introduce a scrollbar if the content goes beyond the value set in 'max-height'. -------------------------------------------------------------------------------- /docs/kdoc/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: ExpandableFab KDoc 4 | description: Documentation for the library in KDoc format for Kotlin developers. 5 | show_javadoc_btn: true 6 | --- 7 | 8 | The ExpandableFab library uses Semantic Versioning for releases, in the form `MAJOR.MINOR.PATCH`. Choose the version of documentation below that corresponds to the `MAJOR` number in your ExpandableFab release. 9 | 10 | ``` 11 | NOTE: there may be components of the API shown in the documentation that you do not have access to. 12 | These API components will be clearly marked with the `@since [version]` block tag, where '[version]' is the release version of the ExpandableFab library that introduced that component. 13 | Upgrade your ExpandableFab dependency to at least [version] in order to gain access to that particular component. 14 | ``` 15 | 16 | --- 17 | 18 | {% for file in site.static_files %} 19 | {% if file.name == "v0.kdoc" %} 20 | {% capture doc_link %} 21 | {{ site.kdoc_path | relative_url }}/{{ file.basename }}/library/index.html 22 | {% endcapture %} 23 | 24 | [{{ file.basename }}]({{ doc_link }}) 25 | {% elsif file.extname == ".kdoc" %} 26 | {% capture doc_link %} 27 | {{ site.kdoc_path | relative_url }}/{{ file.basename }}/index.html 28 | {% endcapture %} 29 | 30 | [{{ file.basename }}]({{ doc_link }}) 31 | {% endif %} 32 | {% endfor %} -------------------------------------------------------------------------------- /docs/kdoc/v1/images/docs_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/on-touch-event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label.onTouchEvent - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Label / onTouchEvent
9 |
10 |

onTouchEvent

11 | 12 | fun onTouchEvent(event: MotionEvent?): Boolean 13 |

Scales the Label down when pressed, and back up when released. Gives the user some visual 14 | feedback to show that the Label was pressed.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/opening-overshoot-tension.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.openingOvershootTension - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / openingOvershootTension
9 |
10 |

openingOvershootTension

11 | 12 | var openingOvershootTension: Float 13 |

The tension (as a positive float) in an OvershootInterpolator applied on the FabOption when 14 | it's playing its animations for being shown from a hidden state (when the ExpandableFab is 15 | opening). The OvershootInterpolator allows us to have an animation where the FabOption 16 | will grow past its regular size when initially appearing, before smoothly shrinking down 17 | to regular size. Larger values will exaggerate the effort more. Default value is 3.5f.

18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/closing-anticipate-tension.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.closingAnticipateTension - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / closingAnticipateTension
9 |
10 |

closingAnticipateTension

11 | 12 | var closingAnticipateTension: Float 13 |

The tension (as a positive float) applied on the ExpandableFab's icon to mimic an 14 | AnticipateInterpolator when it's playing its closing animations. An AnticipateInterpolator 15 | allows us to have a closing animation where the ExpandableFab's icon will begin rotating 16 | slightly backwards, before smoothly rotating forward to its default 0 degree rotation. 17 | Every multiple of 10f will be a full 360 degree rotation backwards. Default value is 2f.

18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/javadoc/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: ExpandableFab JavaDoc 4 | description: Documentation for the library in JavaDoc format for Java developers. 5 | show_kdoc_btn: true 6 | --- 7 | 8 | The ExpandableFab library uses Semantic Versioning for releases, in the form `MAJOR.MINOR.PATCH`. Choose the version of documentation below that corresponds to the `MAJOR` number in your ExpandableFab release. 9 | 10 | ``` 11 | NOTE: there may be components of the API shown in the documentation that you do not have access to. 12 | These API components will be clearly marked with the `@since [version]` block tag, where '[version]' is the release version of the ExpandableFab library that introduced that component. 13 | Upgrade your ExpandableFab dependency to at least [version] in order to gain access to that particular component. 14 | ``` 15 | 16 | --- 17 | 18 | {% for file in site.static_files %} 19 | {% if file.name == "v0.javadoc" %} 20 | {% capture doc_link %} 21 | {{ site.javadoc_path | relative_url }}/{{ file.basename }}/index.html 22 | {% endcapture %} 23 | 24 | [{{ file.basename }}]({{ doc_link }}) 25 | {% elsif file.extname == ".javadoc" %} 26 | {% capture doc_link %} 27 | {{ site.javadoc_path | relative_url }}/{{ file.basename }}/com/nambimobile/widgets/efab/package-summary.html 28 | {% endcapture %} 29 | 30 | [{{ file.basename }}]({{ doc_link }}) 31 | {% endif %} 32 | {% endfor %} -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/remove-all-views.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.removeAllViews - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / removeAllViews
9 |
10 |

removeAllViews

11 | 12 | fun removeAllViews(): Unit 13 |

Removes all child views in both portrait and landscape orientation from the 14 | ExpandableFabLayout.

15 |

This is the only correct way to remove views from your ExpandableFab widget should you 16 | choose to reuse the same ExpandableFabLayout instead of instantiating a new one. Using any 17 | other removeView variation will provide no guarantees of proper internal state control, 18 | and thus could potentially lead to Exceptions during runtime.

19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/set-size.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.setSize - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / setSize
9 |
10 |

setSize

11 | 12 | fun setSize(size: Int): Unit 13 |

Sets the size of the ExpandableFab. Overridden to ensure we never set the size to be 14 | FabSize.CUSTOM.

15 |

Clients should never need to call this directly. Instead, set ExpandableFab.efabSize.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/set-size.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.setSize - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / setSize
9 |
10 |

setSize

11 | 12 | fun setSize(size: Int): Unit 13 |

Sets the size of the FabOption. Overridden to ensure we never set the size to be 14 | FabSize.CUSTOM.

15 |

Clients should never need to call this directly. Instead, set ExpandableFab.fabOptionSize.

16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/fab-option-enabled.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.fabOptionEnabled - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / fabOptionEnabled
9 |
10 |

fabOptionEnabled

11 | 12 | var fabOptionEnabled: Boolean 13 |

The enabled state of this FabOption and its label. Disabled FabOptions and labels will be 14 | visually distinct and unclickable. Default value is true (enabled).

15 |

Usage of this property is preferred over the inherited is/setEnabled methods.

16 |

NOTE: If you disable a FabOption and its label, remember to re-enable it before trying to 17 | update one of its properties. For example, disabling a FabOption then manually changing 18 | its background color will not automatically re-enable the FabOption. It, and its label, 19 | will remain disabled.

20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/efab-enabled.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.efabEnabled - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / efabEnabled
9 |
10 |

efabEnabled

11 | 12 | var efabEnabled: Boolean 13 |

The enabled state of this ExpandableFab and its label. Disabled ExpandableFabs and labels 14 | will be visually distinct and unclickable. Default value is true (enabled).

15 |

Usage of this property is preferred over the inherited is/setEnabled methods.

16 |

NOTE: If you disable an ExpandableFab and its label, remember to re-enable it before 17 | trying to update one of its properties. For example, disabling an ExpandableFab then 18 | manually changing its background color will not automatically re-enable the ExpandableFab. 19 | It, and its label, will remain disabled.

20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-overlay/set-on-click-listener.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Overlay.setOnClickListener - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Overlay / setOnClickListener
9 |
10 |

setOnClickListener

11 | 12 | fun setOnClickListener(onClickListener: OnClickListener?): Unit 13 |

Registers a callback to be invoked when this Overlay is clicked. The default behavior the 14 | Overlay will be executed before this custom callback.

15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/set-on-click-listener.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.setOnClickListener - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / setOnClickListener
9 |
10 |

setOnClickListener

11 | 12 | fun setOnClickListener(onClickListener: OnClickListener?): Unit 13 |

Registers a callback to be invoked when this ExpandableFab or its label is clicked. The 14 | default behavior the ExpandableFab will be executed before this custom callback.

15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | 4 | def versionMajor = 1 5 | def versionMinor = 1 6 | def versionPatch = 2 7 | 8 | android { 9 | compileSdkVersion 30 10 | 11 | defaultConfig { 12 | applicationId "com.nambimobile.examples.efab" 13 | minSdkVersion 15 14 | targetSdkVersion 30 15 | versionCode versionMajor * 100000 + versionMinor * 100 + versionPatch * 1 16 | versionName "$versionMajor.$versionMinor.$versionPatch" 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | 26 | sourceSets { 27 | main.java.srcDirs += 'src/main/kotlin' 28 | } 29 | 30 | compileOptions { 31 | sourceCompatibility 1.8 32 | targetCompatibility 1.8 33 | } 34 | } 35 | 36 | dependencies { 37 | implementation fileTree(dir: 'libs', include: ['*.jar']) 38 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 39 | 40 | implementation 'androidx.appcompat:appcompat:1.3.1' 41 | implementation 'com.google.android.material:material:1.4.0' 42 | implementation 'androidx.constraintlayout:constraintlayout:2.1.1' 43 | implementation "androidx.navigation:navigation-fragment-ktx:2.3.5" 44 | implementation "androidx.navigation:navigation-ui-ktx:2.3.5" 45 | 46 | implementation project(':library') 47 | } 48 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label-position/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LabelPosition - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / LabelPosition
9 |
10 |

LabelPosition

11 | enum class LabelPosition 12 |

The legal positions of Labels, in relation to the view they're attached to. 13 | By default, labels are positioned to the LEFT of the view they're attached to.

14 |

Since
15 | 1.0.0

16 |

Enum Values

17 | 18 | 19 | 20 | 23 | 25 | 26 | 27 | 30 | 32 | 33 | 34 |
21 |

LEFT

22 |
24 |
28 |

RIGHT

29 |
31 |
35 |

Properties

36 | 37 | 38 | 39 | 42 | 44 | 45 | 46 |
40 |

value

41 |
43 | val value: Int
47 | 48 | 49 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option-position/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOptionPosition - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOptionPosition
9 |
10 |

FabOptionPosition

11 | enum class FabOptionPosition 12 |

The legal positions of FabOptions, in relation to the previous FabOption in an orientation. 13 | By default, FabOptions are positioned ABOVE the previous FabOption in an orientation.

14 |

Since
15 | 1.0.0

16 |

Enum Values

17 | 18 | 19 | 20 | 23 | 25 | 26 | 27 | 30 | 32 | 33 | 34 |
21 |

ABOVE

22 |
24 |
28 |

BELOW

29 |
31 |
35 |

Properties

36 | 37 | 38 | 39 | 42 | 44 | 45 | 46 |
40 |

value

41 |
43 | val value: Int
47 | 48 | 49 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-orientation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Orientation - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / Orientation
9 |
10 |

Orientation

11 | enum class Orientation 12 |

The screen orientations that the views of this widget can be in. If you only set a single 13 | ExpandableFab widget, it will automatically be used for both portrait and landscape orientations.

14 |

For example: defining an Overlay, ExpandableFab and 3 FabOptions all to be in 15 | Orientation.PORTRAIT, while also NOT defining anything else to be in Orientation.LANDSCAPE, 16 | will ensure that the previously defined Overlay, ExpandableFab and 3 FabOptions will actually 17 | show in both portrait AND landscape configurations. See ExpandableFabLayout for more details.

18 |

Since
19 | 1.0.0

20 |

Enum Values

21 | 22 | 23 | 24 | 27 | 29 | 30 | 31 | 34 | 36 | 37 | 38 |
25 |

PORTRAIT

26 |
28 |
32 |

LANDSCAPE

33 |
35 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/add-views.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.addViews - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / addViews
9 |
10 |

addViews

11 | 12 | fun addViews(vararg children: View?): Unit 13 |

Convenience method for adding multiple children views to the ExpandableFabLayout at once, 14 | programmatically. Ensure your children views are of type Overlay, ExpandableFab or FabOption 15 | only.

16 | 17 | 18 | -------------------------------------------------------------------------------- /library/src/main/kotlin/com/nambimobile/widgets/efab/Resources.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.widgets.efab 2 | 3 | import android.content.Context 4 | import android.os.Build 5 | import android.util.TypedValue 6 | import androidx.core.content.ContextCompat 7 | 8 | /** 9 | * Attempts to get the colorAccent (or colorSecondary for MaterialComponents based themes, which 10 | * colorAccent is mapped to) defined in the app's current theme. 11 | * 12 | * If such a resource does not exist (or we somehow fail to get it), we default to either the 13 | * colorAccent defined in the app's colors.xml, or the library's locally defined colorAccent 14 | * (which is just black, #000000) if one is not defined at the app level. 15 | * */ 16 | @JvmSynthetic 17 | internal fun getThemeColorAccent(context: Context): Int { 18 | val themeColorAccent = 19 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 20 | // colorAccent resourceId for SDK >= 21 21 | android.R.attr.colorAccent 22 | } else { 23 | // colorAccent resourceId for SDK < 21 24 | context.resources.getIdentifier("colorAccent", "attr", context.packageName) 25 | } 26 | 27 | val themeColorAccentValue = TypedValue() 28 | return if(context.theme.resolveAttribute(themeColorAccent, themeColorAccentValue, true)){ 29 | // A colorAccent was defined in the theme, so we use its color value 30 | themeColorAccentValue.data 31 | } else { 32 | // No colorAccent defined in theme, use app's or library's colorAccent instead 33 | ContextCompat.getColor(context, R.color.colorAccent) 34 | } 35 | } -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | 4 | ext.versionMajor = 1 5 | ext.versionMinor = 2 6 | ext.versionPatch = 1 7 | 8 | android { 9 | compileSdkVersion 30 10 | 11 | defaultConfig { 12 | minSdkVersion 15 13 | targetSdkVersion 30 14 | versionCode versionMajor * 100000 + versionMinor * 100 + versionPatch * 1 15 | versionName "$versionMajor.$versionMinor.$versionPatch" 16 | setProperty("archivesBaseName", "expandable-fab") 17 | 18 | // Changes the name of generated AAR artifacts to be more descriptive 19 | libraryVariants.all { variant -> 20 | variant.outputs.all { output -> 21 | if (outputFileName.endsWith('.aar')) { 22 | outputFileName = "${archivesBaseName}-${versionName}.aar" 23 | } 24 | } 25 | } 26 | } 27 | 28 | buildTypes { 29 | release { 30 | minifyEnabled false 31 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 32 | } 33 | } 34 | 35 | sourceSets { 36 | main.java.srcDirs += 'src/main/kotlin' 37 | } 38 | } 39 | 40 | dependencies { 41 | implementation fileTree(dir: 'libs', include: ['*.jar']) 42 | implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 43 | implementation 'com.google.android.material:material:1.4.0' 44 | implementation 'androidx.appcompat:appcompat:1.3.1' 45 | } 46 | 47 | apply from: 'generate-docs-and-update-website.gradle' 48 | apply from: 'publish-artifacts-to-maven-repo.gradle' -------------------------------------------------------------------------------- /docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% seo %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 24 | 25 |
26 | {{ content }} 27 | 28 | 33 |
34 | 35 | -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/SnackbarCompatibilityFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | import com.google.android.material.button.MaterialButton 9 | import com.google.android.material.snackbar.Snackbar 10 | import com.nambimobile.widgets.efab.ExpandableFab 11 | 12 | class SnackbarCompatibilityFragment : Fragment() { 13 | override fun onCreateView( 14 | inflater: LayoutInflater, container: ViewGroup?, 15 | savedInstanceState: Bundle? 16 | ): View? { 17 | return inflater.inflate(R.layout.snackbar_compatibility_fragment, container, false) 18 | } 19 | 20 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 21 | val expandableFab = view.findViewById(R.id.expandable_fab) 22 | val snackbarAbove = Snackbar.make( 23 | expandableFab, 24 | "I will show above the ExpandableFab.", 25 | Snackbar.LENGTH_LONG 26 | ).apply { anchorView = expandableFab } 27 | val snackbarBelow = Snackbar.make( 28 | expandableFab, 29 | "I will show below the ExpandableFab.", 30 | Snackbar.LENGTH_LONG 31 | ) 32 | 33 | view.findViewById(R.id.snackbar_above_btn).setOnClickListener { 34 | snackbarAbove.show() 35 | } 36 | view.findViewById(R.id.snackbar_below_btn).setOnClickListener { 37 | snackbarBelow.show() 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/efab-size.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.efabSize - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / efabSize
9 |
10 |

efabSize

11 | 12 | var efabSize: FabSize 13 |

The size of this ExpandableFab (NOT its FabOptions. For that, see property fabOptionSize). 14 | Must be FabSize.MINI, FabSize.NORMAL, FabSize.AUTO or FabSize.CUSTOM. 15 | FabSize.CUSTOM should be used when you're setting the size of the ExpandableFab's 16 | layout_width and layout_height to a custom value manually (when using CUSTOM, make sure to 17 | also set app:fabCustomSize equal to your custom layout_width/layout_height size and 18 | app:maxImageSize equal to your icon size in order to ensure your icon is centered 19 | properly). Default value is FabSize.NORMAL.

20 |

Usage of this property is preferred over the inherited set/getSize methods.

21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/src/main/res/layout/main_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 24 | 25 | 26 | 27 | 35 | 36 | -------------------------------------------------------------------------------- /docs/_layouts/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% seo %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 22 | 23 |
24 | {{ content }} 25 | 26 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/DefaultConfigurationXmlFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.nambimobile.widgets.efab.ExpandableFabLayout 9 | 10 | class DefaultConfigurationXmlFragment : Fragment(), View.OnClickListener { 11 | 12 | override fun onCreateView( 13 | inflater: LayoutInflater, container: ViewGroup?, 14 | savedInstanceState: Bundle? 15 | ): View? { 16 | return inflater.inflate(R.layout.default_configuration_xml_fragment, container, false) 17 | } 18 | 19 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 20 | // Although you can set onClickListener functionality for ExpandableFab widget views via 21 | // XML, Android limits us to defining their methods in the parent Activity. This has a 22 | // number of downsides when using Fragments, especially from a re-usability standpoint. A 23 | // better solution would be to implement View.OnClickListener on the Fragment, and define 24 | // the onClickListeners cleanly like below (see the onClick method for the rest) 25 | val expandableFabLayout = view.findViewById(R.id.expandable_fab_layout) 26 | 27 | expandableFabLayout.portraitConfiguration.fabOptions.forEach { it.setOnClickListener(this) } 28 | } 29 | 30 | override fun onClick(v: View?) { 31 | when(v?.id){ 32 | R.id.faboption_1 -> { } 33 | R.id.faboption_2 -> { } 34 | // so on and so forth... 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab/fab-option-size.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFab.fabOptionSize - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFab / fabOptionSize
9 |
10 |

fabOptionSize

11 | 12 | var fabOptionSize: FabSize 13 |

The size of each FabOption in this orientation (NOT the size of the ExpandableFab. For that, 14 | see property efabSize). Must be FabSize.MINI, FabSize.NORMAL, FabSize.AUTO or 15 | FabSize.CUSTOM. FabSize.CUSTOM should be used when you're setting the size of the 16 | FabOptions' layout_width and layout_height to a custom value manually (when using CUSTOM, 17 | make sure to also set app:fabCustomSize equal to your custom layout_width/layout_height 18 | size and app:maxImageSize equal to your icon size in order to ensure your icon is centered 19 | properly). Default value is FabSize.MINI.

20 |

Usage of this property is preferred over the inherited set/getSize methods on individual 21 | FabOptions.

22 | 23 | 24 | -------------------------------------------------------------------------------- /library/src/main/kotlin/com/nambimobile/widgets/efab/FabSize.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.widgets.efab 2 | 3 | import com.google.android.material.floatingactionbutton.FloatingActionButton 4 | 5 | /** 6 | * The legal sizes of ExpandableFabs and FabOptions. 7 | * 8 | * [FabSize.MINI], [FabSize.NORMAL] and [FabSize.AUTO] map to [FloatingActionButton.SIZE_MINI], 9 | * [FloatingActionButton.SIZE_NORMAL] and [FloatingActionButton.SIZE_AUTO], respectively. 10 | * [FabSize.CUSTOM] should be used when setting the size of the ExpandableFab or FabOption's 11 | * layout_width and layout_height to a custom value manually, and thus maps to a random value 12 | * that will never be used. 13 | * 14 | * Developer Notes: 15 | * 1) When using [CUSTOM], the Android Framework also requires you to set app:fabCustomSize 16 | * equal to your custom layout_width/layout_height size and app:maxImageSize equal to your icon 17 | * size in order to ensure your icon is centered and sized properly. 18 | * 19 | * Example: 20 | * 21 | 29 | app:maxImageSize="84dp" 30 | /> 31 | * 32 | * @since 1.0.0 33 | * */ 34 | enum class FabSize(val value: Int) { 35 | MINI(FloatingActionButton.SIZE_MINI), 36 | NORMAL(FloatingActionButton.SIZE_NORMAL), 37 | AUTO(FloatingActionButton.SIZE_AUTO), 38 | CUSTOM(-1234) 39 | } -------------------------------------------------------------------------------- /examples/src/main/res/layout/no_faboptions_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 20 | 21 | 22 | 26 | 29 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /docs/javadoc/v1/jquery/jquery-ui.structure.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.12.1 - 2018-12-06 2 | * http://jqueryui.com 3 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 4 | 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} -------------------------------------------------------------------------------- /docs/kdoc/v1/scripts/clipboard.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', () => { 2 | document.querySelectorAll('span.copy-icon').forEach(element => { 3 | element.addEventListener('click', (el) => copyElementsContentToClipboard(element)); 4 | }) 5 | 6 | document.querySelectorAll('span.anchor-icon').forEach(element => { 7 | element.addEventListener('click', (el) => { 8 | if(element.hasAttribute('pointing-to')){ 9 | const location = hrefWithoutCurrentlyUsedAnchor() + '#' + element.getAttribute('pointing-to') 10 | copyTextToClipboard(element, location) 11 | } 12 | }); 13 | }) 14 | }) 15 | 16 | const copyElementsContentToClipboard = (element) => { 17 | const selection = window.getSelection(); 18 | const range = document.createRange(); 19 | range.selectNodeContents(element.parentNode.parentNode); 20 | selection.removeAllRanges(); 21 | selection.addRange(range); 22 | 23 | copyAndShowPopup(element, () => selection.removeAllRanges()) 24 | } 25 | 26 | const copyTextToClipboard = (element, text) => { 27 | var textarea = document.createElement("textarea"); 28 | textarea.textContent = text; 29 | textarea.style.position = "fixed"; 30 | document.body.appendChild(textarea); 31 | textarea.select(); 32 | 33 | copyAndShowPopup(element, () => document.body.removeChild(textarea)) 34 | } 35 | 36 | const copyAndShowPopup = (element, after) => { 37 | try { 38 | document.execCommand('copy'); 39 | element.nextElementSibling.classList.add('active-popup'); 40 | setTimeout(() => { 41 | element.nextElementSibling.classList.remove('active-popup'); 42 | }, 1200); 43 | } catch (e) { 44 | console.error('Failed to write to clipboard:', e) 45 | } 46 | finally { 47 | if(after) after() 48 | } 49 | } 50 | 51 | const hrefWithoutCurrentlyUsedAnchor = () => window.location.href.split('#')[0] 52 | 53 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-option/set-on-click-listener.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabOption.setOnClickListener - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabOption / setOnClickListener
9 |
10 |

setOnClickListener

11 | 12 | fun setOnClickListener(onClickListener: OnClickListener?): Unit 13 |

Registers a callback to be invoked when this FabOption or its label is clicked. The 14 | default behavior the FabOption will be executed before this custom callback.

15 |

Note: Only one FabOption can be clicked per ExpandableFab opening or closing animation. 16 | For example, if you set long durations on the opening animations of the ExpandableFab, then 17 | the first clicked FabOption will fire its onClickListener, and all subsequent clicks 18 | to this or other FabOptions will be ignored until the ExpandableFab has completely finished 19 | its animation (this is to prevent a user from spam clicking multiple FabOptions during long 20 | animations).

21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-orientation-configuration/-init-.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OrientationConfiguration.<init> - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / OrientationConfiguration / <init>
9 |
10 |

<init>

11 | 12 | OrientationConfiguration() 13 |

Holder for all the views of an ExpandableFab widget in a specific Orientation. 14 | Not meant to be instantiated by clients, as an instance can be retrieved via 15 | ExpandableFabLayout.portraitConfiguration or ExpandableFabLayout.landscapeConfiguration. 16 | Values for the views will only be populated after they are added through calls to 17 | ExpandableFabLayout's addView methods (or after they're defined via XML).

18 |

Implementation Notes:

19 |
  1. Since the Kotlin 'internal' modifier translates to 'public' in Java, the JvmSynthetic 20 | annotation is used on those functions and properties to hide them from the published API for 21 | Java clients. A proper solution to this issue would be a package-private visibility modifier, 22 | but Kotlin has yet to implement it (https://youtrack.jetbrains.com/issue/KT-29227). Until 23 | then, the JvmSynthetic annotations should remain in order to present the proper published API 24 | to both Java & Kotlin clients.
  2. 25 |
26 |

Since
27 | 1.0.0

28 | 29 | 30 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official 22 | 23 | # Values used when publishing. See 'publish-artifacts-to-maven-repo.gradle' 24 | POM_NAME=ExpandableFab 25 | POM_DESCRIPTION=A highly customizable Android widget that displays the available actions of a UI via an expandable set of floating action buttons - with optional labels and fluid animations. 26 | POM_URL=https://github.com/nambicompany/expandable-fab 27 | POM_PACKAGING=aar 28 | POM_LICENSE_NAME=MIT License 29 | POM_LICENSE_URL=https://github.com/nambicompany/expandable-fab/blob/master/LICENSE.txt 30 | POM_LICENSE_DISTRIBUTION=repo 31 | POM_DEVELOPER_NAME=Kelvin Abumere 32 | POM_DEVELOPER_ORGANIZATION=The Nambi Company 33 | POM_DEVELOPER_URL=http://www.nambi.io/ 34 | POM_SCM_CONNECTION=scm:git:git://github.com/nambicompany/expandable-fab.git 35 | POM_SCM_DEVELOPER_CONNECTION=scm:git:ssh://git@github.com:nambicompany/expandable-fab.git 36 | POM_SCM_URL=https://github.com/nambicompany/expandable-fab -------------------------------------------------------------------------------- /docs/javadoc/v0/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/get-current-configuration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.getCurrentConfiguration - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / getCurrentConfiguration
9 |
10 |

getCurrentConfiguration

11 | 12 | fun getCurrentConfiguration(): OrientationConfiguration 13 |

Returns the OrientationConfiguration showing for the current screen orientation. 14 | An OrientationConfiguration is just a holder for all the views of an ExpandableFab widget 15 | in a specific Orientation.

16 |

Should only be called after you have added the views to an ExpandableFabLayout 17 | programmatically via the addView methods, or declared them within an ExpandableFabLayout 18 | via XML. Otherwise, the views contained may be null for references or empty for lists.

19 |

Although the portraitConfiguration and landscapeConfiguration properties are both exposed 20 | publicly for clients to obtain directly, this method allows you to retrieve the correct 21 | set of views without first knowing what screen orientation the device is currently in.

22 |

Note: This method will automatically take into account orientations with no configuration 23 | set. That is, if you only set a portrait configuration, then this method will pass back 24 | that configuration even if the device is currently in landscape. You don't have to worry 25 | about being given an OrientationConfiguration for an orientation that you did not set.

26 | 27 | 28 | -------------------------------------------------------------------------------- /library/generate-docs-and-update-website.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'org.jetbrains.dokka' 2 | 3 | // versionMajor is defined in build.gradle 4 | def docVersion = "v$versionMajor" 5 | def websiteRootDirectory = "$rootDir/docs" 6 | ext.javadocOutputDirectory = new File("$websiteRootDirectory${File.separator}javadoc${File.separator}$docVersion") 7 | ext.kdocOutputDirectory = new File("$websiteRootDirectory${File.separator}kdoc${File.separator}$docVersion") 8 | 9 | /** 10 | * Generates JavaDoc and outputs to $websiteRootDirectory so the library website is auto 11 | * updated on merge to master. 12 | * */ 13 | dokkaJavadoc { 14 | outputDirectory = javadocOutputDirectory 15 | suppressInheritedMembers = true 16 | doLast { 17 | new File("$websiteRootDirectory${File.separator}api_doc_versions${File.separator}${docVersion}.javadoc").createNewFile() 18 | } 19 | } 20 | 21 | /** 22 | * Generates KotlinDoc and outputs to $websiteRootDirectory so the library website is auto 23 | * updated on merge to master. 24 | * */ 25 | dokkaHtml { 26 | outputDirectory = kdocOutputDirectory 27 | suppressInheritedMembers = true 28 | doLast { 29 | new File("$websiteRootDirectory${File.separator}api_doc_versions${File.separator}${docVersion}.kdoc").createNewFile() 30 | } 31 | } 32 | 33 | /** 34 | * Generates library documentation in all supported formats. Once these changes are merged to 35 | * master, the library website will be automatically updated. 36 | * 37 | * Dokka (the documentation engine for Kotlin) was still in alpha as of this release, and thus 38 | * contains some bugs and is not fully stable. There is a bug in particular that may happen on 39 | * Windows PCs and cause this task to fail on subsequent runs if there are running Gradle daemons. 40 | * 41 | * To get around this bug, simply run this command with the '--no-daemon' option. 42 | * 43 | * --------------------- 44 | * 45 | * How To Run... 46 | * 47 | * ... on the Command Line: 48 | * ./gradlew --no-daemon clean generateDocsAndUpdateWebsite 49 | * 50 | * ... within Android Studio: 51 | * We recommend not running via AS studio in order to avoid the bug listed above. 52 | * */ 53 | task generateDocsAndUpdateWebsite(){ 54 | dependsOn dokkaJavadoc 55 | dependsOn dokkaHtml 56 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/BottomAppBarCompatibility.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import androidx.coordinatorlayout.widget.CoordinatorLayout 9 | import com.google.android.material.bottomappbar.BottomAppBar 10 | import com.nambimobile.widgets.efab.ExpandableFab 11 | 12 | class BottomAppBarCompatibility : Fragment() { 13 | 14 | override fun onCreateView( 15 | inflater: LayoutInflater, container: ViewGroup?, 16 | savedInstanceState: Bundle? 17 | ): View? { 18 | return inflater.inflate(R.layout.bottom_app_bar_compatibility_fragment, container, false) 19 | } 20 | 21 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 22 | // If you only have a single ExpandableFab that's shown in both portrait and landscape 23 | // orientations, the below logic is not needed. You can ignore the following code. 24 | 25 | // For those with different ExpandableFabs per orientation: multiple Views in a layout 26 | // cannot anchor to the same View (the BottomAppBar) at the same time. So at runtime, we 27 | // need to determine which ExpandableFab should anchor to the BottomAppBar and which 28 | // should clear its anchor. This is simple to do, and is shown below. 29 | 30 | val expandableFabPortrait = view.findViewById(R.id.expandable_fab_portrait) 31 | val expandableFabLandscape = view.findViewById(R.id.expandable_fab_landscape) 32 | val bottomAppBar = view.findViewById(R.id.bottom_app_bar) 33 | 34 | if(expandableFabPortrait.visibility == View.VISIBLE){ 35 | (expandableFabPortrait.layoutParams as CoordinatorLayout.LayoutParams).anchorId = bottomAppBar.id 36 | (expandableFabLandscape.layoutParams as CoordinatorLayout.LayoutParams).anchorId = View.NO_ID 37 | } else { 38 | (expandableFabPortrait.layoutParams as CoordinatorLayout.LayoutParams).anchorId = View.NO_ID 39 | (expandableFabLandscape.layoutParams as CoordinatorLayout.LayoutParams).anchorId = bottomAppBar.id 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docs/javadoc/v0/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/NoFabOptionsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import android.os.Bundle 4 | import android.text.SpannableString 5 | import android.text.method.LinkMovementMethod 6 | import android.text.util.Linkify 7 | import android.view.LayoutInflater 8 | import android.view.View 9 | import android.view.ViewGroup 10 | import android.widget.TextView 11 | import androidx.appcompat.app.AlertDialog 12 | import androidx.fragment.app.Fragment 13 | import com.nambimobile.widgets.efab.ExpandableFab 14 | import com.nambimobile.widgets.efab.ExpandableFabLayout 15 | 16 | class NoFabOptionsFragment : Fragment(), View.OnClickListener { 17 | private lateinit var expandableFabLayout: ExpandableFabLayout 18 | 19 | override fun onCreateView( 20 | inflater: LayoutInflater, container: ViewGroup?, 21 | savedInstanceState: Bundle? 22 | ): View? { 23 | return inflater.inflate(R.layout.no_faboptions_fragment, container, false) 24 | } 25 | 26 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 27 | expandableFabLayout = view.findViewById(R.id.expandable_fab_layout) 28 | view.findViewById(R.id.expandable_fab).setOnClickListener(this) 29 | } 30 | 31 | override fun onClick(v: View?) { 32 | when(v?.id){ 33 | R.id.expandable_fab -> { 34 | val spannableString = SpannableString( 35 | resources.getString(R.string.no_faboptions_fragment_dialog_message)).also { 36 | Linkify.addLinks(it, Linkify.WEB_URLS) 37 | } 38 | 39 | val dialog = AlertDialog.Builder(requireActivity()) 40 | .setTitle(R.string.no_faboptions_fragment_dialog_title) 41 | .setMessage(spannableString) 42 | .setPositiveButton(android.R.string.ok){ dialog, _ -> 43 | dialog.cancel() 44 | } 45 | .setOnDismissListener { expandableFabLayout.close() } 46 | .create() 47 | 48 | dialog.show() 49 | 50 | // must be set after calling show 51 | dialog.findViewById(android.R.id.message)?.movementMethod = 52 | LinkMovementMethod.getInstance() 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /docs/javadoc/v0/com/nambimobile/widgets/efab/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.nambimobile.widgets.efab 8 | 9 | 10 | 11 | 12 | 13 | 14 |

com.nambimobile.widgets.efab

15 |
16 |

Classes

17 | 26 |

Enums

27 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/-init-.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.<init> - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / <init>
9 |
10 |

<init>

11 | 12 | ExpandableFabLayout(context: Context) 13 |

Used to create an ExpandableFabLayout programmatically (do not use the other constructor 14 | ExpandableFabLayout(context, attributeSet) - it is for use by the Android framework when 15 | inflating an ExpandableFabLayout via XML).

16 | 17 | ExpandableFabLayout(context: Context, attributeSet: AttributeSet) 18 |

Called by the system when creating an ExpandableFabLayout via XML (don't call this directly). 19 | To create an ExpandableFabLayout programmatically, use the ExpandableFabLayout(context) 20 | constructor.

21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/javadoc/v1/allclasses.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | All Classes 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |

All Classes

21 |
22 | 44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-expandable-fab-layout/add-view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ExpandableFabLayout.addView - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / ExpandableFabLayout / addView
9 |
10 |

addView

11 | 12 | fun addView(child: View?, index: Int, params: LayoutParams?): Unit 13 |

Adds a child view with the specified layout parameters to the ExpandableFabLayout.

14 |

In general, only Overlay, ExpandableFab, FabOption, and specific Material Design views 15 | (like Snackbar and BottomAppBar) should be added as children of the ExpandableFabLayout.

16 |

While this library won't stop you from adding in other types as direct children to the 17 | ExpandableFabLayout, please know adding other View types may cause visual issues.

18 | 19 | 20 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /docs/kdoc/v1/scripts/navigation-loader.js: -------------------------------------------------------------------------------- 1 | navigationPageText = fetch(pathToRoot + "navigation.html").then(response => response.text()) 2 | 3 | displayNavigationFromPage = () => { 4 | navigationPageText.then(data => { 5 | document.getElementById("sideMenu").innerHTML = data; 6 | }).then(() => { 7 | document.querySelectorAll(".overview > a").forEach(link => { 8 | link.setAttribute("href", pathToRoot + link.getAttribute("href")); 9 | }) 10 | }).then(() => { 11 | document.querySelectorAll(".sideMenuPart").forEach(nav => { 12 | if (!nav.classList.contains("hidden")) 13 | nav.classList.add("hidden") 14 | }) 15 | }).then(() => { 16 | revealNavigationForCurrentPage() 17 | }) 18 | document.querySelectorAll('.footer a[href^="#"]').forEach(anchor => { 19 | anchor.addEventListener('click', function (e) { 20 | e.preventDefault(); 21 | document.querySelector(this.getAttribute('href')).scrollIntoView({ 22 | behavior: 'smooth' 23 | }); 24 | }); 25 | }); 26 | } 27 | 28 | revealNavigationForCurrentPage = () => { 29 | let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); 30 | let parts = document.querySelectorAll(".sideMenuPart"); 31 | let found = 0; 32 | do { 33 | parts.forEach(part => { 34 | if (part.attributes['pageId'].value.indexOf(pageId) !== -1 && found === 0) { 35 | found = 1; 36 | if (part.classList.contains("hidden")) { 37 | part.classList.remove("hidden"); 38 | part.setAttribute('data-active', ""); 39 | } 40 | revealParents(part) 41 | } 42 | }); 43 | pageId = pageId.substring(0, pageId.lastIndexOf("/")) 44 | } while (pageId.indexOf("/") !== -1 && found === 0) 45 | }; 46 | revealParents = (part) => { 47 | if (part.classList.contains("sideMenuPart")) { 48 | if (part.classList.contains("hidden")) 49 | part.classList.remove("hidden"); 50 | revealParents(part.parentNode) 51 | } 52 | }; 53 | 54 | /* 55 | This is a work-around for safari being IE of our times. 56 | It doesn't fire a DOMContentLoaded, presumabely because eventListener is added after it wants to do it 57 | */ 58 | if (document.readyState == 'loading') { 59 | window.addEventListener('DOMContentLoaded', () => { 60 | displayNavigationFromPage() 61 | }) 62 | } else { 63 | displayNavigationFromPage() 64 | } -------------------------------------------------------------------------------- /examples/src/main/kotlin/com/nambimobile/examples/efab/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.nambimobile.examples.efab 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import android.view.MenuItem 6 | import androidx.core.view.GravityCompat 7 | import androidx.drawerlayout.widget.DrawerLayout 8 | import androidx.navigation.fragment.NavHostFragment 9 | import androidx.navigation.ui.setupActionBarWithNavController 10 | import androidx.navigation.ui.setupWithNavController 11 | import com.google.android.material.navigation.NavigationView 12 | 13 | class MainActivity : AppCompatActivity() { 14 | 15 | private lateinit var navigationDrawer: DrawerLayout 16 | 17 | override fun onCreate(savedInstanceState: Bundle?) { 18 | super.onCreate(savedInstanceState) 19 | setContentView(R.layout.navigation_drawer) 20 | setSupportActionBar(findViewById(R.id.toolbar)) 21 | 22 | val navHostFragment = 23 | supportFragmentManager.findFragmentById(R.id.navigation_host) as NavHostFragment 24 | val navController = navHostFragment.navController 25 | navigationDrawer = findViewById(R.id.navigation_drawer) 26 | 27 | findViewById(R.id.navigation_view).apply { 28 | setCheckedItem(R.id.default_configuration_xml_fragment) 29 | setupWithNavController(navController) 30 | // Since the navigationView is hooked into the navController, whenever a menu item is 31 | // clicked whose id matches a destination in our navigation graph, that fragment is 32 | // auto loaded into the NavHost (see main_activity.xml layout file) and the menu item 33 | // is highlighted. Magic, ladies & gents. 34 | } 35 | 36 | supportActionBar?.apply { 37 | setDisplayHomeAsUpEnabled(true) 38 | setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp) 39 | setupActionBarWithNavController(navController, navigationDrawer) 40 | } 41 | } 42 | 43 | override fun onOptionsItemSelected(item: MenuItem): Boolean { 44 | return when (item.itemId) { 45 | android.R.id.home -> { 46 | navigationDrawer.openDrawer(GravityCompat.START) 47 | true 48 | } 49 | else -> super.onOptionsItemSelected(item) 50 | } 51 | } 52 | 53 | override fun onBackPressed() { 54 | when { 55 | navigationDrawer.isDrawerOpen(GravityCompat.START) -> 56 | navigationDrawer.closeDrawer(GravityCompat.START) 57 | else -> super.onBackPressed() 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /examples/src/main/res/menu/navigation_drawer_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 13 | 14 | 17 | 20 | 23 | 26 | 29 | 30 | 31 | 34 | 37 | 40 | 43 | 46 | 49 | 52 | 55 | 58 | 61 | 64 | 65 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | title: ExpandableFab 4 | --- 5 | 6 | ## What is the ExpandableFab, and why should I use it? 7 |

8 | 9 | You’ve read the elevator pitch in our tagline, but you may be thinking: why should developers actually use the ExpandableFab library? 10 | 11 | Read our Medium article below explaining the intent behind the widget, and how it can help you when building a modern, Material Design adhering Android app: 12 | 13 | ["A modern take on the expandable Floating Action Button for Android"](https://uxdesign.cc/a-modern-take-on-the-expandable-floating-action-button-for-android-aka-speed-dial-4146e63c658c) 14 | 15 | 16 | ## How to use the ExpandableFab 17 | Now that you're convinced that the ExpandableFab is right for your project, consider reading our in-depth, easy-to-follow walkthrough on how you as a designer/developer can easily include and use it: 18 | 19 | ["How to use the expandable Floating Action Button"](https://uxdesign.cc/how-to-use-the-expandable-floating-action-button-9c6fdedc4169) 20 | 21 | 22 | ## Warnings 23 | Every custom View that makes up the ExpandableFab widget is derived from subclasses of Android `View`, so they contain all the additional inherited properties a developer might expect. Feel free to edit these additional inherited properties as desired, but note, for any inherited property not explicitly defined within the library's published API (see the [KDoc]({{ site.kdoc_path | relative_url }}) or [JavaDoc]({{ site.javadoc_path | relative_url }})) there comes a chance that said inherited property might conflict with / be overridden by the library during regular use. 24 | 25 | We suggest trying to use the library's published API as much as possible, only deviating to use inherited properties when functionality is desired that can't be achieved by the library directly. If you come across such a case, please bring it to our attention by filing a feature request with the library's [ticketing system]({{ site.repository_url }}/issues) so we can consider adding the functionality to the library directly. 26 | 27 | This guidance is especially true when using the `Label` class of the ExpandableFab library. Properties of the officially published API like `labelText`, `labelTextColor`, `labelTextSize`, `labelFont`, `labelBackgroundColor` and `labelElevation` should be used **in favor of** inherited methods/properties like `set/getText`, `setTextColor`, `set/getTextSize`, `set/getTypeface`, `setBackgroundColor` and `set/getElevation`. 28 | 29 | The ExpandableFab widget was designed to be easy to use and highly customizable; so, in general, usage of inherited properties in order to achieve desired functionality or aesthetics shouldn't pose an issue. However, it's good practice to stick with the published API where possible. -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-size/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FabSize - library 5 | 6 | 7 | 8 | library / com.nambimobile.widgets.efab / FabSize
9 |
10 |

FabSize

11 | enum class FabSize 12 |

The legal sizes of ExpandableFabs and FabOptions.

13 |

FabSize.MINI, FabSize.NORMAL and FabSize.AUTO map to FloatingActionButton.SIZE_MINI, 14 | FloatingActionButton.SIZE_NORMAL and FloatingActionButton.SIZE_AUTO, respectively. 15 | FabSize.CUSTOM should be used when setting the size of the ExpandableFab or FabOption's 16 | layout_width and layout_height to a custom value manually, and thus maps to a random value 17 | that will never be used.

18 |

Developer Notes:

19 |
  1. When using CUSTOM, the Android Framework also requires you to set app:fabCustomSize 20 | equal to your custom layout_width/layout_height size and app:maxImageSize equal to your icon 21 | size in order to ensure your icon is centered and sized properly.
  2. 22 |
23 |

Example:

24 |

<com.nambimobile.widgets.efab.ExpandableFab 25 | android:id="@+id/expandable_fab" 26 | android:layout_width="175dp" 27 | android:layout_height="175dp" 28 | app:efab_size="custom" 29 | app:efab_fabOptionSize="custom" 30 | app:efab_icon="@drawable/ic_random11_white_84dp" 31 | app:fabCustomSize="175dp" 32 | app:maxImageSize="84dp" 33 | />

34 |

Since
35 | 1.0.0

36 |

Enum Values

37 | 38 | 39 | 40 | 43 | 45 | 46 | 47 | 50 | 52 | 53 | 54 | 57 | 59 | 60 | 61 | 64 | 66 | 67 | 68 |
41 |

MINI

42 |
44 |
48 |

NORMAL

49 |
51 |
55 |

AUTO

56 |
58 |
62 |

CUSTOM

63 |
65 |
69 |

Properties

70 | 71 | 72 | 73 | 76 | 78 | 79 | 80 |
74 |

value

75 |
77 | val value: Int
81 | 82 | 83 | --------------------------------------------------------------------------------