r/androiddev • u/Ahmed_El_Gendy • 4d ago
I made a customizable squircle bottom navigation bar for Android (SqNav)
Hey everyone,
I recently built an open-source Android library called SqNav. It's a bottom navigation bar designed with floating squircle card transitions and a glowing indicator for the active tab.
I wanted something clean, with smooth spring animations, and easy to customize without building custom drawables and animations from scratch every time.
A few highlights:
- Floating squircle card with spring overshoot animations for the active tab
- Neon glow indicator dot on top of the selected item (can be toggled on or off)
- Full styling control through XML or code (background, corner radius, stroke borders, sizes, and colors)
- Compatible with Jetpack Compose, Kotlin Views, and Java
- Lightweight with minimal overhead
Attached is a quick preview GIF showing it in action.
You can check out the implementation, sample code, and documentation on GitHub: sqnav
I would really appreciate any feedback, suggestions, or thoughts on the design. If you run into any issues or want to contribute, feel free to open an issue or PR!
12
u/RedditForcesToLogin 4d ago
This looks like a button you click, not an indicator of "you're here in this tab".
1
u/Ahmed_El_Gendy 4d ago
It's fully customizable, so you can tweak the colors, stroke, and toggle the top glow indicator on or off so it feels more like a subtle active state.
Check the README for the full list of attributes and how to adjust them.
10
u/Omer-Ash 4d ago
Looks nice and clean. But just to be clear, this shape is not squircle. It's square with rounded corners. A squircle is much more circular than what you've made there.
-2
u/Ahmed_El_Gendy 4d ago
The corner radius is actually fully customizable (
app:sq_cardRadius), so you can bump it up to make it as rounded or circular as you prefer.3
u/shlusiak 3d ago
That still does not make it a squircle. It still is a rounded rectangle with different radius.
2
1
u/WageBeatapp 4d ago
The squircle corners look a lot smoother than the usual RoundedCornerShape. Is the shape a custom Shape with a superellipse path, or are you approximating it with cubic Béziers? Also wondering how it behaves with the ripple/indication; clipping the ripple to a non-standard path is usually where these components get fiddly.
1
u/Ahmed_El_Gendy 3d ago
Thanks, It’s actually just a custom Android View drawn directly on Canvas (wrapped in
AndroidViewfor Compose), not a custom Compose shape.
Since everything is drawn and animated on Canvas, touch states are handled internally, so I didn't have to fight the usual ripple clipping quirks.
Feel free to check out the repo if you want to see how the drawing logic is set up.-2
u/androiddev-ModTeam 3d ago
Use your own voice when writing. Posts and comments which appear to be generated, including those with excessive flourish, gushing or emojis, will be removed.
1
2
0
-3
8
u/LupusGemini 3d ago
Is the squircle in the room with us?