ActionBar exactly like Facebook app

1k Views Asked by At

I want to build a single-line action bar exactly like in fb, with tabs embedded inside the actionbar in form of icons at center so that when user swipes page the next icon is highlighted.

I'm using HoloEverywhere lib which uses actionbarsherlock internally. I'm aware of actionbar customviews but couldnt figure out how to embed tabs inside the customview. Please help . If possible please share code sample

Thanks in advance

enter image description here

1

There are 1 best solutions below

2
On

Just create an xml layout that looks like the Facebook action bar, then do something like this:

ActionBar action = getSupportActionBar();
LayoutInflater inflater = getLayoutInflater();
View view = inflater.inflate(R.layout.your_header_xml, null);
action.setCustomView(view);

You just have to make the xml, then it should display fine.