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 com.pratamawijaya.exampleinstagram; //w ww . j a v a 2 s . c o m import android.support.v7.app.ActionBarActivity; import android.widget.Toolbar; /** * Created by pratama on 12/12/14. */ public class BaseActivity extends ActionBarActivity { private Toolbar toolbar; @Override public void setContentView(int layoutResID) { super.setContentView(layoutResID); getActionBarToolbar(); } protected Toolbar getActionBarToolbar() { if (toolbar != null) { toolbar = (Toolbar) findViewById(R.id.toolbar); setActionBar(toolbar); } return toolbar; } }