Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Action bar list navigation + tab navigation - Position of spinner is not at left most

According to Jake as in Android layout with action bar and tabs, we decide to follow his 2nd suggestion.

Use tab navigation in the action bar and set a custom view with a Spinner

Together with IcsSpinner from ActionBarSherlock itself, we manage to make it work in Gingerbread and ICS both.

However, we still suffer the following problem, during landscape mode.

enter image description here

Note, the spinner ("Portfolio 1") is in between PORTFOLIO tab and search icon. What we want is, the spinner is at the left side of WATCHLIST tab.

Is there anything we may try out?

Thanks.

like image 717
Cheok Yan Cheng Avatar asked Jul 13 '12 16:07

Cheok Yan Cheng


1 Answers

You can set custom view for your action bar, user RelativeLayout to put your spinner at left side of "WATCH LiST"

in java code: actionBar.setCustomView(R.layout.custom_actionbar_layout)

like image 145
vanloi999 Avatar answered Oct 29 '22 01:10

vanloi999