https://kotlinlang.org
Join Slack
Doing some canvas drawing and I need a vector image. Docs show how to use an image but it doesn't se...
c

Colton Idle

over 2 years ago
Doing some canvas drawing and I need a vector image. Docs show how to use an image but it doesn't seem to work with vector drawables. Is there some simple api I'm missing here? https://developer.android.com/jetpack/compose/graphics/draw/overview#draw-image
c
e
m
  • 3
  • 32
  • 574
Hello, can moshi be used with kmm?
n

nikhil kumar

over 3 years ago
Hello, can moshi be used with kmm?
n
s
m
  • 3
  • 3
  • 574
Hi, is there a way to replace headers in ktor? I initialize client as below ``` HttpClient(OkHttp) ...
s

Sudhanshu Singh

over 2 years ago
Hi, is there a way to replace headers in ktor? I initialize client as below
HttpClient(OkHttp) {
            engine {
                preconfigured = okHttpClient
            }
            defaultRequest {
                url("<http://host.com|host.com>")

                // this adds content-type = application/json to all requests
                contentType(ContentType.Application.Json)
            }
now in one of the request i want to change the
content-type
as
application/xml
client.get("endpoint"){

      // doing this adds two content-type json and xml
      headers.append("content-type", "application/xml") 

      // this also adds two typos
      headers["content-type"] = acceptHeader
}
s
s
r
  • 3
  • 16
  • 573
I need to make an api call (suspend function since I use retrofit) in my FirebaseMessagingService. W...
c

Colton Idle

over 3 years ago
I need to make an api call (suspend function since I use retrofit) in my FirebaseMessagingService. What's the proper way to make a suspend call in an Android service? Does this comment still hold true in 2022? https://stackoverflow.com/a/63407811
c
f
+2
  • 4
  • 21
  • 573
Does anyone know of what jetbrains compose gradle plugin actually does? I'd like to use jetbrains co...
c

Colton Idle

almost 2 years ago
Does anyone know of what jetbrains compose gradle plugin actually does? I'd like to use jetbrains compose instead of jetpack compose in my android project (mostly so that it's easier to sync compose versions across my other modules which will actually need to be jetbrains compose). But im having issues converting my android app module to use jetbrains compose.
c
s
e
  • 3
  • 27
  • 572
has anyone noticed issues with `jvmTarget` when attempting to upgrade to `1.20.0`? when I upgrade th...
d

dix

over 3 years ago
has anyone noticed issues with
jvmTarget
when attempting to upgrade to
1.20.0
? when I upgrade the version, now all my detekt tasks fail with
Invalid value passed to --jvm-target
I've tried adding
tasks.withType(Detekt).configureEach {
    jvmTarget = "1.8"
}
and that fails with
Could not get unknown property 'Detekt'
d
e
  • 2
  • 6
  • 572
Have any attempts at putting a ComposeView inside an ArrayAdapter been made?
m

maxgdn

almost 4 years ago
Have any attempts at putting a ComposeView inside an ArrayAdapter been made?
m
a
  • 2
  • 12
  • 572
I have a `StateFlow` that I'm collecting from swift. It works with a class that inherits from `Kotli...
a

adjpd

almost 4 years ago
I have a
StateFlow
that I'm collecting from swift. It works with a class that inherits from
Kotlinx_coroutines_coreFlowCollector
. But it's rather ugly. Is there are more concise way? Code in 🧵
a
h
j
  • 3
  • 5
  • 572
Is it possible to use room database with Compose Desktop? My gradle is not able to download the depe...
h

Humphrey

about 4 years ago
Is it possible to use room database with Compose Desktop? My gradle is not able to download the dependencies from maven.google.com. (2.3.0)
h
b
+4
  • 6
  • 8
  • 572
I have an enum class that I'm trying to mock using mockito. All I'm doing is `val category = mock(Ca...
s

Susheel

about 4 years ago
I have an enum class that I'm trying to mock using mockito. All I'm doing is
val category = mock(Category::class.java)
where Category is the enum. And when I run the test I'm seeing a
NoClassDefFoundError
I already added the mock-maker-inline file but any thoughts on what I'm doing wrong here?
s
d
t
  • 3
  • 4
  • 572
Previous107108109Next

kotlinlang

A modern programming language that makes developers happier.

Powered by