
Expands a floating action button to support multiple operations, enhancing user interaction through customizable icons and actions for different tasks. Includes demo app and multi-platform testing capabilities.
A floating button which expands to support multiple operations in Jetpack Compose.
implementation("io.github.agent-polyblank:extendedfab:1.0.0")// ...
import io.github.agentpolyblank.extendefab.ui.ExtendedFab
import io.github.agentpolyblank.extendefab.ui.ExtendedFabItem
//...
val isExpanded = remember { mutableStateOf(false) }
ExtendedFab(
isExpanded = isExpanded,
icon = {
Icon(
imageVector = Icons.Default.Settings,
contentDescription = null,
modifier = Modifier.size(50.dp).rotate(rotation)
)
},
) {
ExtendedFabItem(
icon = {
Icon(
imageVector = Icons.Default.Add,
contentDescription = null
)
},
onClick = {
// Handle click
}
)
ExtendedFabItem(
icon = {
Icon(
imageVector = Icons.Default.ShoppingCart,
contentDescription = null
)
},
onClick = {
// Handle click
}
)
}You can find the demo app in the app module.
local.properties file to the project root and set a path to Android SDK thereTo build the application bundle:
./gradlew :sample:composeApp:assembleDebug
.apk file in sample/build/outputs/apk/debug/sample-debug.apk
Run android UI tests on the connected device: ./gradlew :sample:composeApp:connectedDebugAndroidTest
Run the desktop application: ./gradlew :sample:composeApp:run
Run desktop UI tests: ./gradlew :sample:composeApp:jvmTest
To run the application on iPhone device/simulator:
iosApp/iosApp.xcproject in Xcode and run standard configuration./gradlew :sample:composeApp:iosSimulatorArm64Test
Run the browser application: ./gradlew :sample:composeApp:wasmJsBrowserDevelopmentRun --continue
Run browser UI tests: ./gradlew :sample:composeApp:wasmJsBrowserTest
A floating button which expands to support multiple operations in Jetpack Compose.
implementation("io.github.agent-polyblank:extendedfab:1.0.0")// ...
import io.github.agentpolyblank.extendefab.ui.ExtendedFab
import io.github.agentpolyblank.extendefab.ui.ExtendedFabItem
//...
val isExpanded = remember { mutableStateOf(false) }
ExtendedFab(
isExpanded = isExpanded,
icon = {
Icon(
imageVector = Icons.Default.Settings,
contentDescription = null,
modifier = Modifier.size(50.dp).rotate(rotation)
)
},
) {
ExtendedFabItem(
icon = {
Icon(
imageVector = Icons.Default.Add,
contentDescription = null
)
},
onClick = {
// Handle click
}
)
ExtendedFabItem(
icon = {
Icon(
imageVector = Icons.Default.ShoppingCart,
contentDescription = null
)
},
onClick = {
// Handle click
}
)
}You can find the demo app in the app module.
local.properties file to the project root and set a path to Android SDK thereTo build the application bundle:
./gradlew :sample:composeApp:assembleDebug
.apk file in sample/build/outputs/apk/debug/sample-debug.apk
Run android UI tests on the connected device: ./gradlew :sample:composeApp:connectedDebugAndroidTest
Run the desktop application: ./gradlew :sample:composeApp:run
Run desktop UI tests: ./gradlew :sample:composeApp:jvmTest
To run the application on iPhone device/simulator:
iosApp/iosApp.xcproject in Xcode and run standard configuration./gradlew :sample:composeApp:iosSimulatorArm64Test
Run the browser application: ./gradlew :sample:composeApp:wasmJsBrowserDevelopmentRun --continue
Run browser UI tests: ./gradlew :sample:composeApp:wasmJsBrowserTest