2012-02-15 110 views
1

如何在android honeycomb中實現ActionBar?如何自定義操作欄?任何幫助,將不勝感激。在Android Honeycomb中實現ActionBar

+2

今後,使用谷歌來研究你所需要的基本的東西如果你有特定的編程問題,那麼來這裏。 – adneal 2012-02-15 04:57:54

回答

5

試試這個

ActionBar actionBar = getActionBar(); 
    LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); 
    View view = inflater.inflate(R.layout."id", null); 
    // lay.setLayoutParams(new ActionBar.LayoutParams(
    // android.app.ActionBar.LayoutParams.MATCH_PARENT, 
    // android.app.ActionBar.LayoutParams.MATCH_PARENT)); 
    //Not wrking 
    actionBar.setCustomView(view); 
    actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);