├── 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 |
15 | com.nambimobile.widgets.efab16 | |
17 | 18 | | 19 |
AUTO
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/kdoc/v0/library/com.nambimobile.widgets.efab/-fab-size/-m-i-n-i.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 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 | 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 | NORMAL
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/404.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 |
18 |
19 | 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 |LEFT
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/src/main/res/drawable/ic_reminder_white_24dp.xml:
--------------------------------------------------------------------------------
1 | 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 | 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 | 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 | PORTRAIT
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | LANDSCAPE
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 | val value: Int
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/src/main/res/layout/navigation_drawer_header.xml:
--------------------------------------------------------------------------------
1 |
2 | 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 | 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 | 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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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.findViewByIdvar 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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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(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 |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 |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 |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 |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 |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 |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 | 8 | -------------------------------------------------------------------------------- /docs/kdoc/v0/library/com.nambimobile.widgets.efab/-label/on-touch-event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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 |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
21 | LEFT22 | |
23 | 24 | | 25 |
28 | RIGHT29 | |
30 | 31 | | 32 |
40 | value41 | |
42 |
43 | val value: Int |
44 |
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
21 | ABOVE22 | |
23 | 24 | | 25 |
28 | BELOW29 | |
30 | 31 | | 32 |
40 | value41 | |
42 |
43 | val value: Int |
44 |
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
25 | PORTRAIT26 | |
27 | 28 | | 29 |
32 | LANDSCAPE33 | |
34 | 35 | | 36 |
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 |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 |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 |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 |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 |Since
27 | 1.0.0
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.findViewByIdExpandableFabLayout(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 |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
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 |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
41 | MINI42 | |
43 | 44 | | 45 |
48 | NORMAL49 | |
50 | 51 | | 52 |
55 | AUTO56 | |
57 | 58 | | 59 |
62 | CUSTOM63 | |
64 | 65 | | 66 |
74 | value75 | |
76 |
77 | val value: Int |
78 |