https://kotlinlang.org
Join Slack
So I log to my `KSPLogger` but the text doesn't show up in my `./gradlew build` output. How do I ch...
s

Stephan Schroeder

over 4 years ago
So I log to my
KSPLogger
but the text doesn't show up in my
./gradlew build
output. How do I change that? Or alternatively, where does the output show up?
s
j
  • 2
  • 4
  • 340
How to use TextWatcher - methods - ```override fun afterTextChanged(editable: Editable?)``` in a Tex...
s

sen kumar

almost 5 years ago
How to use TextWatcher - methods -
override fun afterTextChanged(editable: Editable?)
in a TextField component in Compose?
s
d
  • 2
  • 12
  • 340
How do I test the `init block`? the sample: ```class Foo() { init { loadData() } ...
s

Simon Lin

almost 5 years ago
How do I test the
init block
? the sample:
class Foo() {
    init {
        loadData()
    }

    private fun loadData() {
        repository.getData()
    }
}
And this is what I done. Is it correct?
class FooTest {

    private val foo by lazy { Foo() }

    @Test
    fun `test foo init block`() {

        foo // access foo to create an instance by Lazy 

        coVerify(exactly = 1) { repository.getData() }
    }
}
s
t
+2
  • 4
  • 3
  • 340
Open sourced a single `@Composable` function for CMP I needed a common way to access the window con...
a

Alex Styl

7 months ago
Open sourced a single
@Composable
function for CMP I needed a common way to access the window container size but it is not yet available on Android, so here is
currentWindowContainerSize
until it
LocalWindowInfo.current.containerSize
reaches common:
@Composable
fun App() {
    val containerSize = currentWindowContainerSize()

    if (containerSize.width >= 480.dp) {
        TabletLayout()
    } else {
        PhoneLayout()
    }
}
https://github.com/alexstyl/cmp-windowContainerSize
a
m
+3
  • 5
  • 26
  • 339
BasicText now has a `ColorProducer` parameter; I think I get the gist of it, but are there any usage...
z

Zoltan Demant

over 2 years ago
BasicText now has a
ColorProducer
parameter; I think I get the gist of it, but are there any usage examples out there for a curious mind?
z
b
+2
  • 4
  • 4
  • 339
Hey there! - Using Flows from KMM in Swift is possible thanks to <https://github.com/rickclephas/KMP...
m

Marc Reichelt

almost 3 years ago
Hey there! • Using Flows from KMM in Swift is possible thanks to https://github.com/rickclephas/KMP-NativeCoroutines ✅ • But: how can we pass Swift publishers (AnyPublisher<Boolean>) to KMM as Flows?
m
r
  • 2
  • 9
  • 339
Does anyone have an impression about why `.animateContentSize()` works when expanding content, but n...
a

Ahaisting

about 3 years ago
Does anyone have an impression about why
.animateContentSize()
works when expanding content, but not when contracting/shrinking it? details and example in thread 🧵👇
👍 1
a
c
d
  • 3
  • 7
  • 339
I remember kmm used to have some restrictions having default arguments and swift/objective-c. Is it ...
a

Anton Afanasev

over 3 years ago
I remember kmm used to have some restrictions having default arguments and swift/objective-c. Is it still a case? Recently I tried that out and it seem that kotlin native compiler does respsect function with default argument. So this:
fun sendMessage(text: String, customAttributes: Map<String, String> = emptyMap())
translated to this:
func sendMessage(text: String, customAttributes: [String : String] = [:])
Am I seeing write? kotlin 1.6.10
a
k
r
  • 3
  • 8
  • 339
Why can't I record an Espresso test? The error message says: "Espresso Testing Framework does not su...
k

kevindmoore

over 3 years ago
Why can't I record an Espresso test? The error message says: "Espresso Testing Framework does not support Compose projects". I don't have a Compose project
k
v
  • 2
  • 2
  • 339
Hi. Trying to upgrade `Timber` to `5.0.1` and get this error: ```No matching variant of com.jakewha...
d

dimsuz

over 4 years ago
Hi. Trying to upgrade
Timber
to
5.0.1
and get this error:
No matching variant of com.jakewharton.timber:timber:5.0.1 was found. The consumer was configured to find an API of a library compatible with Java 11, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
          - Variant 'releaseApiPublication' capability com.jakewharton.timber:timber:5.0.1 declares an API of a library, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
Indeed, it's being declared as a dependency in a kotlin-plugin module (no android), but the thing is that timber
4.x
was
aar
too. I'm curious what has changed?
d
e
j
  • 3
  • 7
  • 339
Previous204205206Next

kotlinlang

A modern programming language that makes developers happier.

Powered by