kotlin tag

71 questions


2 answers
77 views
0
Cotlin Intent, a transformation question.

e: C:\Users\yhw\AndroidStudioProjects\MyApplication3\app\src\main\java\com\example\myapplication\ResultActivity.kt: (13, 61): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable ...

2 years ago

1 answers
77 views
0
[Cotlin] After creating an empty array, it is not possible to add a value to the array each time the int value is exceeded.

Hello, teachers. I'm asking you a question because there's something difficult about Cotlin.What I want to do is enter a value in one activity and click the buttonIt is added to the list view of other...

2 years ago

1 answers
89 views
0
[Kotlin] I'd like to ask you a question about accessing child instance properties of the parent instance type.

to study inheritance at Cotlin I'm asking you this question because there is a confusing part of the child instance property approach in the parent instanceopen class Animal(val size:Int)class Spider(...

2 years ago

1 answers
130 views
0
I wonder if return is used among the phrases that return the Cotlin value.

Hello, I'm a beginner who just started studying programming.I'm currently studying Cotlin with the goal of developing an app. (I'm studying with Kang's Kotlin programming book.)As I studied, I think r...

2 years ago

1 answers
91 views
0
[Kotlin] I don't know what T.() means in the apply function

fun <T> test(block: (T) -> Unit) {}fun <T> test(block: T.() -> Unit) {}I'm studying libraries like apply() and also() in Cotlin But I don't understand T.() here.The first one makes s...

2 years ago

1 answers
101 views
0
[kotlin] I'd like to ask you a question about the type mismatch of non-null type return

fun getTitle(): String = titleData.joinToString( / )title = bpCV?.Error if getTitle().toString() // 1 toString is missingbpCV?.apply { title = getTitle() } // 2title = run { bpCV?.getTitle()} // 3 err...

2 years ago

1 answers
84 views
0
[Cotlin] I'd like to ask you about the expansion function of the Cotlin standard library (also, let, with, apply, etc.)ㅛ

inline fun <T, R> T.run(block: T.() -> R): R { return this.block()}The book says that the run extension function is defined in this way.The explanation of this is as followsThe block paramete...

2 years ago

1 answers
126 views
0
[Kotlin] Let me ask you a question about the coroutine suspension function.

I'm studying coroutine, but I have a question because I don't understand it well.Does the 1.suspend function stop the coroutine at the called place?suspend fun exampleSuspend() { val job1 = Coroutine...

2 years ago

1 answers
80 views
0
This is an Android location information question.

I'm making an application about getting Android location informationI'm trying to put in the background location information, and from the latest version of Android 11 and above,Unless the user allowe...

2 years ago

1 answers
88 views
0
Cotlin keep stopping error java.lang.ArrayIndexOutOfBoundsException: length=2; index=2

I get this error when I run the app, but I don't know what the problem is.E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.sharing, PID: 16912 java.lang.ArrayIndexOutOfBoundsException: len...

2 years ago
« - 7 - »

© 2024 OneMinuteCode. All rights reserved.