Skip to content

Instantly share code, notes, and snippets.

@christophercotton
Created March 7, 2011 17:59
Show Gist options
  • Save christophercotton/858891 to your computer and use it in GitHub Desktop.
Save christophercotton/858891 to your computer and use it in GitHub Desktop.
AdwhirlLayout that has a hack to pause the ad rotation
import android.app.Activity;
import com.adwhirl.AdWhirlLayout;
public class PausableAdhwirlLayout extends AdWhirlLayout {
public PausableAdhwirlLayout(final Activity context, final String keyAdWhirl) {
super(context, keyAdWhirl);
}
/**
* call this on your Activity.onPause()
*/
public void onPause()
{
this.onWindowVisibilityChanged(INVISIBLE);
}
/**
* call this on your Activity.onResume()
*/
public void onResume()
{
this.onWindowVisibilityChanged(VISIBLE);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment