AttackSettingActivity.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:SmingZZick_App 作者:
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_setting);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);


    int headTextColor;
    if (Build.VERSION.SDK_INT >= 23) {
        headTextColor = getResources().getColor(R.color.setup_item_head_text, null);
    } else {
        headTextColor = getResources().getColor(R.color.setup_item_head_text);
    }

    toolbar.setTitleTextColor(headTextColor);
    setSupportActionBar(toolbar);

    int headColor;
    if (Build.VERSION.SDK_INT >= 23) {
        headColor = getResources().getColor(R.color.setup_item_head, null);
    } else {
        headColor = getResources().getColor(R.color.setup_item_head);
    }

    getSupportActionBar().setTitle("총공 설정");
    getSupportActionBar().setBackgroundDrawable(new ColorDrawable(headColor));
    getFragmentManager().beginTransaction()
            .replace(R.id.frame, new AttackSettingFragment())
            .commit();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号