সিস্টেম বারগুলিকে ম্লান করুন (অপ্রচলিত)
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই পাঠটি Android 4.0 (API স্তর 14) এবং উচ্চতর সিস্টেম বারগুলিকে (অর্থাৎ, স্থিতি এবং নেভিগেশন বারগুলি) কীভাবে ম্লান করতে হয় তা বর্ণনা করে৷ Android পূর্ববর্তী সংস্করণগুলিতে সিস্টেম বারগুলিকে ম্লান করার জন্য একটি অন্তর্নির্মিত উপায় সরবরাহ করে না।
আপনি যখন এই পদ্ধতিটি ব্যবহার করেন, তখন বিষয়বস্তুর আকার পরিবর্তন হয় না, তবে সিস্টেম বারের আইকনগুলি দৃশ্যমানভাবে হ্রাস পায়। ব্যবহারকারী স্ক্রিনের স্ট্যাটাস বার বা নেভিগেশন বার এলাকায় স্পর্শ করার সাথে সাথে উভয় বারই সম্পূর্ণ দৃশ্যমান হয়ে ওঠে। এই পদ্ধতির সুবিধা হল যে বারগুলি এখনও উপস্থিত রয়েছে কিন্তু তাদের বিশদগুলি অস্পষ্ট, এইভাবে বারগুলিতে সহজ অ্যাক্সেসকে ত্যাগ না করেই একটি নিমজ্জিত অভিজ্ঞতা তৈরি করে৷
স্থিতি এবং নেভিগেশন বার ম্লান করুন
আপনি SYSTEM_UI_FLAG_LOW_PROFILE
পতাকা ব্যবহার করে স্থিতি এবং নেভিগেশন বারগুলিকে ম্লান করতে পারেন, নিম্নরূপ:
কোটলিন
// This example uses decor view, but you can use any visible view.
activity?.window?.decorView?.apply {
systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE
}
জাভা
// This example uses decor view, but you can use any visible view.
View decorView = getActivity().getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE;
decorView.setSystemUiVisibility(uiOptions);
ব্যবহারকারী স্ট্যাটাস বা নেভিগেশন বারে স্পর্শ করার সাথে সাথে পতাকাটি সাফ হয়ে যায়, যার ফলে বারগুলি অমার্জিত হয়। একবার পতাকাটি সাফ হয়ে গেলে, আপনি যদি বারগুলি আবার ম্লান করতে চান তবে আপনার অ্যাপটিকে এটি পুনরায় সেট করতে হবে।
চিত্র 1 একটি গ্যালারী চিত্র দেখায় যেখানে নেভিগেশন বারটি ম্লান করা হয়েছে (মনে রাখবেন যে গ্যালারি অ্যাপটি স্ট্যাটাস বারটিকে সম্পূর্ণরূপে লুকিয়ে রাখে; এটি এটিকে ম্লান করে না)। লক্ষ্য করুন যে নেভিগেশন বারে (চিত্রের ডানদিকে) নেভিগেশন নিয়ন্ত্রণগুলিকে উপস্থাপন করার জন্য এটিতে অস্পষ্ট সাদা বিন্দু রয়েছে:

চিত্র 1. আবছা সিস্টেম বার।
চিত্র 2 একই গ্যালারী চিত্র দেখায়, কিন্তু সিস্টেম বার প্রদর্শিত হয়:

চিত্র 2. দৃশ্যমান সিস্টেম বার।
স্থিতি এবং নেভিগেশন বার প্রকাশ করুন
আপনি যদি setSystemUiVisibility()
এর সাথে সেট করা পতাকাগুলিকে প্রোগ্রাম্যাটিকভাবে সাফ করতে চান তবে আপনি এটি করতে পারেন:
কোটলিন
activity?.window?.decorView?.apply {
// Calling setSystemUiVisibility() with a value of 0 clears
// all flags.
systemUiVisibility = 0
}
জাভা
View decorView = getActivity().getWindow().getDecorView();
// Calling setSystemUiVisibility() with a value of 0 clears
// all flags.
decorView.setSystemUiVisibility(0);
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Dim the system bars (deprecated)\n\n| **Deprecated:** [setSystemUiVisibility](/reference/android/view/View#setSystemUiVisibility(int)) is deprecated in API Level 30\n\nThis lesson describes how to dim the system bars (that is, the status and the navigation\nbars) on Android 4.0 (API level 14) and higher. Android does not provide a built-in way to dim the\nsystem bars on earlier versions.\n\nWhen you use this approach, the content doesn't resize, but the icons in the system bars\nvisually recede. As soon as the user touches either the status bar or the navigation bar area of\nthe screen, both bars become fully visible. The advantage of this\napproach is that the bars are still present but their details are obscured, thus\ncreating an immersive experience without sacrificing easy access to the bars.\n\nDim the Status and Navigation Bars\n----------------------------------\n\nYou can dim the status and navigation bars using the\n[SYSTEM_UI_FLAG_LOW_PROFILE](/reference/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE) flag, as follows: \n\n### Kotlin\n\n```kotlin\n// This example uses decor view, but you can use any visible view.\nactivity?.window?.decorView?.apply {\n systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE\n}\n```\n\n### Java\n\n```java\n// This example uses decor view, but you can use any visible view.\nView decorView = getActivity().getWindow().getDecorView();\nint uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE;\ndecorView.setSystemUiVisibility(uiOptions);\n```\n\nAs soon as the user touches the status or navigation bar, the flag is cleared,\ncausing the bars to be undimmed. Once the flag has been cleared, your app needs to reset\nit if you want to dim the bars again.\n\nFigure 1 shows a gallery image in which the navigation bar is dimmed (note that the Gallery app\ncompletely hides the status bar; it doesn't dim it). Notice that the navigation bar (right\nside of the image) has faint white dots on it to represent the navigation controls:\n\n\n**Figure 1.** Dimmed system bars.\n\nFigure 2 shows the same gallery image, but with the system bars displayed:\n\n\n**Figure 2.** Visible system bars.\n\nReveal the Status and Navigation Bars\n-------------------------------------\n\nIf you want to programmatically clear flags set with\n[setSystemUiVisibility()](/reference/android/view/View#setSystemUiVisibility(int)), you can do so\nas follows: \n\n### Kotlin\n\n```kotlin\nactivity?.window?.decorView?.apply {\n // Calling setSystemUiVisibility() with a value of 0 clears\n // all flags.\n systemUiVisibility = 0\n}\n```\n\n### Java\n\n```java\nView decorView = getActivity().getWindow().getDecorView();\n// Calling setSystemUiVisibility() with a value of 0 clears\n// all flags.\ndecorView.setSystemUiVisibility(0);\n```"]]