Questions tagged [jetpack]

Jetpack is a WordPress plugin that enables self-hosted WordPress installs to connect to WordPress.com to get additional features, powered by its cloud infrastructure.

Jetpack is a WordPress plugin that enables self-hosted WordPress installs to connect to WordPress.com to get additional features, powered by its cloud infrastructure.

445 questions
0
votes
0 answers

How to Center Align vertically a TextField Content in Jetpack Compose?

I have a TextField but it's value can't be seen completely and almost Half of it's content goes below the Field. what should I add to this TextField? Here is the code: val text = remember { mutableStateOf("") } …
0
votes
2 answers

How to show our Room Database Content in a LazyColumn in Jetpack Compose?

Until now it's almost 10 days that I'm searching and watching YouTube videos for my answer, but I can't find it. please help me if you can. Here Starts my MainActivity code: class MainActivity : ComponentActivity() { lateinit var appDB:…
0
votes
1 answer

How to build an adaptive layout in Jetpack Compose

So I am trying to Follow this documentation to achieve something similar to this documentation, this is where the CardTitle moves and image; but the Title and Description on this documentation do not seem to be available on Cards now? I can not…
Suraya
  • 63
  • 7
0
votes
1 answer

For Loop by Button onClick in Jetpack Compose?

How can we write a code that for example if user click a button, then 20 text or 20 of our function be created inside our Column below the Button? Because we can't write the for loop inside the button click, because we get the: @Composable…
0
votes
0 answers

Prevent automirror Jetpack compose

This is how I am using Icons in my app Icon( Icons.Filled.ArrowBackIos, contentDescription = "Arrow Back", modifier = Modifier.clickable { if (canGoBackward(week)) { onPreviousWeekClick() } …
Muhammad Ahmed AbuTalib
  • 4,080
  • 4
  • 36
  • 59
0
votes
1 answer

Paging data is refreshing on navigation in jetpack compose

I'm getting some data from my database like this Pager(PagingConfig(pageSize = PAGE_SIZE)) { songRepo.getSongs() }.flow.cachedIn(viewModelScope) and I collect it in the UI using collectAsLazyPagingItems(), but whenever I navigate to…
0
votes
1 answer

How to change the Default value of a variable after some time?

Is it possible in KOTLIN or by remember in Jetpack Compose to change the value of a variable after some seconds? For example, I have a variable var currentResult1 = remember { mutableStateOf(true) }. How can I say that after my activity opens, this…
0
votes
0 answers

partially migrate dynamic SharedPreference keys to datastore

I am trying to migrate from shared preference to jetpack datastore. While creating the datastore object we need to pass shared preference keys to migrate however if the keys are build based on usecases like dynamic strings and if we dont want to…
0
votes
0 answers

How to make instrumented test if I need to use @Composable?

I had an instrumented test that worked, however, then was added additional param to the object which required to call the @Composable function, so the entire test method should be marked as @Composable, so I added this annotation to the function,…
0
votes
0 answers

LiveData observer called every time, even with viewLifecycleOwner

I am using Jetpack navigation component. I have a list with pagination and with same list I am populating map markers. I am using live data with view model. I am observing with viewLifecycleOwner. As per jetpack navigation component, fragment will…
Ziaullah
  • 65
  • 2
  • 6
0
votes
1 answer

Jetpack Compose: fillMaxWidth() for Icon in jetpack Compose doesn't work

I want to try to enlarge the icon inside the box to be filling the parent width, which normally can be approached with fillMaxWidth, but the Icon didn't react, only the boundary/the imaginary boundary of the icon enlarged to the parent…
0
votes
0 answers

using stats_get_csv for jetpack views

I'm using the below code to get my stats for the month of August, but it's only returning 500 results. I set days to -1 which is unlimited and the limit is 2000, why is it only printing 500?
Geoff_S
  • 4,917
  • 7
  • 43
  • 133
0
votes
1 answer

How can I select only ONE checkbox (jetpack compose/kotlin)?

I have a list of options and each of them has a checkbox. I want the user to be able to select only one. Chechkbox: @Composable fun CheckboxResource(isSelected: Boolean): Painter { return if (isSelected) { painterResource(id =…
0
votes
1 answer

List items are not refreshing when room data change

I have a lazy-column with a pager to show items using paging-compose 1 alpha 16 (latest). I have some issues around. 1-> Every time an item is off the screen and back again it comes with a leak on the view like it was loading the entire data. 2->…
0
votes
2 answers

How to draw a multicolored bar with Canvas in Jetpack Compose?

How to attain a UI like this in Compose? Suppose there is a list of slices: data class Slice(val value: Float, val color: Color) Group-1 is 14.6, Red Group-2 is 61.8, Blue Group-3 is 23.6, Green Total 100.0 Canvas is not necessary anyhow.