This page describes all the library modules available on Maven Central. Code is available on Github.

https://github.com/LunabeeStudio/Lunabee_Compose_Android

LbcFoundation

implementation "studio.lunabee.compose:lbcfoundation:$LAST_VERSION"

This module provides Composable built on Foundation Compose library (not linked to Material)

You will find:

StyledTextItem(
    rawBaseText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
    rawBaseTextStyle = MaterialTheme.typography.body1.copy(textAlign = TextAlign.Center),
    textToHighLightList = setOf(
		    TextToHighlight(
            tag = "Unique tag for my highlighted text",
            text = "consectetur adipiscing elit",
            style = MaterialTheme.typography.body2.copy(
                fontWeight = FontWeight.Bold,
                textDecoration = TextDecoration.combine(listOf(TextDecoration.Underline, TextDecoration.LineThrough)),
            ).toSpanStyle()
		            .copy(
	                brush = Brush.linearGradient(...),
	                action = { ... },
	                ignoreCase = true,
		            )
						)
				)
		),
    modifier = Modifier, // optional
    softWrap = true, // optional
    overflow = TextOverflow.Clip, // optional
    maxLines = Int.MAX_VALUE, // optional
    onTextLayout = { }, // optional
)
@Composable
fun MyComposable() {
  val hapticFeedback: LbcHapticFeedback = rememberLbcHapticFeedback()
  Button(
	  onClick = { 
		  // your action
		  hapticFeedback.perform(
			  hapticEffect = LbcHapticEffect.Predefined.Tick,
			  // optional fallback if [hapticEffect] is not supported.
			  fallback = LbcHapticEffect.Compose.LongPress,
	  }
}

There is also helpers method:

<aside> ⚠️ To use perform, you need to add android.permission.VIBRATE permission.

</aside>

Enregistrement de l’écran 2022-08-01 à 13.54.09.mov

LbcAccessibility

implementation "studio.lunabee.compose:lbcaccessibility:$LAST_VERSION"

This module provides extensions for Modifier in order to make your application accessible.

You will find following methods and object:

For more detail about each parameters of above extension method, you can consult the JavaDoc directly.