0

I am trying to code a fixed button bar at the bottom of the page like it may be found on Instagram at the bottom of the screen.

Screenshot:

enter image description here

More similar images

The buttons at the bottom of the page are fixed there. I tried to put a new relative layout with a background colour with 5 image buttons, but when I change the screen size some buttons disappears. I tried a split action bar, but it is not what I am after.

Any idea?

Thanks a lot!

codeMagic
  • 44,549
  • 13
  • 77
  • 93
Edoardo1234
  • 5
  • 1
  • 4
  • My answer should give you approximately what you need. But, in the future, consider posting your attempt so we can help guide you and know what you have already. – codeMagic Feb 09 '15 at 20:12

1 Answers1

1

If you want each button to take up the same amount of space then just use a LinearLayout instead of RelativeLayout. You can then use the layout_weight param for each. Roughly...

<LinearLayout
    ...>
    <ImageButton
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        .../>
    <ImageButton
        // just like above />
</LinearLayout>
codeMagic
  • 44,549
  • 13
  • 77
  • 93