回答

0

下面是變通方法,解決了這個問題,但有一些更好的方式:

for(int i=0; i<(getActionBarToolbar()).getChildCount(); ++i) { 
    View nextChild = getActionBarToolbar().getChildAt(i); 
    if (nextChild instanceof ImageButton) 
    { 
     nextChild.setBackgroundResource(R.drawable.selectable_background_indigo); 
    } 
} 

我只是迭代和尋找這個ImageButton的在其上顯示漢堡包圖標,但必須是一些更好的方式。