# Titanium.UI.Android.FloatingActionButton

> A floating action button (FAB) is a circular button that triggers the primary action in your app's UI.

- Source: https://titaniumsdk.com/docs/sdk/12.5.1/Titanium.UI.Android.FloatingActionButton
- Titanium SDK version: 12.5.1
- Kind: view
- Platforms: Android
- Since: Titanium SDK 12.0.0
- Extends: Titanium.UI.View
- Inheritance: Titanium.UI.View > Titanium.Proxy

For design guidelines, see
[Material design: Snackbars](https://material.io/components/buttons-floating-action-button)

## Example: Show a floating action button (FAB)

``` js
const win = Ti.UI.createWindow();
const fab = Ti.UI.Android.createFloatingActionButton({
  bottom: 10,
  right: 10,
  image: "/appicon.png"
});
win.add(fab);
win.open();
```

## Properties

### customSize

- Type: Number
- Platforms: Android
- Since: Titanium SDK 12.0.0

Size of the button

### iconSize

- Type: String
- Platforms: Android
- Since: Titanium SDK 12.0.0
- Permission: read-only

Predefined button size

Android offers default icon sizes for a FAB. This can either be "default" or "mini".
You can use `customSize` the set a custom width/height and `maxImageSize` to resize the
image inside the button.

### image

- Type: String | Number | Titanium.Blob
- Platforms: Android
- Since: Titanium SDK 12.0.0

Image inside the button (the icon)

### maxImageSize

- Type: Number
- Platforms: Android
- Since: Titanium SDK 12.0.0

Size of the image inside the button

## Events

### click

- Platforms: Android

Fired when the button is clicked

## Inherited members

35 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/12.5.1/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`
- [Titanium.UI.View](https://titaniumsdk.com/docs/sdk/12.5.1/Titanium.UI.View.md): `accessibilityDisableLongPress`, `backgroundColor`, `bottom`, `elevation`, `filterTouchesWhenObscured`, `getViewById`, `hiddenBehavior`, `hide`, `id`, `insertAt`, `left`, `replaceAt`, `right`, `rotation`, `rotationX`, `rotationY`, `scaleX`, `scaleY`, `show`, `stopAnimation`, `tooltip`, `top`, `touchFeedbackColor`, `transitionName`, `translationX`, `translationY`, `translationZ`, `visible`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

