Revert "Random changes to advertisement code"

This reverts commit e3ff8b5e4d.
This commit is contained in:
pelya
2013-09-01 20:05:44 +03:00
parent 1c058ff98f
commit 6103f10454
2 changed files with 4 additions and 8 deletions

View File

@@ -146,15 +146,12 @@ public class MainActivity extends Activity
_videoLayout = new FrameLayout(this);
_videoLayout.addView(_layout);
// Do not show advertisement in SDL menu
/*
_ad = new Advertisement(this);
if( _ad.getView() != null )
{
_videoLayout.addView(_ad.getView());
_ad.getView().setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | Gravity.RIGHT));
}
*/
setContentView(_videoLayout);
@@ -295,8 +292,8 @@ public class MainActivity extends Activity
sdlInited = true;
_videoLayout.removeView(_layout);
//if( _ad.getView() != null )
// _videoLayout.removeView(_ad.getView());
if( _ad.getView() != null )
_videoLayout.removeView(_ad.getView());
_layout = null;
_layout2 = null;
_btn = null;
@@ -311,11 +308,10 @@ public class MainActivity extends Activity
mGLView.setFocusableInTouchMode(true);
mGLView.setFocusable(true);
mGLView.requestFocus();
_ad = new Advertisement(this);
if( _ad.getView() != null )
{
_ad.getView().setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.TOP | Gravity.RIGHT));
_videoLayout.addView(_ad.getView());
_ad.getView().setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.TOP | Gravity.RIGHT));
}
// Receive keyboard events
DimSystemStatusBar.get().dim(_videoLayout);