Revert "Random changes to advertisement code"
This reverts commit e3ff8b5e4d.
This commit is contained in:
@@ -146,15 +146,12 @@ public class MainActivity extends Activity
|
|||||||
_videoLayout = new FrameLayout(this);
|
_videoLayout = new FrameLayout(this);
|
||||||
_videoLayout.addView(_layout);
|
_videoLayout.addView(_layout);
|
||||||
|
|
||||||
// Do not show advertisement in SDL menu
|
|
||||||
/*
|
|
||||||
_ad = new Advertisement(this);
|
_ad = new Advertisement(this);
|
||||||
if( _ad.getView() != null )
|
if( _ad.getView() != null )
|
||||||
{
|
{
|
||||||
_videoLayout.addView(_ad.getView());
|
_videoLayout.addView(_ad.getView());
|
||||||
_ad.getView().setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | Gravity.RIGHT));
|
_ad.getView().setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | Gravity.RIGHT));
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
setContentView(_videoLayout);
|
setContentView(_videoLayout);
|
||||||
|
|
||||||
@@ -295,8 +292,8 @@ public class MainActivity extends Activity
|
|||||||
|
|
||||||
sdlInited = true;
|
sdlInited = true;
|
||||||
_videoLayout.removeView(_layout);
|
_videoLayout.removeView(_layout);
|
||||||
//if( _ad.getView() != null )
|
if( _ad.getView() != null )
|
||||||
// _videoLayout.removeView(_ad.getView());
|
_videoLayout.removeView(_ad.getView());
|
||||||
_layout = null;
|
_layout = null;
|
||||||
_layout2 = null;
|
_layout2 = null;
|
||||||
_btn = null;
|
_btn = null;
|
||||||
@@ -311,11 +308,10 @@ public class MainActivity extends Activity
|
|||||||
mGLView.setFocusableInTouchMode(true);
|
mGLView.setFocusableInTouchMode(true);
|
||||||
mGLView.setFocusable(true);
|
mGLView.setFocusable(true);
|
||||||
mGLView.requestFocus();
|
mGLView.requestFocus();
|
||||||
_ad = new Advertisement(this);
|
|
||||||
if( _ad.getView() != null )
|
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());
|
_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
|
// Receive keyboard events
|
||||||
DimSystemStatusBar.get().dim(_videoLayout);
|
DimSystemStatusBar.get().dim(_videoLayout);
|
||||||
|
|||||||
Reference in New Issue
Block a user