https://kotlinlang.org
Join Slack
When kapt complains, that it can't find a `tools.jar` (which is correct, because I'm not using Java ...
h

hho

almost 4 years ago
When kapt complains, that it can't find a
tools.jar
(which is correct, because I'm not using Java 8 anymore) – what doesn't work then? Any way to suppress that warning (I'm using Maven)?
h
a
m
  • 3
  • 7
  • 1158
EDIT: I solved this I’m writing a test for a class handling a 3rd party analytics library. The class...
p

Peter Farlow

about 3 years ago
EDIT: I solved this I’m writing a test for a class handling a 3rd party analytics library. The class under test needs to handler an
Analytics
object, but unfortunately
mockk<Analytics>()
cannot create a mock because of a static android Handler in that class:
public class Analytics { // this is 3rd party code I can't change

  static final Handler HANDLER =
      new Handler(Looper.getMainLooper()) {
        @Override
        public void handleMessage(Message msg) {
          throw new AssertionError("Unknown handler message received: " + msg.what);
        }
      };
// rest of class here
}
I tried using both
mockk<Analytics>()
and adding
mockkConstructor(Handler::class)
but that didn’t work. Any suggestions?
p
m
  • 2
  • 8
  • 1157
Hi there, is there a way to convert Bitmap into ImageBitmap ? I would like to use the Image composab...
m

MaxUt

about 4 years ago
Hi there, is there a way to convert Bitmap into ImageBitmap ? I would like to use the Image composable to display images that are stored locally. My idea was to use
BitmapFactory.decodeFile(MY_FILE_PATH)
to convert the images into Bitmap first and then from Bitmap to ImageBitmap
m
n
+3
  • 5
  • 15
  • 1157
Are there plans from JetBrains for a multiplatform crypto library? Iirc it was one of the most upvot...
b

benkuly

about 3 years ago
Are there plans from JetBrains for a multiplatform crypto library? Iirc it was one of the most upvoted features here in slack, when someone from JetBrains asked for missing features.
👍 1
➕ 1
b
o
z
  • 3
  • 10
  • 1151
Will Apple let KMM succeed? Effectively, Multiplatform Compose and KMM will make iOS Developers, XCo...
i

Igor Bozin

over 2 years ago
Will Apple let KMM succeed? Effectively, Multiplatform Compose and KMM will make iOS Developers, XCode or Swift obsolete. So, what is in it for them? And what guarantees the Kotlin Multiplatform approach will be possible to be used for development in 2-3 years?
i
c
+8
  • 10
  • 108
  • 1150
How to make one item in LazyVerticalGrid fill all the parent width ? Scenario: LazyVerticalGrid wit...
a

Akram Bensalem

almost 3 years ago
How to make one item in LazyVerticalGrid fill all the parent width ? Scenario: LazyVerticalGrid with diffrent Lists every list should have it own header How I can implement the header to take all the width ?
a
o
c
  • 3
  • 4
  • 1147
How can I avoid recomposition of certain areas of a screen? In my example I use an AndroidView (to s...
t

Tobias Gronbach

about 3 years ago
How can I avoid recomposition of certain areas of a screen? In my example I use an AndroidView (to show diagrams) and also I display some Dialogs depending on the ScreenState. Everytime a dialog is shown or hidden the AndroidView gets recomposed. How can I avoid it? Is it possible to scope recomposition only to specific states?
t
m
r
  • 3
  • 35
  • 1147
How to get AndroidView factory to run again on recompose? I have a composable helper we use to creat...
a

Andy Himberger

about 3 years ago
How to get AndroidView factory to run again on recompose? I have a composable helper we use to create some of our legacy views, and even on recompose or changing the factory function instance, the factory doesn't create a new item -- this is the one workaround I've found that works but looking for a proper way to do it -- (component is an enum value passed into the function, I have tried different factory function implementations)
ReusableContent(component) {
    AndroidView(factory = {
        createView(it, component)
    }, Modifier.fillMaxSize(), { })
}
I tried some other things like recomposer.invalidate when the component changed, creating different factory function instances that differed slightly, but that didn't change anything... I was really expecting when the args to AndroidView changed, it would create a new view underneath and clean up the old one. Maybe I'm missing something
a
a
+2
  • 4
  • 11
  • 1143
I am trying to make multi module project(kotlin) with gradle, i am not getting any reference on inte...
i

iamkdblue

about 4 years ago
I am trying to make multi module project(kotlin) with gradle, i am not getting any reference on internet , could you guys help with this?
i
a
  • 2
  • 9
  • 1143
How does OkHttp compare to Ktor Client? Seems they land on similar use cases? Why might I prefer one...
z

zak.taccardi

over 5 years ago
How does OkHttp compare to Ktor Client? Seems they land on similar use cases? Why might I prefer one over the other?
z
f
c
  • 3
  • 6
  • 1143
Previous252627Next

kotlinlang

A modern programming language that makes developers happier.

Powered by