# Gradient and Image Background on FloatingActionButton

DevFeed: [Gradient and Image Background on FloatingActionButton](<https://devfeed.tech/articles/gradient-and-image-background-on-floatingactionbutton-19316.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/gradient-image-background-floatingactionbutton/>)

Author: Shai Almog

Published: 2016-11-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [phoenix](<https://devfeed.tech/topics/phoenix.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>)

Tags: [component](<https://devfeed.tech/tags/component.md>), [design](<https://devfeed.tech/tags/design.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [phoenix](<https://devfeed.tech/tags/phoenix.md>)

## AI overview

This article explains an added FloatingActionButton mode in the Phoenix theme that uses the parent UIID to draw a gradient or image background. It notes that round-shape clipping has performance and port-compatibility limitations, so the behavior is disabled by default.

## Source excerpt

The Phoenix theme had a FloatingActionButton with a gradient on top. This goes against the mostly flat material design spec but after looking at the design with a solid color I came to the conclusion that the designer was totally right to use a gradient in this case. Unfortunately we didn't build that support into the FloatingActionButton. So as part of that work I added a special mode to the RoundBorder that uses the parent UIID to draw the background. This sounds like a "no brainer" but there is a catch: the round border needs to be "round".