I have just started actionbar using actionbarsherlock. I have implemented it succesfully. I have used splitactionbarwhen narrow and splitted into main actionbar,tabbar,bottom bar. My question is how to add different icons in bottom bar and differnt icons in main actionbar? I am restricting my app into portrait mode only.
Asked
Active
Viewed 255 times
2 Answers
0
A workaround might be in order, seeing this other question right here.
Fortunately though, mimicking the bottom bar seems fairly easy. Just use a LinearLayout with a defined height, aligned to the bottom with ImageButtons with equal weights.
-
Don't use splitActionBarWhenNarrow so it goes to the top instead. – jerieljan Sep 27 '12 at 07:22
-
but if there is a scroll view in that case the bottom bar will go down and the UI design looks awkward – NewLearner Sep 27 '12 at 07:24
-
jerieljan i want bottombar definately in my UI. so Is there any other way for me to solve my issue – NewLearner Sep 27 '12 at 07:27
-
in that case, I would use a vertical LinearLayout as the parent container, with a RelativeLayout or ScrollView and the bottom bar at the same level. http://pastebin.com/nLMS8FVs – jerieljan Sep 27 '12 at 07:36
0
We cannot add icons in main actionbar so instead we can use custom view in actionbar by using these statements
actionbar = getSupportActionBar();
actionbar.setDisplayShowHomeEnabled(false);
actionbar.setDisplayShowTitleEnabled(false);
actionbar.setDisplayShowCustomEnabled(true);
View actionbar1 = LayoutInflater.from(this).inflate(R.layout.action_custom, null);
actionbar.setCustomView(actionbar1);

Ziem
- 6,579
- 8
- 53
- 86

NewLearner
- 116
- 3
- 16