Category "kotlin"

How to run a command line command with Kotlin DSL in Gradle 6.1.1?

I am trying to run the code block below, after reading multiple posts on the topic and the Gradle manual. I run the below and get the following error: execComma

How can I make an accompanist navigation BottomSheet fully expanded?

I know that a normal bottom sheet can be setup like this rememberModalBottomSheetState( initialValue = ModalBottomSheetValue.Hidden, confirmStateChange = {

Feign QueryMap usage with POJO

I've found in FEIGN-README that I can do stuff like: interface MarketDataRestClient { @RequestLine("GET /api/v1/depth") fun getOrderBook(@QueryMap orde

ERROR Task :expo:compileDebugKotlin FAILED

I created an application using react-native init and was working fine until I tried to start using expo to test it on my telephone. Trying to start the app with

How can I use an API to implement a search functionality on Android?

I am attempting to create a search functionality in an android application and have been doing research on how I can accomplish this while taking in data from a

Azure pipeline fails on building Kotlin Multiplatform shared framework usinig embedAndSignAppleFrameworkForXcode and fastlane

I'm working on a Kotlin Multiplatform project which is building fine locally but I can't get it to work on an Azure DevOps pipeline. Some good things to know: n

How to call private functions of a class from outside the class in Kotlin

I want to call a private functions of class SomeClass from outside of this class: class SomeClass { private fun somePrivateFunction() { //... }

Cannot deploy the ktor server

What kind of problem is that? Does anybody face this? Or anyone knows the solution? I was trying to deploy ktor server using PostgreSQL. Exception in thread "ma

Why isn't @DisplayName working for me in JUnit 5?

For some reason, I'm really having a hard time getting display names to actually be respected in JUnit 5 with Kotlin. Here's a test file I created for the purp

Round Double to 1 decimal place kotlin: from 0.044999 to 0.1

I have a Double variable that is 0.0449999 and I would like to round it to 1 decimal place 0.1 . I am using Kotlin but the Java solution is also helpful. val

How to set the google in-app comment optional?

The in-app dialog is working fine on my device but it's has required comment. the submit button will not be enable if the user does not have inputted a comment.

The AsyncTask API is deprecated in Android 11. What are the alternatives?

Google is deprecating Android AsyncTask API in Android 11 and suggesting to use java.util.concurrent instead. you can check out the commit here * * @deprecate

How to run the Gradle kotlin-dsl plugin in an offline environment?

Because of reasons, the machine I'm developing on, is not connected to the internet. I have a local copy of all dependencies for the app and the build script. I

I'm getting a "Error inflating class com.google.android.material.navigation.NavigationView"

I have looked at other posts to this problem and I can't seem to solve it, so I'm hoping that its just a case that I am missing something obvious. Here is my c

How do I use Java's bitwise operators in Kotlin?

Java has binary-or | and binary-and & operators: int a = 5 | 10; int b = 5 & 10; They do not seem to work in Kotlin: val a = 5 | 10; val b = 5 &

How to send parameters for get request using retrofit and kotlin Coroutines.?

I was following the tutorial from https://proandroiddev.com/suspend-what-youre-doing-retrofit-has-now-coroutines-support-c65bd09ba067. I am having difficulty t

MockK "io.mockk.MockKException: no answer found for:" error

Hi i am trying to mock the response i get from a Single observable that gets returned from retrofit using a delegator that my presenter class calls and i am get

How to show most used item in first place in RecyclerView in Android?

I have made the application of different tools which have more than 60 tools I want that the user most used item showed in first place in RecyclerView. Please h

how to make full screen activity with status bar on top of it while scrollbar is not scrolling full in Activity when it focus on editText?

Issue is that when I enter text in EditText then ScrollView does not work and does not scroll in my activity fun statusBarColor(activity: Activity) {

how to make full screen activity with status bar on top of it while scrollbar is not scrolling full in Activity when it focus on editText?

Issue is that when I enter text in EditText then ScrollView does not work and does not scroll in my activity fun statusBarColor(activity: Activity) {