6

my app is using using Sherlock action bar. my designer gave me a new design.

  1. the app logo need to be in the middle
  2. 2 action items to the left and 2 actionitems to the right of the logo
  3. the app logo height is 1.5 the size of the actionbar (it suppose to be a little overflow)

is it possible to create a custom layout for the actionbar to implement this desing ? or should i remove my actionbar and implement the design my own ?

if item #3 will be optional , does it changes your answers ?

Thanks

1
  • 1
    Android users get pissed when their apps look like iOS apps... before you try to implement this design (which totally disregards Android design guidelines), you should warn your designer that users might not be very happy with the app's appearance. Oct 31, 2012 at 11:56

5 Answers 5

38

I'm sorry, but kick your designer in the...

He doesn't get Android at all and shouldn't design for Android. Either it's an ActionBar and then you should treat is as such and you (or your designer) should follow the common pattern on Android, or it is not.

If it is no ActionBar, please do not use an ActionBar (no matter which library) and create a custom design that deviates enough from an ActionBar so as not to confuse users!

1
  • 11
    Actually I think this designer is pretty good at designing ... iOS apps ^^. The description given in here is completely similar to the rendering of a UINavigationBar :D. Oct 31, 2012 at 10:57
3

Please forward your designer, and your manager to Android design patterns site at http://developer.android.com/design/patterns/actionbar.html . Also tell them that if they want Google to ever feature them, they pretty much have to adhere to these. With all failed use full screen layout and create a custom control on the top

2

I agree with other answers: that's not an action bar as defined by Android guidelines.

I'll just add that in case you can't go against the design decisions made (yeah, real-world projects sometimes suck and as a programmer you'll have to do what the client asks).

Go with your own implementation. I suggest simply creating a fragment with the appropriate listener interface (a common Android pattern, let the activity implement the interface, set the fragment's listener in onAttach).

1

If you want to implement this (and I pretty much agree with the other posters, that this is non-standard, and probably shouldn't be done).

You won't be able to create this style ActionBar with the standard APIs (or ActionBarSherlock for that matter) - since your UI is non-standard

You could create a RelativeLayout, with your icon in the center (centerInParent="true"). Then in the same layout, you could create a background, with width set to "fill_parent", and the height to 2/3 the size of your center icon (calculating this value in DP).

Then you can create ImageButtons for your 2 ActionItems to the left and to the right, then just put them in your layout relative to the center icon.

Bottom line, you probably should re-think your UI, to make this more standard to the design patterns specified by Android. If you still want to do it the way your designer asks, you will need to do a custom layout (using a RelativeLayout as I suggested is one way to accomplish the UI you are looking for).

-1

You could create a RelativeLayout, with your icon in the center

centerInParent="true"

Then in the same layout, you could create a background, with width set to fill_parent, and the height to 2/3 the size of your center icon (calculating this value in DP).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.