https://kotlinlang.org
Join Slack
How can I make a `Row` wrap its content, but have a max width of half its parent?
j

Jason Ankers

over 4 years ago
How can I make a
Row
wrap its content, but have a max width of half its parent?
j
y
  • 2
  • 1
  • 1736
I know Decompose and Voyager, but they seem like heavy libraries to me. I need only simple navigati...
k

Kensuke Sano

about 2 years ago
I know Decompose and Voyager, but they seem like heavy libraries to me. I need only simple navigation and official library.
🧵 1
k
a
+4
  • 6
  • 8
  • 1726
[SOLVED] Anyone else experiencing `unresolved reference` problems in Android Studio or Intellij for ...
i

iamsteveholmes

about 3 years ago
[SOLVED] Anyone else experiencing
unresolved reference
problems in Android Studio or Intellij for Kotlin 1.6.20? I filed a seemingly related issue months ago that was never resolved and it appears to be happening by default in 1.6.20. https://youtrack.jetbrains.com/issue/KT-48148 EDIT: This appears to have been an issue with my settings. I had to install a new intellij without importing settings. I’m working with support to pinpoint the issue.
i
r
a
  • 3
  • 6
  • 1726
How to use `@ Value` annotation in spring with Kotlin?
m

Manoj

over 3 years ago
How to use
@ Value
annotation in spring with Kotlin?
m
s
  • 2
  • 17
  • 1726
Hey guys, any idea how to set environment variables (.env) in a Kotlin JS node project? I've tried a...
c

Chukwukammadu Anizoba

over 3 years ago
Hey guys, any idea how to set environment variables (.env) in a Kotlin JS node project? I've tried adding a .env file at the root of the project, but the server code is not picking up the variables from
process.env
. Cheers!
c
a
  • 2
  • 7
  • 1721
Hey, I am using `NavigationBarItem` with Material 3 in jetpack compose project. I don’t want to have...
a

Adeel Malik

over 2 years ago
Hey, I am using
NavigationBarItem
with Material 3 in jetpack compose project. I don’t want to have this box-like effect when nav item is selected. What is this called and how do i go about removing it? šŸ™
a
s
+3
  • 5
  • 8
  • 1708
I get stuck on `com.zaxxer.hikari.HikariDataSource: HikariPool-1 - Starting...` every single time I...
m

Mikhail

almost 3 years ago
I get stuck on
com.zaxxer.hikari.HikariDataSource: HikariPool-1 - Starting...
every single time I run my application. Using Spring Boot and Docker Compose on Arch Linux. What I've tried: • Rebooting • Checking the connection string • Checking database availability • Checking my docker compose configuration • Downgrading the kernel then rebooting • Upgrading the kernel then rebooting • Cleaning up docker (containers, images, volumes ....) then rebooting • Restarting docker Also, I use Spring Boot 2.7.1, PostgreSQL 15beta2-bullseye, Docker 20.10.17 and Docker Compose 2.6.1
😶 1
m
i
  • 2
  • 7
  • 1705
Hello, I’m trying to use Micrometer Tracing in Spring Boot 3.0 with Kotlin, but I think it’s not wor...
p

Pedro Sousa

over 2 years ago
Hello, I’m trying to use Micrometer Tracing in Spring Boot 3.0 with Kotlin, but I think it’s not working the way I expected. From what I read, I thought that tracing information stored in coroutines contexts would flow through the different Threads of execution. But it looks like that once the thread changes, trace information is lost. I’ve created this simple controller to test this:
@RestController
class TestController(val tracer: Tracer) {
    private val logger: Logger = LoggerFactory.getLogger(this::class.java)

    @GetMapping("/test")
    suspend fun test() {
        <http://logger.info|logger.info>("before: ${tracer.currentTraceContext().context()?.traceId()}")
        delay(50)
        <http://logger.info|logger.info>("after: ${tracer.currentTraceContext().context()?.traceId()}")
    }
}
The second log statement reports a null value for the traceId, because the Kotlin
delay
function caused a thread switch and the trace informations is lost, Can anyone help here? Why is this happening? Is it by design? Is there something I can do to guarantee that the traceId is always present?
p
r
  • 2
  • 1
  • 1700
Is there an Android-provided way to convert a Spanned string into an AnnotatedString? Alternatively,...
b

Ben Powell

over 2 years ago
Is there an Android-provided way to convert a Spanned string into an AnnotatedString? Alternatively, can I read a string resource as an AnnotatedString? I say ā€œAndroid-providedā€ because while there are plenty of homegrown converters out there, and even a partial SpanStyle converter in the Compose source code, I’d prefer a complete and maintained solution.
b
e
a
  • 3
  • 3
  • 1695
I have a problem with window insets (being always 0). Nothing works, neither `WindowInsets.navigatio...
s

Simon Hardt

over 2 years ago
I have a problem with window insets (being always 0). Nothing works, neither
WindowInsets.navigationBars.getBottom(LocalDensity.current)
nor the
navigationBarsPadding()
-modifier. This occurs when I have composable inside a
ComposeView
which itself is inside an
AndroidView
. Maybe this double injection screws up the insets? This is used as a way to show a
Fragment
inside an
Activity
which only uses
ComponentActivity.setContent()
to get into compose and everything else is handled inside compose only (e.g. navigating to different screens and some of those are simple composables but some are legacy fragments)
s
s
+3
  • 5
  • 6
  • 1690
Previous121314Next

kotlinlang

A modern programming language that makes developers happier.

Powered by