开发者

Android tabhost: How to set the tabwidget over the tabcontent?

I received a design where I have a custom tabbar, and one of the tabbar's tabs is bigger than the others.

This part was easy to do, but that bi开发者_如何学Gogger portion of the tab was suposed be over the tabcontent object, so when the content get scrolled, that tab will be 'floating' over it.

This was what I got first:

Android tabhost: How to set the tabwidget over the tabcontent?

I seted the magin_top of the tabcontent to -4dip (size of the bigger portion) and the content moved up, but it moved over the tabwidget.

This is what happened then:

Android tabhost: How to set the tabwidget over the tabcontent?

I'm new to android development, so I tried to look for anything like a z-index, I found a bringToFront() and a bringToFromChild(), but I guess they were not what I was looking for.

This is what I'm trying to do:

Android tabhost: How to set the tabwidget over the tabcontent?

Where the red is the content of a tab


Set the same Red background in parent container of tab-widget layout file so you can get a View like the last image.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