java - Unity android plugin - ads won't go on the bottom of screen -
I'm trying to create a plugin that I'm using the Amazon Mobile Ads Unity, but I for some reason To stick to the bottom of the screen it can not be obtained, it always goes to the top of the screen, the app is in landscape mode.
Here is the plugin code.
public class Amazon Ads {public Amazon Ads () {} public static void display ads (final boolean test) {UnityPlayerkcurrentActivitykrunOnUiThread (new Runnable () {public void run () { AdRegistration.setAppKey ("APPKEY"); AdRegistration.enableTesting; AdLayout adview = New AdLayout (UnityPlayer.currentActivity); LinearLayout Layout = New LinearLayout (UnityPlayer.currentActivity.getApplicationContext ()) Layout; Setgravity (Gravity.Botem) ; Unityplayer.CrenantActivity.AddContentView (Layout, New LayoutPay Rm (layout Paramakfil_pant, layout perm. Fil_pant)); layout. Adwu (Adwu new layout perm (layout Paramaan. MATCH_PARENT, layout Paramaan. MATCH_PARENT)); AdViewkloadAd (new AdTargetingOptions ());}}); - postprop = "text">
Sweet, I fixed it! If you want to know the answer, you can fix it.
AdRegistration.setAppKey ( "Apike"); AdRegistration.enableTesting (test); AdView = new AdLayout (Unitipleyr. currentActivity); LinearLayout layout = new linear layout (Unitipleyr. currentActivity.getApplicationContext ()); layout. setGravity (Gravity.BOTTOM); Unitipleyr Kwarryt Aktiwwaiti.ad Contentwu (layout, new Leautprrm (layout Paramakfil_pant, layout Paramakfil_p Arent)); layout.addView (adview, New FrameLayout.LayoutParams (LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL));
Comments
Post a Comment