نمونه اندروید 7.1
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نمونه کد زیر برای اندروید 7.1 (API 25) ارائه شده است. برای دانلود نمونه ها در اندروید استودیو، گزینه منوی File > New > Import Sample را انتخاب کنید.
توجه: این پروژه های قابل دانلود برای استفاده با Gradle و Android Studio طراحی شده اند.
نمونه میانبرهای برنامه
این نمونه نحوه استفاده از میانبرهای برنامه API معرفی شده در Android 7.1 (سطح API 25) را نشان می دهد. این API به یک برنامه اجازه میدهد مجموعهای از اهداف را تعریف کند که وقتی کاربر روی نماد راهانداز برنامه برای مدت طولانی فشار میدهد، نمایش داده میشوند. مثال هایی برای ثبت لینک ها به صورت ایستا در XML و همچنین به صورت پویا در زمان اجرا ارائه شده است.
نمونه میانبرهای برنامه
نمونه برنامه صفحه کلید تصویری
این نمونه نحوه پیاده سازی Commit Content API را با استفاده از کتابخانه پشتیبانی اندروید نشان می دهد. این API یک راه جهانی برای IME ها فراهم می کند تا تصاویر و سایر محتوای غنی را مستقیماً به یک ویرایشگر متن در یک برنامه ارسال کنند و به کاربران این امکان را می دهد تا با استفاده از ایموجی های سفارشی، برچسب ها یا سایر محتوای غنی ارائه شده توسط برنامه های دیگر، محتوا بنویسند.
نمونه برنامه صفحه کلید تصویری
نمونه IME صفحه کلید تصویر
این نمونه نحوه نوشتن یک صفحه کلید تصویر سفارشی را با استفاده از Commit Content API و کتابخانه پشتیبانی Android نشان می دهد. این صفحه کلید در داخل برنامه های سازگار (همچنین با استفاده از Commit Content API) نمایش داده می شود و به کاربران امکان می دهد شکلک ها، برچسب ها یا سایر محتوای غنی را در ویرایشگرهای متن وارد کنند.
نمونه IME صفحه کلید تصویر
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و 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,["# Android 7.1 Samples\n\nThe following code samples are provided for Android 7.1 (API 25). To\ndownload the samples in Android Studio, select the **File \\\u003e New \\\u003e Import Sample** menu\noption.\n\n\n**Note:** These downloadable projects are designed\nfor use with Gradle and Android Studio.\n\n### App shortcuts sample\n\n\nThis sample demonstrates how to use the [app shortcuts API](/guide/topics/ui/shortcuts)\nintroduced in Android 7.1 (API level 25). This API allows an application to define a set of\nintents which are displayed when a user long-presses on the app's launcher icon. Examples are\ngiven for registering links both statically in XML, as well as dynamically at runtime.\n\n\n[App shortcuts sample](https://github.com/android/user-interface-samples/tree/main/AppShortcuts)\n\n### Image keyboard app sample\n\n\nThis sample demonstrates how to implement the [Commit Content API](/reference/android/view/inputmethod/InputConnection#commitContent(android.view.inputmethod.InputContentInfo,%20int,%20android.os.Bundle)), using the [Android Support Library](/topic/libraries/support-library).\nThis API provides a universal way for IMEs to send images and other rich\ncontent directly to a text editor in an app, allowing users to compose\ncontent using custom emojis, stickers, or other rich content provided by\nother applications.\n\n\n[Image keyboard app sample](https://github.com/android/input-samples/tree/main/CommitContentSampleApp)\n\n### Image keyboard IME sample\n\n\nThis sample demonstrates how to write a [custom image keyboard](/preview/image-keyboard) using the [Commit Content API](/reference/android/view/inputmethod/InputConnection#commitContent(android.view.inputmethod.InputContentInfo,%20int,%20android.os.Bundle)) and the [Android Support Library](/topic/libraries/support-library).\nThis keyboard will be displayed inside compatible apps (also using the Commit\nContent API), allowing users to insert emojis, stickers, or other rich\ncontent into text editors.\n\n\n[Image keyboard IME sample](https://github.com/android/input-samples/tree/main/CommitContentSampleIME)"]]