সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
কীওয়ার্ড: AiAssisted, পণ্য: JetpackCompose
বোতামগুলি হল মৌলিক উপাদান যা ব্যবহারকারীকে একটি সংজ্ঞায়িত ক্রিয়া ট্রিগার করতে দেয়। পাঁচ ধরনের বোতাম রয়েছে। এই টেবিলটি পাঁচটি বোতাম প্রকারের প্রতিটির উপস্থিতি বর্ণনা করে, সেইসাথে আপনার সেগুলি কোথায় ব্যবহার করা উচিত:
টাইপ
চেহারা
উদ্দেশ্য
ভরা
বিপরীত পাঠ্য সহ কঠিন পটভূমি।
উচ্চ জোর বোতাম. এগুলি একটি অ্যাপ্লিকেশনের প্রাথমিক ক্রিয়াগুলির জন্য, যেমন "জমা দিন" এবং "সংরক্ষণ করুন।" শ্যাডো ইফেক্ট বাটনের গুরুত্ব তুলে ধরে।
ভরা টোনাল
পৃষ্ঠের সাথে মেলে পটভূমির রঙ পরিবর্তিত হয়।
এছাড়াও প্রাথমিক বা উল্লেখযোগ্য কর্মের জন্য। ভরা টোনাল বোতামগুলি আরও চাক্ষুষ ওজন এবং স্যুট ফাংশন প্রদান করে যেমন "কার্টে যোগ করুন" এবং "সাইন ইন করুন।"
উন্নীত
ছায়া পেয়ে দাঁড়িয়েছে।
টোনাল বোতামের অনুরূপ উদ্দেশ্য পরিবেশন করে। বোতামটিকে আরও স্পষ্টভাবে দেখানোর জন্য উচ্চতা বাড়ান।
রূপরেখা
কোন ফিল ছাড়া একটি সীমানা বৈশিষ্ট্য.
মাঝারি-জোরা বোতাম, যেখানে গুরুত্বপূর্ণ কিন্তু প্রাথমিক নয় এমন ক্রিয়া রয়েছে। "বাতিল" বা "ব্যাক" এর মত বিকল্প, সেকেন্ডারি ক্রিয়াগুলি নির্দেশ করতে তারা অন্যান্য বোতামগুলির সাথে ভালভাবে জোড়া দেয়।
পাঠ্য
কোনো ব্যাকগ্রাউন্ড বা সীমানা ছাড়াই পাঠ্য প্রদর্শন করে।
কম-জোর দেওয়া বোতাম, নেভিগেশনাল লিঙ্কের মতো কম গুরুত্বপূর্ণ অ্যাকশন বা "আরো জানুন" বা "বিশদ দেখুন" এর মতো সেকেন্ডারি ফাংশনের জন্য আদর্শ।
এই চিত্রটি ম্যাটেরিয়াল ডিজাইনে পাঁচ ধরনের বোতাম প্রদর্শন করে:
চিত্র 1. পাঁচটি বোতাম উপাদান।
API পৃষ্ঠ
onClick
ব্যবহারকারী বোতাম টিপলে সিস্টেমটি যে ফাংশনটি কল করে।
enabled
false হলে, এই প্যারামিটারটি বোতামটিকে অনুপলব্ধ এবং নিষ্ক্রিয় দেখায়।
colors
ButtonColors এর একটি উদাহরণ যা বোতামে ব্যবহৃত রং নির্ধারণ করে।
contentPadding
বোতামের মধ্যে প্যাডিং।
ভরা বোতাম
ভরা বোতাম উপাদান মৌলিক Button কম্পোজেবল ব্যবহার করে। এটি ডিফল্টরূপে একটি কঠিন রঙ দিয়ে ভরা হয়। স্নিপেট দেখায় কিভাবে উপাদান বাস্তবায়ন করতে হয়:
এলিভেটেড বোতাম কম্পোনেন্ট ElevatedButton বাটন কম্পোজেবল ব্যবহার করে। এটির একটি ছায়া রয়েছে যা ডিফল্টরূপে উচ্চতার প্রভাবকে উপস্থাপন করে। এটি একটি ভরাট বোতাম যা একটি ছায়া অন্তর্ভুক্ত করে।
টেক্সট বোতাম কম্পোনেন্ট TextButton কম্পোজেবল ব্যবহার করে। এটি চাপা না হওয়া পর্যন্ত শুধুমাত্র পাঠ্য হিসাবে প্রদর্শিত হবে। এটি ডিফল্টরূপে একটি কঠিন পূরণ বা রূপরেখা নেই।
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-28 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-08-28 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["keywords: AiAssisted, product:JetpackCompose\n\nButtons are fundamental components that allow the user to trigger a defined\naction. There are five types of buttons. This table describes the\nappearance of each of the five button types, as well as where you should use\nthem:\n\n| Type | Appearance | Purpose |\n|--------------|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Filled | Solid background with contrasting text. | High-emphasis buttons. These are for primary actions in an application, such as \"submit\" and \"save.\" The shadow effect highlights the button's importance. |\n| Filled tonal | Background color varies to match the surface. | Also for primary or significant actions. Filled tonal buttons provide more visual weight and suit functions such as \"add to cart\" and \"Sign in.\" |\n| Elevated | Stands out by having a shadow. | Serves a similar purpose to tonal buttons. Increase elevation to make the button appear even more prominently. |\n| Outlined | Features a border with no fill. | Medium-emphasis buttons, containing actions that are important but not primary. They pair well with other buttons to indicate alternative, secondary actions like \"Cancel\" or \"Back.\" |\n| Text | Displays text with no background or border. | Low-emphasis buttons, ideal for less critical actions such as navigational links, or secondary functions like \"Learn More\" or \"View details.\" |\n\nThis image demonstrates the five types of buttons in Material Design:\nFigure 1. The five button components.\n\nAPI surface\n\n`onClick`\n: The function that the system calls when the user presses the button.\n\n`enabled`\n: When `false`, this parameter makes the button appear unavailable and\n inactive.\n\n`colors`\n: An instance of `ButtonColors` that determines the colors used in the\n button.\n\n`contentPadding`\n: The padding within the button.\n\nFilled button\n\nThe filled button component uses the basic [`Button`](/reference/kotlin/androidx/compose/material3/package-summary?#Button(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.material3.ButtonColors,androidx.compose.material3.ButtonElevation,androidx.compose.foundation.BorderStroke,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)) composable. It is\nfilled with a solid color by default. The snippet shows how to implement the\ncomponent:\n\n\n```kotlin\n@Composable\nfun FilledButtonExample(onClick: () -\u003e Unit) {\n Button(onClick = { onClick() }) {\n Text(\"Filled\")\n }\n}https://github.com/android/snippets/blob/7a0ebbee11495f628cf9d574f6b6069c2867232a/compose/snippets/src/main/java/com/example/compose/snippets/components/Button.kt#L58-L63\n```\n\n\u003cbr /\u003e\n\n| **Note:** If you want to build a custom button, use the `Button` composable.\n\nThis implementation appears as shown:\nFigure 2. A filled button.\n\nFilled tonal button\n\nThe filled tonal button component uses the [`FilledTonalButton`](/reference/kotlin/androidx/compose/material3/package-summary#FilledTonalButton(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.material3.ButtonColors,androidx.compose.material3.ButtonElevation,androidx.compose.foundation.BorderStroke,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)) composable.\nIt is filled with a tonal color by default.\n\nThe snippet shows how to implement the component:\n\n\n```kotlin\n@Composable\nfun FilledTonalButtonExample(onClick: () -\u003e Unit) {\n FilledTonalButton(onClick = { onClick() }) {\n Text(\"Tonal\")\n }\n}https://github.com/android/snippets/blob/7a0ebbee11495f628cf9d574f6b6069c2867232a/compose/snippets/src/main/java/com/example/compose/snippets/components/Button.kt#L67-L72\n```\n\n\u003cbr /\u003e\n\nThis implementation appears as shown:\nFigure 3. A tonal button.\n\nOutlined button\n\nThe outlined button component uses the [`OutlinedButton`](/reference/kotlin/androidx/compose/material3/package-summary#OutlinedButton(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.material3.ButtonColors,androidx.compose.material3.ButtonElevation,androidx.compose.foundation.BorderStroke,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)) composable. It\nappears with an outline by default.\n\nThe snippet shows how to implement the component:\n\n\n```kotlin\n@Composable\nfun OutlinedButtonExample(onClick: () -\u003e Unit) {\n OutlinedButton(onClick = { onClick() }) {\n Text(\"Outlined\")\n }\n}https://github.com/android/snippets/blob/7a0ebbee11495f628cf9d574f6b6069c2867232a/compose/snippets/src/main/java/com/example/compose/snippets/components/Button.kt#L85-L90\n```\n\n\u003cbr /\u003e\n\nThis implementation appears as shown:\nFigure 4. An outlined button.\n\nElevated button\n\nThe elevated button component uses the [`ElevatedButton`](/reference/kotlin/androidx/compose/material3/package-summary#ElevatedButton(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.material3.ButtonColors,androidx.compose.material3.ButtonElevation,androidx.compose.foundation.BorderStroke,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)) composable. It has\na shadow that represents the elevation effect by default. It is a filled button\nthat includes a shadow.\n\nThe snippet shows how to implement the component:\n\n\n```kotlin\n@Composable\nfun ElevatedButtonExample(onClick: () -\u003e Unit) {\n ElevatedButton(onClick = { onClick() }) {\n Text(\"Elevated\")\n }\n}https://github.com/android/snippets/blob/7a0ebbee11495f628cf9d574f6b6069c2867232a/compose/snippets/src/main/java/com/example/compose/snippets/components/Button.kt#L76-L81\n```\n\n\u003cbr /\u003e\n\nThis implementation appears as shown:\nFigure 5. An elevated button.\n\nText button\n\nThe text button component uses the [`TextButton`](/reference/kotlin/androidx/compose/material3/package-summary#TextButton(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.material3.ButtonColors,androidx.compose.material3.ButtonElevation,androidx.compose.foundation.BorderStroke,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)) composable. It appears as\nonly text until pressed. It does not have a solid fill or outline by default.\n\nThe snippet shows how to implement the component:\n\n\n```kotlin\n@Composable\nfun TextButtonExample(onClick: () -\u003e Unit) {\n TextButton(\n onClick = { onClick() }\n ) {\n Text(\"Text Button\")\n }\n}https://github.com/android/snippets/blob/7a0ebbee11495f628cf9d574f6b6069c2867232a/compose/snippets/src/main/java/com/example/compose/snippets/components/Button.kt#L94-L101\n```\n\n\u003cbr /\u003e\n\nThis implementation appears as shown:\nFigure 6. A text button.\n\nAdditional resources\n\n- [Floating action button](/develop/ui/compose/components/fab)\n- [Material Design 3 Buttons overview](https://m3.material.io/components/buttons/overview)"]]