ActionBar 属性

 

    private void setActionBarStyle() {
        ActionBar actionBar = this.getActionBar();
        actionBar.setDisplayShowHomeEnabled(false); //隐藏icon、logo
//        actionBar.setDisplayShowTitleEnabled(false); //隐藏label
        actionBar.setBackgroundDrawable(this.getBaseContext().getResources().getDrawable(R.drawable.slidmenu_bg_titlebar));//设置背景颜色
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);//模式:标准
        actionBar.setHomeButtonEnabled(true);//按钮科点击
        actionBar.setDisplayHomeAsUpEnabled(true);//显示返回按钮(按钮可自定义:homeAsUpIndicator)
        actionBar.setTitle(" ");//设置label
//        int titleId = Resources.getSystem().getIdentifier("action_bar_title", "id", "android");
//        TextView textView = (TextView) findViewById(titleId);
////        textView.setTypeface(Typeface.createFromAsset(getAssets(), "font/Wendy.ttf"));
//        textView.setTextColor(0xFFdfdfdf);
//        textView.setTextSize(16);
    }

 

posted @ 2015-01-07 16:09  脓炸  阅读(244)  评论(0编辑  收藏  举报