Different view in Options menu

Hello developers,

I got a perfect working options menu, but the layout is wrong. My options are now listed and not in the square blocks as I would like.

What i'm looking for is the left image. What I got now is the right image.

Thanks in advance!


  • yanniekyanniek USMember

    Sorry, forgot the image!

    set.jpg 96.7K
  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    It seems that you use different Android versions. The right one looks like a version above Android 3.x. Therefor it uses the Holo style. It also looks like that you do not use the long click event to show the menu instead of overriding OnCreateOptionsMenu.

  • yanniekyanniek USMember

    Thanks for commenting @Sebastian‌. Could you give me an example?

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    Take a look at this demo repository of mine. The MainActivity implements a menu on line 69 and handles it on line 75.

  • yanniekyanniek USMember

    Thanks @Sebastian‌. I've changed the target android version to automatic and deleted the holo theme. So now it works. The only thing left is that there aren't any lines between my options. Do you know why?


Sign In or Register to comment.