kotlin tag

71 questions


1 answers
113 views
0
Unable to parse by gson with signed APK

environment:kotlin 1.2.51/gson 2.4/okhttp 3.10 retrofit 2.4Retrofit and okhttp retrieve json data from WebAPI and store it in data class in converter.In debug/release mode, it is successfully stored o...

2 years ago

1 answers
106 views
0
Get days of the week in detail in kotlin

We are looking for a way to get how many Wednesday of that month from the app side on kotlin.

2 years ago

1 answers
81 views
0
How android shares VMs with arguments in the constructor between Activity and Fragment

I want to handle sharedViewModel.The VM receives arguments in the constructor.How can I call this with viewModels or activityViewModels?class MyViewModel (vala:Int):ViewModel(){ class Factory construc...

2 years ago

1 answers
84 views
0
I want to get sensor values regularly in a certain period of time with kotlin.

I created an Android app using kotlin and wanted to get sensor information at regular intervals (10 second intervals), but I didn't know how to do it, so I tried to get sensorManager.registerListener(...

2 years ago

1 answers
75 views
0
Android Studio Kotlin Error Unsolved Reference

It was working properly until the middle, but suddenly I got an Unsolved Reference error.There are about 6 Activity files, but R in R.layout.hogehoge_activity of all files turns red and gives an error...

2 years ago

1 answers
71 views
0
I want to use the `kotlin.test` package in Kotlin, but it says `import kotlin.test.assertEquals`

I was writing Unittest in Kotlin tutorial, but it seems that import fails and I cannot execute it.How can I do this?The environmental and source codes are as follows:Kotlin:kotlinc-jvm1.3.11 (JRE 10.0...

2 years ago

1 answers
105 views
0
This is a question from Android Studio Kotlin. (intent)

I'm asking you this question because I couldn't concentrate in the process of creating and combining projects separately.The intent may not be the problem, but I checked with Log.d and found no other ...

2 years ago

1 answers
128 views
0
[Novice Wang] I want to change the background of the button selected under certain conditions

When selecting any one of the 29 buttons under the condition that n=1 is performed during multiple actions, If the background of the selected button is A, I would like to change it to B.for(i in 0..28...


1 answers
162 views
0
How can I display Recycler view in Fragment?

Hello~~ I'm a beginner who just started learning how to make an app..The app I'm planning is composed of several fragments in one MainActivity.I'm stuck in thinking of one of the Fragments, UserFragme...


1 answers
75 views
0
It's a Cotlin question.

class MainActivity : AppCompatActivity() {override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) but1.setOnClickListener(){ var...

2 years ago
« - 5 - »

© 2024 OneMinuteCode. All rights reserved.