Created
March 15, 2016 22:16
-
-
Save FrantisekGazo/03bb0a9b20ed6f86c299 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 eu.f3rog.ui.activity; | |
import android.os.Bundle; | |
import android.support.annotation.LayoutRes; | |
import android.support.annotation.Nullable; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.Toolbar; | |
import butterknife.Bind; | |
import butterknife.ButterKnife; | |
import eu.f3rog.mangafreak.R; | |
/** | |
* Class {@link BaseActivity} | |
* | |
* @author FrantisekGazo | |
* @version 2016-03-11 | |
*/ | |
public abstract class BaseActivity | |
extends AppCompatActivity { | |
@Nullable | |
@Bind(R.id.toolbar) | |
Toolbar mToolbar; | |
@Override | |
protected void onCreate(@Nullable Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(getLayout()); | |
ButterKnife.bind(this); | |
if (mToolbar != null) { | |
setSupportActionBar(mToolbar); | |
} | |
} | |
@LayoutRes | |
protected abstract int getLayout(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment