首页 > 其他 > 详细

ActionBar 属性

时间:2015-01-07 16:36:37      阅读:151      评论:0      收藏:0      [点我收藏+]

 

    private void setActionBarStyle() {
        ActionBar actionBar = this.getActionBar();
        actionBar.setDisplayShowHomeEnabled(false); //隐藏icon、logo
//        actionBar.setDisplayShowTitleEnabled(false); //隐藏title,会把坐上脚
        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);
    }

 

ActionBar 属性

原文:http://www.cnblogs.com/nongzha/p/4208701.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!