Created
March 7, 2011 17:59
-
-
Save christophercotton/858891 to your computer and use it in GitHub Desktop.
AdwhirlLayout that has a hack to pause the ad rotation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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