Back to project page Teracast-Android.
The source code is released under:
Apache License
If you think the Android project Teracast-Android 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.davidtpate.teracast.ui.base; // ww w . ja v a 2s. c o m import android.os.Bundle; import android.support.v4.app.FragmentActivity; import butterknife.ButterKnife; import com.android.debug.hv.ViewServer; import com.davidtpate.teracast.BuildConfig; /** * Base class for all Activities that need fragments. */ public class BaseFragmentActivity extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (BuildConfig.DEBUG) { ViewServer.get(this).addWindow(this); } } @Override protected void onDestroy() { super.onDestroy(); if (BuildConfig.DEBUG) { ViewServer.get(this).removeWindow(this); } } @Override protected void onResume() { super.onResume(); if (BuildConfig.DEBUG) { ViewServer.get(this).setFocusedWindow(this); } } @Override public void setContentView(int layoutResId) { super.setContentView(layoutResId); // Used to inject views with the Butterknife library ButterKnife.inject(this); } }