AdManagerAdView

class AdManagerAdView : BaseAdView


View להצגת מודעות באנר לשימוש ב-Google Ad Manager. צריך להגדיר את גודל המודעה ואת המזהה של יחידת המודעות לפני שמפעילים את הפונקציה loadAd.

קוד לדוגמה:

public class MyActivity extends Activity {
    private AdManagerAdView adManagerAdView;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        LinearLayout layout = new LinearLayout(this);
        layout.setOrientation(LinearLayout.VERTICAL);

        // Create a banner ad. The ad size and ad unit ID must be set before calling loadAd.
        adManagerAdView = new AdManagerAdView(this);
        adManagerAdView.setAdSize(AdSize.BANNER);
        adManagerAdView.setAdUnitId("myAdUnitId");

        // Add the AdManagerAdView to the view hierarchy.
        layout.addView(adManagerAdView);

        // Start loading the ad.
        adManagerAdView.loadAd(new AdManagerAdRequest.Builder().build());

        setContentView(layout);
    }

    @Override
    public void onResume() {
        super.onResume();

        // Resume the AdManagerAdView.
        adManagerAdView.resume();
    }

    @Override
    public void onPause() {
        // Pause the AdManagerAdView.
        adManagerAdView.pause();

        super.onPause();
    }

    @Override
    public void onDestroy() {
        // Destroy the AdManagerAdView.
        adManagerAdView.destroy();

        super.onDestroy();
    }
}

ref com.google.android.gms.ads.R.styleable#AdsAttrs_adSizes

ref com.google.android.gms.ads.R.styleable#AdsAttrs_adUnitId

סיכום

‫constructors ציבוריים

יוצר AdManagerAdView מקוד.

AdManagerAdView(context: Context, attrs: AttributeSet!)

יוצר AdManagerAdView מפריסת XML.

AdManagerAdView(context: Context, attrs: AttributeSet!, defStyle: Int)

יוצר AdManagerAdView מפריסת XML.

פונקציות ציבוריות

Array<AdSize!>?

הפונקציה מחזירה את גדלי המודעות שנתמכים על ידי AdManagerAdView.

AppEventListener?

מחזירה את ה-AppEventListener של ה-AdManagerAdView הזה.

VideoController!

מחזירה את ה-VideoController של הצפייה במודעה הזו.

VideoOptions?

מחזירה את ה-VideoOptions של הצפייה במודעה הזו.

Unit

טוענת מודעה.

Unit

מתעד חשיפה ידנית.

Unit
setAdSizes(adSizes: Array<AdSize!>!)

הגדרת הגדלים הנתמכים של מודעת הבאנר.

Unit

מגדירה AppEventListener ל-AdManagerAdView הזה.

Unit
setManualImpressionsEnabled(manualImpressionsEnabled: Boolean)

מציין אם אתם מתכוונים להקליט חשיפות באופן ידני עבור AdManagerAdView הזה.

Unit
setVideoOptions(videoOptions: VideoOptions!)

הגדרת VideoOptions לצפייה במודעה הזו.

Inherited Constants

מ-android.view.View
const Int
const Int
const Int
const Int
const Int
const Int
const Property<View!, Float!>!
const Int
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE = "creditCardExpirationDate"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY = "creditCardExpirationDay"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = "creditCardExpirationMonth"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = "creditCardExpirationYear"
const String!
const String!
AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE = "creditCardSecurityCode"
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int
const Int
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
GONE = 8
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
KEEP_SCREEN_ON = 67108864
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
NO_ID = -1
const Int
const Int
const Int
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int
const Int
const Int
const Float
const Float
const Float
const Float
const Float
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const String!
VIEW_LOG_TAG = "View"
const Int
const IntArray<Int>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
מתוך android.view.ViewGroup
const Int
const Int
const Int
const Int
const Int
const Int
const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

const Int

המאפיין הזה יצא משימוש.

פונקציות שעברו בירושה

מ-com.google.android.gms.ads.BaseAdView
Unit

הפונקציה משמידה את תצוגת המודעה.

AdListener!

מחזירה את ה-AdListener של הצפייה במודעה הזו.

AdSize?

מחזירה את גודל המודעה.

String!

מחזירה את המזהה של יחידת המודעות.

OnPaidEventListener?

הפונקציה מחזירה את ה-OnPaidEventListener של הצפייה במודעה הזו.

Long

הפונקציה מחזירה את מזהה מיקום המודעה של ה-BaseAdView הזו.

ResponseInfo?

מחזירה את האובייקט ResponseInfo של המודעה שנטענה.

Boolean

מחזירה true אם המודעה היא באנר שאפשר לכווץ; מחזירה false עד שהמודעה נטענת.

Boolean

מחזירה true אם המודעה נטענת.

Unit

טוענת מודעה.

Unit
onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)
Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Unit

הפסקת כל עיבוד נוסף שמשויך לצפייה במודעה הזו.

Unit

ממשיך צפייה במודעה אחרי קריאה קודמת אל pause.

Unit
setAdListener(adListener: AdListener!)

מגדיר AdListener לצפייה במודעה הזו.

Unit
setAdSize(adSize: AdSize!)

הגדרה של גודל המודעה.

Unit
setAdUnitId(adUnitId: String!)

מגדירה את המזהה של יחידת המודעות.

Unit

רושמת קריאה חוזרת שתופעל כשהמערכת תעריך שהמודעה הזו הניבה רווחים.

Unit
setPlacementId(placementId: Long)

מגדירה מזהה מיקום להצגת המודעה הזו.

מ-android.view.View
Unit
Unit
Unit
ViewPropertyAnimator!
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Boolean
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Unit
Unit
Unit
Boolean
Unit
Unit
Unit
java-static Int
Int
Int
Int
Unit
WindowInsets!
Int
Int
Int
AccessibilityNodeInfo!
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Boolean
Boolean
Boolean
Boolean
Boolean
dispatchNestedPreScroll(p: Int, p1: Int, p2: IntArray!, p3: IntArray!)
Boolean
dispatchNestedScroll(p: Int, p1: Int, p2: Int, p3: Int, p4: IntArray!)
Boolean
Unit
draw(p: Canvas!)
Unit
OnBackInvokedDispatcher!
T!
<T : View?> findViewById(p: Int)
T!
<T : View?> findViewWithTag(p: Any!)
Boolean

הפונקציה הזו הוצאה משימוש.

Unit
Unit
Unit
generateDisplayHash(
    p: String!,
    p1: Rect!,
    p2: Executor!,
    p3: DisplayHashResultCallback!
)
java-static Int
View.AccessibilityDelegate!
Int
AccessibilityNodeProvider!
CharSequence!
Int
Int
String!
String!
Float
Animation!
Matrix!
IBinder!
IntArray<Int>!
(Mutable)Map<Int!, Int!>!
Array<String!>!
AutofillId!
Int
AutofillValue!
Drawable!
BlendMode!
ColorStateList!
PorterDuff.Mode!
Int
Int
Float
Int
Float
Rect!
Boolean
Boolean
ContentCaptureSession!
CharSequence!
Int
Context!
ContextMenu.ContextMenuInfo!
Boolean
java-static Int
getDefaultSize(p: Int, p1: Int)
Display!
IntArray<Int>!
Bitmap!

הפונקציה הזו הוצאה משימוש.

Int

הפונקציה הזו הוצאה משימוש.

Int

הפונקציה הזו הוצאה משימוש.

Unit
Long
Float
Int
Boolean
Boolean
Int
ArrayList<View!>!
Unit
Drawable!
Int
BlendMode!
ColorStateList!
PorterDuff.Mode!
Float
Boolean
Handler!
Float
Float
Float
Float
Int
Runnable!
Boolean
Int
Unit
Int
Int
Drawable!
Drawable!
Int
Int
Int
Int
Boolean
KeyEvent.DispatcherState!
Int
Int
Int
ViewGroup.LayoutParams!
Int
Float
Int
Boolean
Unit
Unit
Unit
Matrix!
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
View.OnFocusChangeListener!
Int
ViewOutlineProvider!
Int
Int
ViewOverlay!
Int
Int
Int
Int
Int
Int
ViewParent!
ViewParent!
OutcomeReceiver<GetCredentialResponse!, GetCredentialException!>!
GetCredentialRequest!
Float
Float
PointerIcon!
(Mutable)List<Rect!>!
Array<String!>!
Float
Resources!
Boolean
Int
Float
Int
AttachedSurfaceControl!
View!
WindowInsets!
Float
Float
Float
Float
Float
Int
Int
Int
Int
Int
Int
Int
Int
Int
Int
CharSequence!
StateListAnimator!
Int
Int
CharSequence!
(Mutable)List<Rect!>!
Int

הפונקציה הזו הוצאה משימוש.

Any!
Int
Int
CharSequence!
Int
Float
Int
TouchDelegate!
ArrayList<View!>!
Float
String!
Float
Float
Float
Long
Int
Int
Drawable!
Drawable!
Int
ViewTranslationResponse!
ViewTreeObserver!
Int
Int
Int
WindowId!
WindowInsetsController!
Int

הפונקציה הזו הוצאה משימוש.

IBinder!
Int
Unit
Float
Float
Float
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
java-static View!
inflate(p: Context!, p1: Int, p2: ViewGroup!)
Unit
Unit
Unit
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean

הפונקציה הזו הוצאה משימוש.

Boolean
Boolean

הפונקציה הזו הוצאה משימוש.

Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
View!
Unit
measure(p: Int, p1: Int)
java-static IntArray<Int>!
Unit
Unit
Unit
Unit
WindowInsets!
Unit
Boolean
Boolean
Unit
Unit
InputConnection!
Unit
Unit
Unit
Boolean
Unit
Unit
Unit
Boolean
Unit
Unit
Unit
onFocusChanged(p: Boolean, p1: Int, p2: Rect!)
Boolean
Unit
Boolean
Unit
Unit
Boolean
onKeyDown(p: Int, p1: KeyEvent!)
Boolean
Boolean
onKeyMultiple(p: Int, p1: Int, p2: KeyEvent!)
Boolean
onKeyPreIme(p: Int, p1: KeyEvent!)
Boolean
Boolean
onKeyUp(p: Int, p1: KeyEvent!)
Unit
onMeasure(p: Int, p1: Int)
Unit
onOverScrolled(p: Int, p1: Int, p2: Boolean, p3: Boolean)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
ContentInfo!
Unit
Unit
Parcelable!
Unit
Unit
onScrollCaptureSearch(
    p: Rect!,
    p1: Point!,
    p2: Consumer<ScrollCaptureTarget!>!
)
Unit
onScrollChanged(p: Int, p1: Int, p2: Int, p3: Int)
Boolean
Boolean
Unit
onSizeChanged(p: Int, p1: Int, p2: Int, p3: Int)
Unit
Boolean
Boolean
Unit
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Boolean
overScrollBy(
    p: Int,
    p1: Int,
    p2: Int,
    p3: Int,
    p4: Int,
    p5: Int,
    p6: Int,
    p7: Int,
    p8: Boolean
)
Boolean
Boolean
Boolean
Boolean
Boolean
ContentInfo!
Unit
Boolean
Boolean
Unit
Unit
Unit
Unit
Unit
Unit
java-static Unit
Unit
Boolean
Unit
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Boolean
Unit
Unit
Boolean
Unit
T!
<T : View?> requireViewById(p: Int)
Unit
java-static Int
resolveSize(p: Int, p1: Int)
java-static Int
resolveSizeAndState(p: Int, p1: Int, p2: Int)
Unit
Unit
saveAttributeDataForStyleable(
    p: Context!,
    p1: IntArray!,
    p2: AttributeSet!,
    p3: TypedArray!,
    p4: Int,
    p5: Int
)
Unit
Unit
scheduleDrawable(p: Drawable!, p1: Runnable!, p2: Long)
Unit
scrollBy(p: Int, p1: Int)
Unit
scrollTo(p: Int, p1: Int)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit

הפונקציה הזו הוצאה משימוש.

Unit

הפונקציה הזו הוצאה משימוש.

Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
setId(p: Int)
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Unit
Unit
Unit
Unit
Unit
setLayerType(p: Int, p1: Paint!)
Unit
Unit
Unit
Unit
setLeftTopRightBottom(p: Int, p1: Int, p2: Int, p3: Int)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Unit
Unit
Unit
Unit
Unit
setPadding(p: Int, p1: Int, p2: Int, p3: Int)
Unit
setPaddingRelative(p: Int, p1: Int, p2: Int, p3: Int)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
setTag(p: Int, p1: Any!)
Unit
Unit
Unit
Unit
setTop(p: Int)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Unit
setX(p: Float)
Unit
setY(p: Float)
Unit
setZ(p: Float)
Boolean
ActionMode!
Unit
Boolean
startDrag(p: ClipData!, p1: View.DragShadowBuilder!, p2: Any!, p3: Int)

הפונקציה הזו הוצאה משימוש.

Boolean
Boolean
Unit
String!
Unit
Unit
java-static Unit
Unit
Unit
Boolean
Boolean

הפונקציה הזו הוצאה משימוש.

Boolean
מתוך android.view.ViewGroup
Unit
Unit
Unit
addFocusables(p: ArrayList<View!>!, p1: Int, p2: Int)
Unit
Boolean
Unit
Unit
Boolean
Unit
attachLayoutAnimationParameters(
    p: View!,
    p1: ViewGroup.LayoutParams!,
    p2: Int,
    p3: Int
)
Unit
Unit
Boolean
Boolean
Unit
Unit
Unit
Unit
Unit
Unit
Unit
debug(p: Int)
Unit
Unit
Unit
WindowInsets!
Boolean
Unit
Unit
Unit
Boolean
Unit
Unit
Unit
Unit
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Unit
Unit
Unit
Unit
Unit
Unit
dispatchScrollCaptureSearch(
    p: Rect!,
    p1: Point!,
    p2: Consumer<ScrollCaptureTarget!>!
)
Boolean
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Boolean
Boolean
Boolean
Unit
Unit
Unit
Unit
WindowInsets!
WindowInsetsAnimation.Bounds!
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Boolean
drawChild(p: Canvas!, p1: View!, p2: Long)
Unit
Unit
View!
OnBackInvokedDispatcher!
Unit
View!
focusSearch(p: View!, p1: Int)
Unit
Boolean
ViewGroup.LayoutParams!
ViewGroup.LayoutParams!
CharSequence!
View!
Int
Int
java-static Int
getChildMeasureSpec(p: Int, p1: Int, p2: Int)
Boolean
Boolean
getChildVisibleRect(p: View!, p1: Rect!, p2: Point!)
Boolean
Boolean
Int
View!
LayoutAnimationController!
Animation.AnimationListener!
Int
LayoutTransition!
Int
ViewGroupOverlay!
Int

הפונקציה הזו הוצאה משימוש.

Boolean
Boolean
Boolean
Int
Unit
invalidateChild(p: View!, p1: Rect!)

הפונקציה הזו הוצאה משימוש.

ViewParent!

הפונקציה הזו הוצאה משימוש.

Boolean

הפונקציה הזו הוצאה משימוש.

Boolean

הפונקציה הזו הוצאה משימוש.

Boolean
Boolean

הפונקציה הזו הוצאה משימוש.

Boolean
Boolean
Boolean
Unit
Unit
layout(p: Int, p1: Int, p2: Int, p3: Int)
Unit
measureChild(p: View!, p1: Int, p2: Int)
Unit
measureChildWithMargins(p: View!, p1: Int, p2: Int, p3: Int, p4: Int)
Unit
measureChildren(p: Int, p1: Int)
Unit
Unit
Unit
Unit
IntArray<Int>!
Unit
Unit
Boolean
Boolean
abstract Unit
onLayout(p: Boolean, p1: Int, p2: Int, p3: Int, p4: Int)
Boolean
onNestedFling(p: View!, p1: Float, p2: Float, p3: Boolean)
Boolean
onNestedPreFling(p: View!, p1: Float, p2: Float)
Boolean
Unit
onNestedPreScroll(p: View!, p1: Int, p2: Int, p3: IntArray!)
Unit
onNestedScroll(p: View!, p1: Int, p2: Int, p3: Int, p4: Int)
Unit
onNestedScrollAccepted(p: View!, p1: View!, p2: Int)
Boolean
Boolean
PointerIcon!
Boolean
onStartNestedScroll(p: View!, p1: View!, p2: Int)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
removeViews(p: Int, p1: Int)
Unit
Unit
Boolean
Unit
Boolean
requestFocus(p: Int, p1: Rect!)
Boolean
Unit
Boolean
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit

הפונקציה הזו הוצאה משימוש.

Unit

הפונקציה הזו הוצאה משימוש.

Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit
Unit

הפונקציה הזו הוצאה משימוש.

