Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

All Button Types in Compose — Button, IconButton & Toggle Guide

All Button Types in Compose — Button, IconButton & Toggle Guide Jetpack Compose provides a comprehensive hierarchy of button components to handle different use cases. This guide covers every button type with usage patterns and best p…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




All Button Types in Compose — Button, IconButton & Toggle Guide



Jetpack Compose provides a comprehensive hierarchy of button components to handle different use cases. This guide covers every button type with usage patterns and best practices.






Button Hierarchy






































Component Use Case Style
Button Primary actions Solid background, white text
FilledTonalButton Secondary actions Tonal background
OutlinedButton Tertiary actions Border only
TextButton Low-emphasis actions Text only
ElevatedButton Prominent actions with elevation Elevated shadow





Basic Button Usage



\`kotlin

// Standard filled button

Button(

onClick = { /* action */ },

modifier = Modifier.padding(8.dp)

) {

Text("Click Me")

}



// Filled tonal button (secondary)

FilledTonalButton(onClick = { /* action */ }) {

Text("Secondary Action")

}



// Outlined button (tertiary)

OutlinedButton(onClick = { /* action */ }) {

Text("Tertiary Action")

}



// Text button (low emphasis)

TextButton(onClick = { /* action */ }) {

Text("Learn More")

}



// Elevated button (prominent with shadow)

ElevatedButton(onClick = { /* action */ }) {

Text("Important Action")

}

`\






Icon and Text Buttons



Combine icons with text for richer communication:



\`kotlin

// Button with leading icon

Button(onClick = { /* action */ }) {

Icon(

imageVector = Icons.Default.Send,

contentDescription = null,

modifier = Modifier.size(18.dp)

)

Spacer(modifier = Modifier.width(8.dp))

Text("Send")

}



// Button with trailing icon

Button(onClick = { /* action */ }) {

Text("Download")

Spacer(modifier = Modifier.width(8.dp))

Icon(

imageVector = Icons.Default.Download,

contentDescription = null,

modifier = Modifier.size(18.dp)

)

}

`\






Icon Buttons



For icon-only interactions:



\`kotlin

// Standard icon button

IconButton(onClick = { /* action */ }) {

Icon(Icons.Default.Favorite, contentDescription = "Like")

}



// Filled icon button

FilledIconButton(onClick = { /* action */ }) {

Icon(Icons.Default.Add, contentDescription = "Add")

}



// Outlined icon button

OutlinedIconButton(onClick = { /* action */ }) {

Icon(Icons.Default.Edit, contentDescription = "Edit")

}



// Filled tonal icon button

FilledTonalIconButton(onClick = { /* action */ }) {

Icon(Icons.Default.Share, contentDescription = "Share")

}

`\






Toggle Icon Buttons



For toggleable icon states:



\`kotlin

var isLiked by remember { mutableStateOf(false) }



FilledIconToggleButton(

checked = isLiked,

onCheckedChange = { isLiked = it }

) {

Icon(

imageVector = if (isLiked) Icons.Filled.Favorite else Icons.Outlined.Favorite,

contentDescription = "Toggle favorite"

)

}

`\






Loading Button Pattern



Display loading state with CircularProgressIndicator:



\`kotlin

var isLoading by remember { mutableStateOf(false) }



Button(

onClick = {

isLoading = true

// Perform async task

},

enabled = !isLoading,

modifier = Modifier.height(48.dp)

) {

if (isLoading) {

CircularProgressIndicator(

modifier = Modifier.size(20.dp),

color = MaterialTheme.colorScheme.onPrimary,

strokeWidth = 2.dp

)

Spacer(modifier = Modifier.width(8.dp))

}

Text(if (isLoading) "Loading..." else "Submit")

}

`\






Custom Styled Buttons



Customize colors, shapes, and effects:



\`kotlin

// Custom colors

Button(

onClick = { /* action */ },

colors = ButtonDefaults.buttonColors(

containerColor = Color(0xFF6200EE),

contentColor = Color.White,

disabledContainerColor = Color.Gray,

disabledContentColor = Color.DarkGray

)

) {

Text("Custom Colored")

}



// Custom shape and size

Button(

onClick = { /* action */ },

modifier = Modifier

.width(200.dp)

.height(56.dp),

shape = RoundedCornerShape(12.dp)

) {

Text("Custom Shape")

}



// Gradient button

Button(

onClick = { /* action */ },

modifier = Modifier

.background(

brush = Brush.linearGradient(

colors = listOf(Color(0xFF6200EE), Color(0xFF03DAC6))

)

)

.clip(RoundedCornerShape(8.dp))

) {

Text("Gradient Button")

}

`\






Button Groups



Organize related buttons horizontally or vertically:



\`kotlin

// Horizontal button group

Row(

modifier = Modifier

.fillMaxWidth()

.padding(16.dp),

horizontalArrangement = Arrangement.spacedBy(8.dp)

) {

Button(

onClick = { /* Cancel / },

modifier = Modifier.weight(1f),

colors = ButtonDefaults.outlinedButtonColors()

) {

Text("Cancel")

}

Button(

onClick = { /
Confirm */ },

modifier = Modifier.weight(1f)

) {

Text("Confirm")

}

}



// Vertical button group

Column(

modifier = Modifier

.fillMaxWidth()

.padding(16.dp),

verticalArrangement = Arrangement.spacedBy(8.dp)

) {

Button(

onClick = { /* action 1 / },

modifier = Modifier.fillMaxWidth()

) {

Text("Option 1")

}

Button(

onClick = { /
action 2 */ },

modifier = Modifier.fillMaxWidth()

) {

Text("Option 2")

}

}

`\






Key Takeaways





  • Button for primary actions


  • FilledTonalButton for secondary actions


  • OutlinedButton for tertiary or important selections


  • TextButton for low-emphasis options


  • ElevatedButton for prominence with shadow


  • IconButton variants for icon-only interactions


  • FilledIconToggleButton for stateful icon interactions

  • Always provide content descriptions for icons

  • Combine icon + text for clarity and accessibility



This comprehensive button system ensures consistency and accessibility across your Compose UI.



8 Android app templates: Gumroad

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Vulnerability Remediation & Verification
Syntax validiert (0 Fehler)
title: Detect Exploitation - All Button Types in Compose — Button, IconButton & Toggle Guide
id: 755d9e66-4dfe-419e-b4a1-05895763b741
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-27
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-27"
        description = "YARA Signature for "
    strings:
        $str = "All Button Types in Compose — " ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("All Button Types in Compose  Button Icon")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*All Button Types in Compose  Button Icon*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "All Button Types in Compose  Button Icon"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Analyse für identifizierte Bedrohung auf Basis von Live-CTI (ENISA EUVD): CVSS 0.0 · EPSS 0.0% · CISA KEV: nein. Handlungsableitung aus den verlinkten Hersteller-Quellen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten All Button Types in Compose — Button, IconButton & Toggle Guide

Thematisch verwandte Begriffe: Button, Types, Compose, IconButton · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-100739 | A vulnerability was detected in mathurvishal CloudClassroom-PHP-Project…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag