Back to project page mTorch.
The source code is released under:
MIT License
If you think the Android project mTorch 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.wkovacs64.mtorch; // w w w. ja va 2s . co m import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.Toolbar; public abstract class BaseActivity extends ActionBarActivity { private Toolbar mAppBar; @Override public void setContentView(int layoutResID) { super.setContentView(layoutResID); // Get the ActionBar/Toolbar widget (App Bar) mAppBar = getAppBar(); } protected Toolbar getAppBar() { if (mAppBar == null) { mAppBar = (Toolbar) findViewById(R.id.app_bar); if (mAppBar != null) { setSupportActionBar(mAppBar); } } return mAppBar; } }