I am trying to reproduce the account chooser widget that the GMail app has on top right.
I know already how to put things in the title but i have several problems:- I've tried putting a normal button in the title but it doesn't fit
- It looks like the size of the title is bigger than what it is, for example if I put a normal button there, there is no way of making it the proper height, in fact goes below the app开发者_开发百科 like if half of the title space was hidden below
- I thought it might be a clickable label with a rectangular shape, but I tried it and no way to make it work.
Any hint?
Looking at the layout using the hierarchy viewer it seems like it really is just a Button
inside a LinearLayout
. The only interesting part is that the LinearLayout
's layout_height
is set to MATCH_PARENT
(which is just the newer version of FILL_PARENT
) where its parent the RelativeLayout
has a hardcoded layout_height
of 54
.
I'm not sure if this is of help for you but maybe it can point you in the right direction.
精彩评论