KotlinLeaner
08/07/2022, 5:25 PMKotlinLeaner
08/07/2022, 10:49 PMMehdi Haghgoo
08/08/2022, 3:26 AMRoudy Korkis Kanaan
08/08/2022, 4:21 AMLazyLayout
, I'm working on a lazy tiles based maps in Compose and using LazyLayout
to lazily load the tiles as I scroll in both X and Y directions. The logic works well and I'm able to get the performance that I like. The only thing missing is prefetching/ pre-composing and measuring the out of bounds items. Looking at the LazyList
implementation, it uses a modifier implementing ModifierLocalProvider<BeyondBoundsLayout?>, BeyondBoundsLayout
, I am trying to do the same and applied to modifier to my LazyLayout
but the layout
function inside that implementation is never called. I know this is experimental, but any ideas on how to get the beyond bounds modifier to work ?allan.conda
08/08/2022, 7:54 AMdrawBehind
to optimize animated background, is there an equivalent for animating alpha?Luka
08/08/2022, 8:13 AMZoltan Demant
08/08/2022, 9:28 AMharry248
08/08/2022, 9:29 AMSlackbot
08/08/2022, 10:56 AMK Merle
08/08/2022, 1:59 PMExposedDropdownMenu
UI freezes for me if there are to many items.orangy
08/08/2022, 2:20 PMTextLayoutResult
, kinda like getOffsetForPosition
but returning null, if there is no text at coordinates? E.g. if text is wrapped and second line is shorter, I would like to know if coordinates are over real text, or over blank part here ->Zac Sweers
08/08/2022, 5:05 PM#AndroidDevChallenge
ever aggregated anywhere for future learning? I’m having a hard time trying to actually find all the cool projects people madeDaniel Okanin
08/08/2022, 6:05 PMHarold Scissors
08/08/2022, 7:39 PMWebView.evaluateJavaScript()
from Compose, when using UiModels from a ViewModel? The assumption being that the WebView
is wrapped in an AndroidView
CLOVIS
08/08/2022, 7:39 PMAbstract Composable functions cannot have parameters with default values
will be fixed?
Googling for it only returns one tweet with no answer…Colton Idle
08/08/2022, 8:51 PMIconButton
, with an Icon
inside, but the icon is dark and so the dark touch ripple is kind of hard to see. Is there any way to inverse that somehow so the touch ripple brightens up the inner Icon
?KotlinLeaner
08/08/2022, 9:12 PMviewmodel
global in the activity?Asad Mukhtar
08/09/2022, 6:42 AMTower Guidev2
08/09/2022, 8:28 AMandroidx.compose.material3.ExposedDropdownMenuBox
to implement an Autosuggest drop down listLukasz Kalnik
08/09/2022, 9:57 AMSwitch
colors in my theme?Lukasz Kalnik
08/09/2022, 9:58 AMcolors
to my theme colors? Sounds not optimal.Zoltan Demant
08/09/2022, 10:18 AM@Immutable
, but is implemented as a value class that wraps a domain class (without @Immutable
), does compose still consider it immutable? Code example in thread 🧵K Merle
08/09/2022, 12:59 PMLukasz Kalnik
08/09/2022, 1:03 PMvar thresholdProgress: Float by rememberSaveable(uiState.thresholdProgress) {
mutableStateOf(uiState.thresholdProgress)
}
Slider(
value = thresholdProgress,
onValueChange = {
thresholdProgress = it
viewModel.onThresholdProgressChanged(it)
},
)
fun onThresholdProgressChanged(progress: Float) {
val progressStep = (progress * 100).roundToInt()
val lux = if (progressStep <= 50) {
progressStep
} else {
50 + (progressStep - 50) * 5
}
_uiState.update { it.copy(lux = lux) }
}
uiState.lux
is used for continuously updating the lux number in the UI as user drags the slider.dimsuz
08/09/2022, 1:21 PMBox(modifier = Modifier.draggable()) {
Button(modifier = Modifier.clickable())
}
If I start the drag inside the button, clickable() completely intercepts it, but I want it to behave like this: if drag touch slop is passed, then clickable() should be ignored and drag should be started.
Is there a way to configure this?Landry Norris
08/09/2022, 2:59 PM+17,613 −188,973
. Same functionality. Looks like Compose could help us get this repo to a much more manageable size.Billy Newman
08/09/2022, 5:11 PMLokik Soni
08/09/2022, 5:11 PMclass RingtonePlayer @Inject constructor(
@ApplicationContext private val _context: Context,
audioManager: AudioManager
): RingtonePlayerAdapter(audioManager) {
}
AN
08/09/2022, 8:36 PMjava.lang.IllegalArgumentException: Wrong argument type for 'userId' in argument bundle. integer expected.
code:
object ProfileDestination : GenericDestination {
override val route = "profile_route/{userId}"
override val startDestination = "profile_destination/{userId}"
const val argsUserId = "userId"
operator fun invoke(id: Int) = "profile_route/$id"
}
fun NavGraphBuilder.profileGraph() {
navigation(startDestination = ProfileDestination.startDestination, ProfileDestination.route) {
composable(
route = ProfileDestination.startDestination,
arguments = listOf(navArgument(ProfileDestination.argsUserId) {
type = NavType.StringType
})
) { Profile() }
}
}
navController.navigate(ProfileDestination(1))
Mohan manu
08/10/2022, 6:58 AMMohan manu
08/10/2022, 6:58 AMFilip Wiesner
08/10/2022, 7:27 AMColton Idle
08/10/2022, 7:00 PM