I come from your question that enablePaymentConfirmation works with the code getActionBar().setTitle("Customer Payment"); present when it is commented out. If he also plays, then I will need to change my answer.
Not seeing that your xml makes this a bit more guessing work, but I see that I suggest the following.
1. Call setupActionBar() from you OnCreate in your activity. Thus, it is configured for the duration of your activity. If you do not call it in OnCreate, if you call enableCustomerPayment() before enablePaymentConfirmation() , the action bar setting will not be called.
2. If you have not specified the following code changes, they can enter your setupActionbar:
getActionBar().setDisplayHomeAsUpEnabled(false); getActionBar().setHomeButtonEnabled(false);
3. These are two changes to the ActionBar between the two methods that you show:
getActionBar().setDisplayShowCustomEnabled(false) ; getActionBar().setDisplayUseLogoEnabled(false) ;
4. I am not sure why you are setting setDisplayShowCustomEnabled to your enableCustomerPayment() . I do not see that you are using customView. - If not, it can also go into your setup. - Otherwise, you will need to call it in all your methods with changes. - If you use a custom view for your action screen in some places and not others, it will affect how it is displayed. In particular, if you do not control bool changes.
5. The same goes for the logo; I donβt see where you use it. Therefore, I would put it in the settings. If you use it for others and you donβt have xml configured correctly, thatβs probably why there is a difference in background color.
Hope this helps. Feel free to post more info, xml will be fine.
source share