Banner ads


Add an ImageView in your activity's XML file to act as a placeholder for the banner ad as follows:



  	<ImageView 
android:id="@+id/bannerplaceholder"
android:layout_width="370dp"
android:layout_height="100dp"
android:layout_marginBottom="20dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:srcCompat="@drawable/ic_launcher_background" />

Then, use findViewById to in your activity to access the ImageView you just created as follows:



  ImageView bannerplaceholder = (ImageView) findViewById(R.id.bannerplaceholder);

Then, pass the ImageView you created to showbannerad to show an ad as follows:



 EasyAds.showBannerAd(this,bannerplaceholder);