Questions tagged [android-jetpack-compose]

Jetpack Compose is Android’s modern toolkit for building native declarative UI made by Google. If you're targeting desktop with Compose for Desktop, use both this and [compose-desktop] tags.

10142 questions
5
votes
0 answers

Is it possible to change color of elevation of widget in jetpack compose?

I've dig into the classes of Card widget, can't find the parameter controlling the color of the elevation. Any suggestion?
ming chen
  • 550
  • 4
  • 13
5
votes
2 answers

How to make a LazyRow of elements that occupy each the whole screen width?

The following doesn't work. When I scroll, the width of the first panel fluctuates. compose version = 1.0.0-beta01 @Composable fun Carousel() { val panels = listOf(Pair("cat", Color.Blue), Pair("dog", Color.Cyan), Pair("snake", Color.Green)) …
nociceptus
  • 71
  • 1
  • 6
5
votes
2 answers

Is it possible to not trigger ripple effect on scroll?

Actual Result: Ripple effect triggered on scroll (Video) Expected Result: Ripple effect is only triggered on click just like in Android Views Code: class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { …
Kefas
  • 61
  • 1
  • 5
5
votes
2 answers

"Cannot find a parameter with this name: items" for Basic Jetpack Compose Codelab

In Jetpack Compose Basic Codelab Animation Section (using Jetpack Compose Beta…
Elye
  • 53,639
  • 54
  • 212
  • 474
5
votes
3 answers

classes.jar' already contains entry 'META-INF/module_name_debug.kotlin_module', cannot overwrite

In project i am using kotlin dsl, jetpack compose, com.android.tools.build:gradle:7.0.0-alpha08, many modules and i am continuously getting this error. Zip file…
Kochchy
  • 591
  • 1
  • 6
  • 17
5
votes
2 answers

My composable view doesn't recompose itself even though state changes

I am trying to develop sample chat app with jetpack compose and struggling with states. I have lazyColumn which contains messages. My problem is when user clicks the button, my "ChatList" function doesn't recompose eventhough my list gets update. It…
5
votes
1 answer

Why kotlin.collections is not implicitly imported after upgrading to jetpack compose 1.0.0-beta01?

After upgrading to jetpack compose 1.0.0-beta01, I tried to use arrayListOf, listOf from kotlin.collections but they seemed to not implicitly imported.
5
votes
1 answer

Is there a way to perform Matrix Scale for Jetpack Compose Image?

In XML based image, we can have matrix scale type as per https://medium.com/mobile-app-development-publication/android-matrix-scaletype-explained-4501f0796be8, which is a very powerful custom scale type one can perform on an Image. However, in…
Elye
  • 53,639
  • 54
  • 212
  • 474
5
votes
2 answers

Should I use ConstraintLayout in Android Jetpack Compose for a better performance?

Before Jetpack Compose ConstraintLayout was the recommended way of building complex layouts since it allows to flatten UI hierarchies. See Manage complexity: layouts matter documentation section. The most common case in which layout takes an…
5
votes
1 answer

Draw Text within DrawScope - Jetpack Compose Desktop

I want to draw Text inside a canvas to display a label for a chart. On Android, I can use the library: https://github.com/tehras/charts (For Compose: 1-alpha03) but on Desktop I can't. Thus I tried to rewrite the broken parts. But I can't get the…
2jan222
  • 1,732
  • 2
  • 16
  • 29
5
votes
1 answer

Is there any way to convert drawable to ImageVector?

I mean ways other than using vectorResource(id = ...) (this confuses me with constant calls to context, resources, and other things). I ask this because i see that we can make TextStyles, Shapes, Colors and Strings without smthngResource using. As…
Gohryt
  • 353
  • 1
  • 4
  • 10
5
votes
4 answers

jetpack compose: @Preview is unresolved after updating to alpha08

I updated compose libraries from alpha07 to alpha08 version = "1.0.0-alpha08" androidx.compose.ui:ui:$version androidx.ui:ui-tooling:$version But after that androidx.ui.tooling.preview.Preview is unresoved
Mahdi-Malv
  • 16,677
  • 10
  • 70
  • 117
5
votes
2 answers

Scaffold with TopAppBar integration with Navigation

How to show navigation icon (BackArrow or Menu) in TopAppBar using Scaffold based on actual position in NavController? I am using Navigating with Compose 1.0.0-alpha02. Below is a sample code with a description of how it should work @Composable fun…
iknow
  • 8,358
  • 12
  • 41
  • 68
5
votes
1 answer

Jetpack compose update list element

I am currently trying to write an App for my thesis and currently, I am looking into different approaches. Since I really like Flutter and the Thesis requires me to use Java/Kotlin I would like to use Jetpack compose. Currently, I am stuck trying to…
5
votes
1 answer

Android Jetpack compose: Using google map got crash on map create

I trying to implement google map with help of google compose sample project calls Crane in here: https://github.com/android/compose-samples/tree/main/Crane I went with same implementation and using MapViewUtils to implement lifeCycler for map and…
Mahdi
  • 6,139
  • 9
  • 57
  • 109
1 2 3
99
100