Created
December 17, 2014 07:27
-
-
Save Krishan14sharma/2eab19967409fc5fdb20 to your computer and use it in GitHub Desktop.
Contains optional Toolbar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dnn.zapbuild.sports.controller.activity; | |
import android.os.Bundle; | |
import android.support.v7.app.ActionBarActivity; | |
import android.support.v7.widget.Toolbar; | |
import com.dnn.zapbuild.sports.R; | |
import butterknife.ButterKnife; | |
import butterknife.InjectView; | |
import butterknife.Optional; | |
import timber.log.Timber; | |
/** | |
* Created by zapbuild on 17/12/14. | |
*/ | |
public class BaseToolBarActivity extends ActionBarActivity { | |
@Optional | |
@InjectView(R.id.toolbar) | |
protected Toolbar mToolbar; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
} | |
@Override | |
protected void onStart() { | |
super.onStart(); | |
} | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
} | |
@Override | |
protected void onPostCreate(Bundle savedInstanceState) { | |
super.onPostCreate(savedInstanceState); | |
ButterKnife.inject(this); | |
if (mToolbar != null) { | |
setSupportActionBar(mToolbar); | |
mToolbar.setNavigationIcon(R.drawable.ic_ab_drawer); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment