ইনলাইন অভিযোজিত ব্যানার
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
প্ল্যাটফর্ম নির্বাচন করুন: অ্যান্ড্রয়েড আইওএস ফ্লাটার অ্যাডাপ্টিভ ব্যানার আপনাকে বিজ্ঞাপনের সর্বোত্তম আকার নির্ধারণ করতে বিজ্ঞাপনের প্রস্থ নির্দিষ্ট করতে দেয়। অভিযোজিত ব্যানারগুলি প্রতিটি ডিভাইসের জন্য বিজ্ঞাপনের আকার অপ্টিমাইজ করে কার্যক্ষমতাকে সর্বোচ্চ করে। এই পদ্ধতির ফলাফল উন্নত কর্মক্ষমতা জন্য সুযোগ.
নোঙ্গর করা অভিযোজিত ব্যানারের তুলনায়, ইনলাইন অভিযোজিত ব্যানারগুলি বড়, লম্বা এবং নির্দিষ্ট উচ্চতার পরিবর্তে পরিবর্তনশীল ব্যবহার করে। ইনলাইন অভিযোজিত ব্যানারগুলি পরিবর্তনশীল উচ্চতার, এবং পুরো স্ক্রীন বা আপনার নির্দিষ্ট করা সর্বোচ্চ উচ্চতাকে ঘিরে থাকতে পারে।
আপনি স্ক্রলিং সামগ্রীতে ইনলাইন অভিযোজিত ব্যানার রাখেন, উদাহরণস্বরূপ:

আপনি শুরু করার আগে
চালিয়ে যাওয়ার আগে, নিশ্চিত করুন যে আপনি শুরু করার নির্দেশিকা, ব্যানার বিজ্ঞাপনগুলি সম্পূর্ণ করেছেন।
অভিযোজিত ব্যানার বাস্তবায়ন
নোঙ্গর করা অভিযোজিত ব্যানারের বিপরীতে, ইনলাইন অ্যাডাপ্টার ব্যানারগুলি একটি ইনলাইন অভিযোজিত ব্যানার আকার ব্যবহার করে লোড হয়। একটি ইনলাইন অভিযোজিত বিজ্ঞাপনের আকার তৈরি করতে, নিম্নলিখিতগুলি সম্পূর্ণ করুন:
ব্যবহারে থাকা ডিভাইসের প্রস্থ পান, অথবা আপনি যদি স্ক্রিনের সম্পূর্ণ প্রস্থ ব্যবহার করতে না চান তাহলে আপনার নিজস্ব প্রস্থ সেট করুন।
কোটলিন
private val adWidth: Int
get() {
val displayMetrics = resources.displayMetrics
val adWidthPixels =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val windowMetrics: WindowMetrics = this.windowManager.currentWindowMetrics
windowMetrics.bounds.width()
} else {
displayMetrics.widthPixels
}
val density = displayMetrics.density
return (adWidthPixels / density).toInt()
}
জাভা
public int getAdWidth() {
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
int adWidthPixels = displayMetrics.widthPixels;
if (VERSION.SDK_INT >= VERSION_CODES.R) {
WindowMetrics windowMetrics = this.getWindowManager().getCurrentWindowMetrics();
adWidthPixels = windowMetrics.getBounds().width();
}
float density = displayMetrics.density;
return (int) (adWidthPixels / density);
}
বিজ্ঞাপন আকারের ক্লাসে উপযুক্ত স্ট্যাটিক পদ্ধতি ব্যবহার করুন, যেমন AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(Context context, int width)
নির্বাচিত অভিযোজনের জন্য একটি ইনলাইন অভিযোজিত বিজ্ঞাপন আকারের বস্তু পেতে।
কোটলিন
val adView = AdView(this@MainActivity)
adView.setAdSize(AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(this, adWidth))
জাভা
final AdView adView = new AdView(MainActivity.this);
adView.setAdSize(AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(this, getAdWidth()));
আপনার অ্যাপে অভিযোজিত ব্যানার প্রয়োগ করার সময়, এই পয়েন্টগুলি নোট করুন:
- সম্পূর্ণ উপলব্ধ প্রস্থ ব্যবহার করার সময় ইনলাইন অভিযোজিত ব্যানারের আকারগুলি সবচেয়ে ভাল কাজ করে। বেশিরভাগ ক্ষেত্রে, এই আকারটি ব্যবহার করা ডিভাইসের স্ক্রিনের সম্পূর্ণ প্রস্থ বা ব্যানারের মূল বিষয়বস্তুর সম্পূর্ণ প্রস্থ। বিজ্ঞাপনে স্থাপন করার দৃশ্যের প্রস্থ, ডিভাইসের প্রস্থ, মূল বিষয়বস্তুর প্রস্থ এবং প্রযোজ্য নিরাপদ এলাকাগুলি আপনাকে অবশ্যই জানতে হবে।
ওরিয়েন্ট ইনলাইন অভিযোজিত ব্যানার আকার
একটি নির্দিষ্ট অভিযোজনের জন্য একটি ইনলাইন অভিযোজিত ব্যানার বিজ্ঞাপন প্রিলোড করতে, নিম্নলিখিত পদ্ধতিগুলি ব্যবহার করুন:
যদি আপনার অ্যাপটি পোর্ট্রেট এবং ল্যান্ডস্কেপ দৃশ্য উভয়ই সমর্থন করে এবং আপনি বর্তমান অভিযোজনে একটি অভিযোজিত ব্যানার বিজ্ঞাপন প্রিলোড করতে চান, AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(Context context, int width)
ব্যবহার করুন এই পদ্ধতিটি বর্তমান অভিযোজনে একটি বিজ্ঞাপন লোড করে।
ইনলাইন অভিযোজিত ব্যানারের উচ্চতা সীমিত করুন
ডিফল্টরূপে, maxHeight
মান ছাড়াই ইনলাইন অভিযোজিত ব্যানারগুলির একটি maxHeight
ডিভাইসের উচ্চতার সমান থাকে৷ ইনলাইন অভিযোজিত ব্যানারের উচ্চতা সীমিত করতে, AdSize.getInlineAdaptiveBannerAdSize(int width, int maxHeight)
পদ্ধতি ব্যবহার করুন।
অতিরিক্ত সম্পদ
গিটহাবের উদাহরণ
ইনলাইন অভিযোজিত ব্যানারগুলিকে কার্যক্ষম দেখতে নমুনা অ্যাপ্লিকেশনটি ডাউনলোড করুন।
জাভা কোটলিন
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-09-02 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-09-02 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eAdaptive banners optimize ad size for each device to maximize performance by letting you specify the ad width.\u003c/p\u003e\n"],["\u003cp\u003eInline adaptive banners, placed within scrolling content, are larger, taller, and use variable heights compared to anchored adaptive banners.\u003c/p\u003e\n"],["\u003cp\u003eYou can get an inline adaptive banner ad size using the \u003ccode\u003eAdSize\u003c/code\u003e class's static methods with device width or a custom width.\u003c/p\u003e\n"],["\u003cp\u003eFor specific orientation preloading or limiting banner height, utilize dedicated \u003ccode\u003eAdSize\u003c/code\u003e methods like \u003ccode\u003egetPortraitInlineAdaptiveBannerAdSize\u003c/code\u003e or \u003ccode\u003egetInlineAdaptiveBannerAdSize\u003c/code\u003e.\u003c/p\u003e\n"]]],["Inline adaptive banners, designed for scrolling content, allow specifying ad width for optimal sizing and performance. To implement, determine the device or desired ad width. Then, use methods like `AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize` or `AdSize.getInlineAdaptiveBannerAdSize` to obtain an ad size object. Finally, load an ad using `AdView` and `AdRequest`. You may limit the ad's height, and specific orientation methods are available to load the ad.\n"],null,["Select platform: [Android](/admob/android/banner/inline-adaptive \"View this page for the Android platform docs.\") [iOS](/admob/ios/banner/inline-adaptive \"View this page for the iOS platform docs.\") [Flutter](/admob/flutter/banner/inline-adaptive \"View this page for the Flutter platform docs.\")\n\n\u003cbr /\u003e\n\nAdaptive banners let you specify the width of an ad to determine the optimal\nad size. Adaptive banners also maximize performance by optimizing the ad size\nfor each device. This approach results in opportunities for\nimproved performance.\n\nCompared to anchored adaptive banners, inline adaptive banners are larger,\ntaller, and use variable instead of fixed heights. Inline adaptive banners are\nof variable height, and might encompass the entire screen or a maximum height\nthat you specify.\n\nYou place inline adaptive banners in scrolling content, for example:\n\nBefore you begin\n\nBefore continuing, make sure you have completed the getting started guide,\n[Banner ads](/admob/android/banner).\n\nImplement adaptive banners\n\nUnlike anchored adaptive banners, inline adapter banners load using an inline\nadaptive banner size. To create an inline adaptive ad size, complete the\nfollowing:\n\n1. Get the width of the device in use, or set your own width if you don't want\n to use the full width of the screen.\n\n Kotlin \n\n private val adWidth: Int\n get() {\n val displayMetrics = resources.displayMetrics\n val adWidthPixels =\n if (Build.VERSION.SDK_INT \u003e= Build.VERSION_CODES.R) {\n val windowMetrics: WindowMetrics = this.windowManager.currentWindowMetrics\n windowMetrics.bounds.width()\n } else {\n displayMetrics.widthPixels\n }\n val density = displayMetrics.density\n return (adWidthPixels / density).toInt()\n } \n https://github.com/googleads/googleads-mobile-android-examples/blob/ccc290a583d7f552bdcf81ea76adc05beaa43f0b/kotlin/advanced/InlineAdaptiveBannerExample/app/src/main/java/com/google/android/gms/example/inlineadaptivebannerexample/MainActivity.kt#L70-L83\n\n Java \n\n public int getAdWidth() {\n DisplayMetrics displayMetrics = getResources().getDisplayMetrics();\n int adWidthPixels = displayMetrics.widthPixels;\n\n if (VERSION.SDK_INT \u003e= VERSION_CODES.R) {\n WindowMetrics windowMetrics = this.getWindowManager().getCurrentWindowMetrics();\n adWidthPixels = windowMetrics.getBounds().width();\n }\n\n float density = displayMetrics.density;\n return (int) (adWidthPixels / density);\n } \n https://github.com/googleads/googleads-mobile-android-examples/blob/ccc290a583d7f552bdcf81ea76adc05beaa43f0b/java/advanced/InlineAdaptiveBannerExample/app/src/main/java/com/google/android/gms/example/inlineadaptivebannerexample/MainActivity.java#L133-L145\n\n2. Use the appropriate static methods on the ad size class, such as\n\n `AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(Context context, int width)`\n\n to get an inline adaptive ad size object for the chosen orientation.\n\n Kotlin \n\n val adView = AdView(this@MainActivity)\n adView.setAdSize(AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(this, adWidth)) \n https://github.com/googleads/googleads-mobile-android-examples/blob/ccc290a583d7f552bdcf81ea76adc05beaa43f0b/kotlin/advanced/InlineAdaptiveBannerExample/app/src/main/java/com/google/android/gms/example/inlineadaptivebannerexample/MainActivity.kt#L120-L121\n\n Java \n\n final AdView adView = new AdView(MainActivity.this);\n adView.setAdSize(AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(this, getAdWidth())); \n https://github.com/googleads/googleads-mobile-android-examples/blob/ccc290a583d7f552bdcf81ea76adc05beaa43f0b/java/advanced/InlineAdaptiveBannerExample/app/src/main/java/com/google/android/gms/example/inlineadaptivebannerexample/MainActivity.java#L154-L155\n\n\u003cbr /\u003e\n\nWhen implementing adaptive banners in your app, note these points:\n\n- The inline adaptive banner sizes work best when using the full available width. In most cases, this size is the full width of the device screen in use, or the full width of the banner's parent content. You must know the width of the view to place in the ad, the device width, the parent content width, and applicable safe areas.\n\nOrient inline adaptive banner size\n\nTo preload an inline adaptive banner ad for a specific orientation, use the\nfollowing methods:\n\n- [`AdSize.getPortraitInlineAdaptiveBannerAdSize(Context context, int width)`](/admob/android/reference/com/google/android/gms/ads/AdSize#getPortraitInlineAdaptiveBannerAdSize(android.content.Context,int))\n\n- [`AdSize.getLandscapeInlineAdaptiveBannerAdSize(Context context, int width)`](/admob/android/reference/com/google/android/gms/ads/AdSize#getLandscapeInlineAdaptiveBannerAdSize(android.content.Context,int))\n\nIf your app supports both portrait and landscape views, and you want to preload\nan adaptive banner ad in the current orientation, use\n\n[`AdSize.getCurrentOrientationInlineAdaptiveBannerAdSize(Context context, int width)`](/admob/android/reference/com/google/android/gms/ads/AdSize#getCurrentOrientationInlineAdaptiveBannerAdSize(android.content.Context,int))\n\nThis method loads an ad in the current orientation.\n\nLimit inline adaptive banner height\n\nBy default, inline adaptive banners instantiated without a `maxHeight` value\nhave a `maxHeight` equal to the device height. To limit the inline adaptive\nbanner height, use the\n\n[`AdSize.getInlineAdaptiveBannerAdSize(int width, int maxHeight)`](/admob/android/reference/com/google/android/gms/ads/AdSize#getInlineAdaptiveBannerAdSize(int,int))\n\nmethod.\n\nAdditional resources\n\nExamples on GitHub\n\nDownload the sample application to see inline adaptive banners in action.\n\n[Java](//github.com/googleads/googleads-mobile-android-examples/tree/main/java/advanced/InlineAdaptiveBannerExample)\n[Kotlin](//github.com/googleads/googleads-mobile-android-examples/tree/main/kotlin/advanced/InlineAdaptiveBannerExample)\n\n\u003cbr /\u003e"]]