Skip to content

Instantly share code, notes, and snippets.

View FannyDemey's full-sized avatar

DEMEY Fanny FannyDemey

  • Android senior developer
  • Lille
View GitHub Profile
@Composable
private fun PodcastsList(
podcasts: List<Podcast>,
onFavouriteClicked: (id: String) -> Unit,
onPodcastClick: (id: String) -> Unit,
modifier: Modifier = Modifier,
) {
Box {
LazyColumn(
modifier = modifier,
class BrowseViewModel : ViewModel() {
private val _products: MutableStateFlow<List<Product>> = MutableStateFlow(emptyList())
val products: StateFlow<List<Product>> = _products.asStateFlow()
init {
viewModelScope.launch {
delay(1000)
_products.value = FakeDataSource.ALL_PRODUCTS
}
}
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.techethic.sandbox.ae.model.FakeDataSource
import com.techethic.sandbox.ae.model.Product
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.launch
data class Product(
val id: String,
val productName: String,
val productPrice: Float,
val imageUrl: String,
val maxQuantity: Int,
val quantity: Int = 0,
)
object FakeDataSource {
val ALL_PRODUCTS = listOf<Product>(
Product(
id = "3",
productName = "Tarte au citron meuringué",
productPrice = 3.15f,
imageUrl = "https://firebasestorage.googleapis.com/v0/b/training-compose.appspot.com/o/tarte-citron.jpeg?alt=media&token=2fb45a95-d589-4519-bb43-f95f1791f6da",
maxQuantity = 4,
),
Product(
@FannyDemey
FannyDemey / CustomLocalAccessibilityManagerDemo.kt
Created July 12, 2023 13:26
CustomLocalAccessibilityManager
import android.content.Context
import android.os.Build
import androidx.annotation.DoNotInline
import androidx.annotation.RequiresApi
import androidx.compose.ui.platform.AccessibilityManager
class AndroidAccessibilityManager(context: Context) : AccessibilityManager {
private companion object {
const val FlagContentIcons = 1
const val FlagContentText = 2

Formation : Développement d'application mobile accessible

Description

Le but de cette formation Accessibilité mobile est d'apprendre à développer des applications mobiles natives accessibles. Les applications mobiles sont aujourd'hui au cœur de nos interactions. Mais sommes-nous certains que nos développements soient utilisables par tout le monde ? Pour tous les cas d'usage ? Et dans tous les environnements possibles ?

Description

Le but de cette formation Accessibilité mobile est de vous apprendre à développer des applications mobile native accessibles.

Les applications mobile sont aujourd'hui au cœur de nos interactions. Mais sommes-nous certains que nos développements soient utilisables par tout le monde ? Pour tous les cas d'usage ? Et dans tous les environnements possibles ?

import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.height
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun Password(
password: MutableState<String>,
modifier: Modifier = Modifier
) {
val keyboardController = LocalSoftwareKeyboardController.current
var isValid by remember {
mutableStateOf(false)
}

Features that were first designed for accessibility, but ended to be used massively by everyone, with or without disability

Tech

  • Video caption

invented for deaf people. Used massively on social network to share video content that can be watched by anyone when you cannot turn on the sound of your device.

  • First mechanic writing device that has been commercialize.