نوار برنامه ، همچنین به عنوان نوار عمل شناخته می شود، یکی از مهم ترین عناصر طراحی در فعالیت های برنامه شما است، زیرا ساختار بصری و عناصر تعاملی را ارائه می دهد که برای کاربران آشنا است. استفاده از نوار برنامه، برنامه شما را با سایر برنامههای اندروید سازگار میکند و به کاربران اجازه میدهد به سرعت نحوه عملکرد برنامه شما را درک کنند و تجربهای عالی داشته باشند.
عملکردهای کلیدی نوار برنامه به شرح زیر است:
فضای اختصاصی برای هویت دادن به برنامه شما و نشان دادن مکان کاربر در برنامه.
دسترسی قابل پیش بینی به اقدامات مهم، مانند جستجو.
پشتیبانی از ناوبری و تغییر مشاهده، با استفاده از برگه ها یا منوها.
شکل 1. نوار برنامه از برنامه Google Sheets.
این بخش مستندات نحوه استفاده از ویجت Toolbar AndroidX را به عنوان نوار برنامه توضیح می دهد. راههای دیگری برای پیادهسازی نوار برنامه وجود دارد - برای مثال، برخی از تمها بهطور پیشفرض یک ActionBar را بهعنوان نوار برنامه تنظیم میکنند، اما استفاده از Toolbar AppCompat راهاندازی نوار برنامهای که در وسیعترین طیف دستگاهها کار میکند را آسانتر میکند. همچنین به شما فضایی می دهد تا نوار برنامه خود را در مراحل بعدی توسعه برنامه خود سفارشی کنید.
نوار برنامه ، همچنین به عنوان نوار عمل شناخته می شود، یکی از مهم ترین عناصر طراحی در فعالیت های برنامه شما است، زیرا ساختار بصری و عناصر تعاملی را ارائه می دهد که برای کاربران آشنا است. استفاده از نوار برنامه، برنامه شما را با سایر برنامههای اندروید سازگار میکند و به کاربران اجازه میدهد به سرعت نحوه عملکرد برنامه شما را درک کنند و تجربهای عالی داشته باشند.
عملکردهای کلیدی نوار برنامه به شرح زیر است:
فضای اختصاصی برای هویت دادن به برنامه شما و نشان دادن مکان کاربر در برنامه.
دسترسی قابل پیش بینی به اقدامات مهم، مانند جستجو.
پشتیبانی از ناوبری و تغییر مشاهده، با استفاده از برگه ها یا منوها.
شکل 1. نوار برنامه از برنامه Google Sheets.
این بخش مستندات نحوه استفاده از ویجت Toolbar AndroidX را به عنوان نوار برنامه توضیح می دهد. راههای دیگری برای پیادهسازی نوار برنامه وجود دارد - برای مثال، برخی از تمها بهطور پیشفرض یک ActionBar را بهعنوان نوار برنامه تنظیم میکنند، اما استفاده از Toolbar AppCompat راهاندازی نوار برنامهای که در وسیعترین طیف دستگاهها کار میکند را آسانتر میکند. همچنین به شما فضایی می دهد تا نوار برنامه خود را در مراحل بعدی توسعه برنامه خود سفارشی کنید.
با نحوه استفاده از این ویجت ها برای ارائه عملکردهای پیشرفته در نوار برنامه خود آشنا شوید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Add the app bar\n\nTry the Compose way \nJetpack Compose is the recommended UI toolkit for Android. Learn how to add components in Compose. \n[App Bar →](/develop/ui/compose/components/app-bars) \n\nThe *app bar* , also known as the *action bar*, is one of the most important design\nelements in your app's activities, because it provides a visual structure and interactive elements\nthat are familiar to users. Using the app bar makes your app consistent with other Android apps,\nletting users quickly understand how to operate your app and have a great experience.\n| **Note:** With the release of Android 9.0 (API level 28), there is a version of the Support Library called [AndroidX](/jetpack/androidx) that is part of [Jetpack](/jetpack). The AndroidX library contains the existing Support Library and includes Jetpack components. \n|\n| You can continue to use the Support Library. Historical artifacts---those versioned 27 and earlier, and packaged as `android.support.*`---remain available on Google Maven. However, all newer library development occurs in the AndroidX library. \n|\n| We recommend using the AndroidX libraries in all new projects. Consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX as well.\n\nThe key functions of the app bar are as follows:\n\n- Dedicated space for giving your app an identity and indicating the user's location in the app.\n- Predictable access to important actions, such as search.\n- Support for navigation and view switching, using tabs or menus.\n\n**Figure 1.** The app bar from the Google Sheets app.\n\nThis documentation section describes how to use the AndroidX\n[Toolbar](/reference/androidx/appcompat/widget/Toolbar) widget as an\napp bar. There are other ways to implement an app bar---for example, some themes set up an\n[ActionBar](/reference/android/app/ActionBar) as an app bar by\ndefault---but using the AppCompat `Toolbar` makes it easier to set up an app bar that\nworks on the widest range of devices. It also gives you room to customize your app bar later in your\napp's development.\n\nTopics\n------\n\n\n**[Set up the app bar](/develop/ui/views/components/appbar/setting-up)**\n:\n Learn how to add a `Toolbar` widget to your activity and set it as the activity's\n app bar.\n\n\n**[Add and handle actions](/develop/ui/views/components/appbar/actions)**\n:\n Learn how to add actions to the app bar and its overflow menu, and how to respond when users\n choose those actions.\n\n\n**[Add an Up action](/develop/ui/views/components/appbar/up-action)**\n:\n Learn how to add an *Up* button to your app bar so users can navigate back to the app's\n home screen.\n\n\n**[Use action views and action providers](/develop/ui/views/components/appbar/action-views)**\n:\n Learn how to use these widgets to provide advanced functionality in your app bar."]]