Unit
Unit
Unit
Unit
Unit
Boolean
Boolean
ActionMode!
Unit
Unit
Unit
Unit

‫constructors ציבוריים

AdManagerAdView

AdManagerAdView(context: Context)

יוצר AdManagerAdView מקוד.

פרמטרים
context: Context

המספר Context שבו AdManagerAdView פועל.

AdManagerAdView

AdManagerAdView(context: Context, attrs: AttributeSet!)

יוצר AdManagerAdView מפריסת XML.

AdManagerAdView

AdManagerAdView(context: Context, attrs: AttributeSet!, defStyle: Int)

יוצר AdManagerAdView מפריסת XML.

פונקציות ציבוריות

getAdSizes

fun getAdSizes(): Array<AdSize!>?

הפונקציה מחזירה את גדלי המודעות שנתמכים על ידי AdManagerAdView. במאמר getAdSize מוסבר מה הגודל של מודעת הבאנר שמוצגת כרגע.

ref com.google.android.gms.ads.R.styleable#AdsAttrs_adSizes

getAppEventListener

fun getAppEventListener(): AppEventListener?

מחזירה את ה-AppEventListener של ה-AdManagerAdView הזה.

getVideoController

fun getVideoController(): VideoController!

מחזירה את ה-VideoController של הצפייה במודעה הזו.

getVideoOptions

fun getVideoOptions(): VideoOptions?

מחזירה את ה-VideoOptions של הצפייה במודעה הזו.

loadAd

@RequiresPermission(value = Manifest.permission.INTERNET)
fun loadAd(adManagerAdRequest: AdManagerAdRequest!): Unit

טוענת מודעה.

מקפיצה את הודעות השגיאה (Throws)
java.lang.IllegalStateException

אם לא הגדרתם את הגודל של מודעת הבאנר או את מזהה יחידת המודעות.

recordManualImpression

fun recordManualImpression(): Unit

מתעד חשיפה ידנית. כדי שהשיטה הזו תפעל, המודעה שנטענה צריכה לאפשר תיעוד ידני של חשיפות.

setAdSizes

fun setAdSizes(adSizes: Array<AdSize!>!): Unit

הגדרת הגדלים הנתמכים של מודעת הבאנר. ברוב המקרים, מציינים רק גודל מודעה אחד.

אפשר לציין כמה גדלים של מודעות אם האפליקציה יכולה לטפל בכמה גדלים של מודעות בצורה מתאימה. לדוגמה, יכול להיות שהאפליקציה שלכם תקרא ל-getAdSize במהלך הקריאה החוזרת onAdLoaded ותשנה את הפריסה בהתאם לגודל המודעה שנטענה. אם מציינים כמה גדלים של מודעות, התג AdManagerAdView יניח את הגודל של המודעה הראשונה עד שהמודעה תיטען.

בנוסף, השיטה הזו משנה את הגודל של המודעה שמוצגת כרגע באופן מיידי, ולכן לא מומלץ להפעיל אותה אחרי שהמודעה נטענה, אלא אם אתם בטוחים שהתוכן של המודעה יוצג בצורה תקינה בגודל החדש של המודעה. אפשר להשתמש בשיטה הזו אם צריך לשנות את הגודל של מודעה אחרי שהיא נטענה. אם מציינים יותר מגודל מודעה אחד, גודל המודעה שמוצגת כרגע ישתנה לגודל המודעה הראשון.

ref com.google.android.gms.ads.R.styleable#AdsAttrs_adSizes

מקפיצה את הודעות השגיאה (Throws)
java.lang.IllegalArgumentException

אם adSizes הוא null או ריק.

setAppEventListener

fun setAppEventListener(appEventListener: AppEventListener?): Unit

מגדירה AppEventListener ל-AdManagerAdView הזה.

setManualImpressionsEnabled

fun setManualImpressionsEnabled(manualImpressionsEnabled: Boolean): Unit

מציין אם אתם מתכוונים להקליט חשיפות באופן ידני עבור AdManagerAdView הזה. יש להפעיל את ה-method הזו לפני שמפעילים את loadAd. אפשר להשתמש ב-recordManualImpression כדי להקליט חשיפות באופן ידני.

setVideoOptions

fun setVideoOptions(videoOptions: VideoOptions!): Unit

הגדרת VideoOptions לצפייה במודעה הזו.