Advertisement
Guest User

Untitled

a guest
May 1st, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. // Fake empty container layout
  2. RelativeLayout lContainerLayout = new RelativeLayout( this );
  3. lContainerLayout.setLayoutParams( new RelativeLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT ) );
  4.  
  5. RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT );
  6. //params.addRule( RelativeLayout.ALIGN_PARENT_BOTTOM );
  7. params.addRule( RelativeLayout.ALIGN_PARENT_TOP );
  8. params.addRule( RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE );
  9.  
  10. mAdView.setLayoutParams( params );
  11. lContainerLayout.addView( mAdView );
  12.  
  13. // Adding full screen container
  14. addContentView( lContainerLayout, new LayoutParams( LayoutParams.FILL_PARENT , LayoutParams.FILL_PARENT ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement