Member-only story

Creating a Modern Bottom Navigation Bar with a Curved Cut-Out for a Docked/Floating Action Button in Jetpack Compose

A Step-by-Step Guide to Designing Custom Navigation Panels with Smooth Curves and Docked Action Buttons

Souvik Sarkar
ProAndroidDev
4 min read3 days ago

Preview of Modern Bottom Navigation Bar with a Curved Cut-Out for a Docked/Floating Action Button

Floating Action Button or Docked Action Button — these have become very common UI designs for any app and yet, we faced significant challenges while implementing the same in Jetpack Compose.

We struggled so that you don’t have to anymore. In this tutorial, I’ll break it down into simple steps so that you can do it very easily. In this example, I will be sharing the codes for the bottom navigation panel with a centered curved cutout.

Part 1: Creating the Custom Shape for the Cutout

The BottomNavShape Class:

To create the curved cutout effect, we define a custom Shape that carves out a semicircle and smooth curves from the navigation bar.

The Code:

class BottomNavShape(
private val cornerRadius: Float, // Rounded corners at the panel's top
private val dockRadius: Float, // Size of the cutout
) : Shape {
override fun createOutline(
size: Size,
layoutDirection…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Written by Souvik Sarkar

I turn the raw, unfiltered lessons of my entrepreneurial journey into stories.

Responses (1)

What are your thoughts?

In this tutorial, I’ll break it down into simple steps so that you can do it very easily.

I like how you made this simple! It’s nice how you break things down so people can easily follow along. Keep it up, you make it look easy!

2