コード例 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    //        TapItLog.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);

    // defaults, override in AdActivityContentWrapper.getContentView(...)
    getWindow().requestFeature(Window.FEATURE_PROGRESS);
    getWindow().requestFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFeatureInt(Window.FEATURE_PROGRESS, Window.PROGRESS_VISIBILITY_ON);

    Bundle extras = getIntent().getExtras();
    Sharable<AdActivityContentWrapper> wrapperSharable =
        extras.getParcelable(CONTENT_WRAPPER_EXTRA);
    adActivityContentWrapper = wrapperSharable.obj();

    contentView = new InterstitialBaseView(this);
    contentView.setCloseButtonOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            if (adActivityContentWrapper.shouldClose()) {
              close();
            }
          }
        });

    View wrapperView = adActivityContentWrapper.getContentView(this);
    ViewGroup.LayoutParams lp = adActivityContentWrapper.getContentLayoutParams();
    contentView.addView(wrapperView, lp);

    setContentView(contentView);
  }
コード例 #2
0
 public void setCloseButtonVisible(boolean isVisible) {
   contentView.setCloseButtonVisible(isVisible);
 }