2

I want to use a BottomBar in my Android app but I'd like to style it like the one in Google Space app. How can I accomplish that effect?

Grender
  • 1,589
  • 2
  • 17
  • 44
Ahmed Elshaer
  • 364
  • 7
  • 21
  • see this: http://stackoverflow.com/questions/36019986/which-view-should-be-used-for-new-material-design-bottom-navigation/42119958#42119958 – Fartab Feb 08 '17 at 17:50

4 Answers4

4

after asking friend i found this library that implements exactly what i want

Here is a Demo

Ahmed Elshaer
  • 364
  • 7
  • 21
  • does not work how to solve the null pointer exception `java.lang.NullPointerException: Your space item count must be greater than 1 , your current items count isa : 0` – Pemba Tamang Aug 16 '19 at 07:49
2

This library lets you use it like a tab layout SpaceTabLibrary.

enter link description here

Razvan Cristian Lung
  • 5,661
  • 5
  • 25
  • 49
0

The simplest (smoke and mirrors) solution would be to make a nine patch with a bump in the middle for that layout's background - e.g. use Roman's tool - https://romannurik.github.io/AndroidAssetStudio/nine-patches.html

If you need the bottom bar to be animated, then you'll definitely have to create your own. Perhaps do a custom layout and when drawing the background, draw a bump in the middle? Extravaganza would surely be animating a vector drawable: https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html

milosmns
  • 3,595
  • 4
  • 36
  • 48
-2

Some elements to implement your solution :

enter image description here

enter image description here

compte14031879
  • 1,531
  • 14
  • 27