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
1
vote
0 answers

focus on a specific item in a list jetpack compose

I have a lazy vertical grid, and the items are focusable, when the item is clicked it navigates to another screen, when the user presses the back button and comes back to the screen with lazy vertical grid, i want the item that was focused to get…
DevineDecrypter
  • 151
  • 1
  • 16
1
vote
1 answer

Draw icons according to Id

I have two classes: Item and CardMore, here they are respectively: data class Item( val id: Int, val name: String, val icon: Int, val color: androidx.compose.ui.graphics.Color) data class CardMore( val id: Int, val name: String, val icon: Int, val…
Artorius
  • 53
  • 5
1
vote
1 answer

Android Jetpack Compose opening DefaultPreview

When I debug my Jetpack Compose app in Android Studio, it always tries to open DefaultPreview of the app. I want to launch MainActivity, which inherits from ComponentActivity. If I close the app and relaunch it solely on my phone, MainActivity is…
geesebump
  • 31
  • 4
1
vote
0 answers

How take a Screenshot in Floating Window Mode with MediaProjection API?

I'm trying to take a screenshot after I minimize my App and enter Floating Window Mode (like Facebook Messenger) so when I click on the minimized icon, I can take a screenshot. I found some relevant samples on screen capture:…
1
vote
0 answers

DropDown Menu reopens when its already open

this is my code @Composable fun MyComponent() { val items = listOf("Option 1", "Option 2", "Option 3") var selectedIndex by remember { mutableStateOf(0) } var expanded by remember { mutableStateOf(false) } Column { …
abasirwani
  • 31
  • 5
1
vote
0 answers

Jetpack compose AndroidView coming over the top bar

I'm using jetpack compose with kotlin. When I use an AndroidView its coming over the top bar as you see on the SS. What is the reason of this?
1
vote
1 answer

How to remove default vertical Paddings of Text Composable in Android Jetpack Compose?

There are vertical paddings of Text Composable as you can see below To remove vertical paddings of Text, I tried to modify my code, but not working. Text( text = "2", fontSize =…
Steve
  • 23
  • 5
1
vote
3 answers

TextField unable to change color Jetpack Compose

I don't know what happened even though I copy exactly the code from Android Developer Team official Youtube. The textfield turns red BUT when I remove color = Color.black in SearchBarcomposable, everything works fine. Help me class MainActivity :…
1
vote
1 answer

Google sign in + navigation with jetpack compose

I am trying to shift from java+xml style android development to kotlin jetpack compose. I am trying to figure out how to move all my google sign in logic from the main activity to a new LoginScreen composable, this process seems very taxing since…
1
vote
0 answers

Jetpack compose BottomsheetScaffold BottomSheetValue.Expanded default value pops at the top of the screen

I want to use When the user arrives on the page, the bottomsheet pops at the top of the screen before beeing dragged down to the bottom of the screen (where it is supposed to be) Here is a code that reproduces the issue : …
1
vote
1 answer

Jetpack Compose - Cant wrap content textField

I am doing some things with Compose and i encountered this problem I cant understand WHY my textfield width is to the end of the parent. I want to wrap the content dependening on the input lenght. I painted the background red on purpouse. I cant…
Ciro González
  • 357
  • 1
  • 4
  • 14
1
vote
1 answer

ViewModel has no zero Argument constructor. Have AndroidEntryPoint

Hey all I am having problems figuring out hilt with android. Ive googled around and I can't find this specific problem. I seem to getting a "View Model has no zero argument constructor". I saw on another post that it was for a missing…
1
vote
0 answers

duplicate item in room database when switch between bottom navigation and click back press button in android

In the create customer screen when I click Insert button and back to the Main(customer) screen every things ok but when I click on the another icon on the bottom navigation and then click back press to the Main(customer) screen the item was insert…
1
vote
0 answers

How to make round corners of docked fab in jetpack compose?

I want to make a rounded mid corners with docked fab , How can I achieve this ?
1
vote
0 answers

Prevent other composables in a box to be focusable and clickable, Jetpack Compose

When placing 2 or more composables in a Box() in jetpack compose, even if they overlap, they can be focused and clicked through each other, is there a way to prevent this behavior? Box( modifier = Modifier.fillMaxSize() ) { …