Multi Banner Mopub

Friday, June 5th, 2015 - Thecnology

Multi Banner Mopub – Previously I‘ve explained how to insert banner ads mopub into our android project. However, I think itwas not a trick or a way that is so special to be posted. So, I added the trick is so special now thatprobably many who do not know, many who seek it as the title above multiple banner mopub. ( Read : How To Add MOPUB Banner )

To make a lot of ads in the screen is not so difficult, but necessary also foresight and good attention.In order to minimize the time, below we will weaving it briefly, just add a few lines of the previouscode on how to enter the ad mopub in android project.

In the hello world project before, we‘ve been able to add mopub banner. Now how do I add multiplebanner ads or bring in a single screen. ( Read : How To Add Airpush Banner )

Multi Banner Mopub

To add these ads, part of which had been added just in main.xml and mainactivity.java course,following more details.

1. Earlier, on main.xml code just like this

mopubmultimainThen we add a way to copy the above code and paste it below the record replace “adlay1” to “adlay2”, “adview” was changed to “adview1” and replace “alignParentTop =” true “to” below = “@ + id / adlay1 “. That is adlay 2 will be just below adlay1. So, logic like that, put adlay1 at the top and just below adlay1 adlay2. Then the code entirely in main.xml looks like the picture below. ( Read : Multi Banner Airpush )

mopubmultimainadd

2. Previously, MainActivity.java only have a few lines as shown below.

mopubmultijavaThe code below is a complement of main.xml which will bring up two ads on the screen activity onyour android. Just copy and paste the code and replace adview” becomes adview1” will completethe code to bring up 2 ads in your android screen activity. ( Read : Multi Banner Admob Version 6.4.1 )

mopubmultijavaadd

If you want to bring up the banner ads as much as 3 or even more, simply copy and paste the codethat is in main.xml and MainActivity.java, then replace the name id” it then you‘ve managed tocreate applications with multi banner.

Multi Banner Mopub | admin | 4.5
Leave a Reply