/*
 *  @ProjectName: ISMS_Petrel_MCU
 *  @Copyright: 2017 HangZhou Hikvision System Technology Co., Ltd. All Right Reserved.
 *  @address: http://www.hikvision.com
 *  @Description: 本内容仅限于杭州海康威视系统技术公有限司内部使用，禁止转发.
 */

package com.guiying.module.common.base;

import android.os.Bundle;
import android.support.annotation.Keep;
import android.support.annotation.StringRes;
import android.support.v7.app.ActionBar;

import com.guiying.module.common.R;

/**
 * BaseActionBarActivity继承于BaseActivity，封装了actionBar的逻辑；
 * 继承于ActionBarBaseActivity的Activity都将默认带有ActionBar，并且只能使用AppTheme主题；
 * 只有那些ActionBar只带有Title和返回按钮的Activity方可继承
 *
 * @author 张华洋 2017/3/7 18:36
 * @version V1.2.0
 * @name BaseActionBarActivity
 */
@Keep
public abstract class BaseActionBarActivity extends BaseActivity {

    /*默认的ActionBar*/
    protected ActionBar mActionBar;

    /**
     * 设置默认标题id
     *
     * @return 标题id
     */
    @StringRes
    protected abstract int setTitleId();


    /**
     * 更新标题
     *
     * @param title String标题
     */
    protected void setTitle(String title) {
        if (mActionBar != null) {
            mActionBar.setTitle(title);
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //标题栏设置
        mActionBar = getSupportActionBar();
        if (mActionBar != null) {
            mActionBar.setHomeAsUpIndicator(R.drawable.ic_arrow_back);
            mActionBar.setDisplayHomeAsUpEnabled(true);
            mActionBar.setHomeButtonEnabled(true);
            mActionBar.setTitle(setTitleId());
        }
    }

}

@@ -1,222 +1,4 @@
-/*%0A *  @ProjectName: ISMS_Petrel_MCU%0A *  @Copyright: 2017 HangZhou Hikvision System Technology Co., Ltd. All Right Reserved.%0A *  @address: http://www.hikvision.com%0A *  @Description: %E6%9C%AC%E5%86%85%E5%AE%B9%E4%BB%85%E9%99%90%E4%BA%8E%E6%9D%AD%E5%B7%9E%E6%B5%B7%E5%BA%B7%E5%A8%81%E8%A7%86%E7%B3%BB%E7%BB%9F%E6%8A%80%E6%9C%AF%E5%85%AC%E6%9C%89%E9%99%90%E5%8F%B8%E5%86%85%E9%83%A8%E4%BD%BF%E7%94%A8%EF%BC%8C%E7%A6%81%E6%AD%A2%E8%BD%AC%E5%8F%91.%0A */%0A%0A
 pack

Update BaseActionBarActivity.java