Back to project page example.
The source code is released under:
Apache License
If you think the Android project example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package me.pratama.examplematerial; // www .j a v a 2 s .c om import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.Toolbar; import android.util.Log; /** * Created by pratama on 12/14/14. */ public class BaseActivity extends ActionBarActivity { private Toolbar toolbar; @Override public void setContentView(int layoutResID) { super.setContentView(layoutResID); getToolbar(); } /** * get toolbar * * @return */ protected Toolbar getToolbar() { if (toolbar == null) { toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); Log.d("test", "setSupport"); } return toolbar; } }