kotlin's questions - English 1answer

0 kotlin questions.

Here is my code class BookmarkViewModel(app: Application) : AndroidViewModel(app) { private val dao = BookmarkDb.get(app).bookmarkDao() companion object { private const val ...

When I add the core-ktx dependency to my app's build.gradle file, my gradle builds fail with the error message AAPT2 error: check logs for details It furthermore tells that there are two attributes ...

I am using kotlin language to develop android app and now i'm stuck with a problem.Is it possible to load one fragment from another fragment in Kotlin. if then how?? This is my recyclerview adapter I ...

I have a Java interface: public interface NonHindiQurary { void onNonHindiQueryReceived(String Query); } I want to implement it on Kotlin class: class MainActivity : AppCompatActivity() {...} ...

What is the difference between these two annotations ? org.jetbrains.annotations.NonNull android.support.annotation.NonNull Is the kotlin compiler IntelliJ going to honor android.support.annotation....

I'm trying to add two extension function to Calendar Class in Android to convert specific date pattern to Calendar and vise versa fun Calendar.fromIsoString(date: String): Calendar = this.apply { ...

Here is my error I'm using spring boot 2.0.2.relese in the IntelliJ idea I search everywhere but I can not find the solution java.lang.IllegalStateException: Error processing condition on org....

I have created two states in corda. Now I want to compare the fields of these two states and create a third state based on the comparison. Is it possible? If possible how to do it? Is there any ideal ...

I wonder what is the best way to handle such scenario class Person(var name:String? = null, var age:Int? = null){ fun test(){ if(name != null && age != null) doSth(...

I have to convert a string to a double on Android, using Kotlin. The following is supposed to work in Kotlin, but does not (no such method): var dbl = "1.0".toDouble() The following Javaish way ...

My controller is this: @PostMapping("/car/{id}/book", consumes = [MediaType.APPLICATION_FORM_URLENCODED_VALUE]) fun orderProcess(model: Model, @PathVariable id: Int, ...

I need to access this internal storage folder: /data/data/com.ceriosrey.chattrbox/app_imageDir This is how i saved into it: val cw = ContextWrapper(context) val directory = cw.getDir("...

Having problems starting application with Spring Boot 2 and applied kotlin-jpa plugin. But works fine with Spring Boot 1.5.9. java version - 1.8 kotlin version - 1.2.41 spring boot version - 2.0.1....

Let me get straight to the point here the error in the logcat is: Could not complete scheduled request to refresh entries. ClientErrorCode: 3 I have tested the Realm() part of the code and it ...

I have a class that I use as my data model for a RecyclerViewin order to pass object of this class from one activity to another via Intent I had to make it Parcelable The problem is now that I am ...

I have view for my weather data with compound keys of the format [ "District", "2018", "05", "23", "06", "00", "00" ] On the server i can query weather for a day using a startkey and endkey ...

How to replace many parts of a string with something else in Kotlin using .replace() For example, we can do it only by replacing one word fun main(args: Array<String>) { var w_text = "...

I have tabLayout with ViewPager, but when I select a tab, previously selected tab text color will stay in selected color also. So I ended up with two tabs in selected state. As you can see I made ...

I wanted to try new Navigation library. After following this guideline I experienced error at runtime: Caused by: android.view.InflateException: Binary XML file line #11: Binary XML file line #11: ...

I'm having problems showing a DialogFragment with Android in Kotlin. This is what I got so far: The TimePickerFragment.kt package de.flokol120.UniversalSleepTimer import android.app.Dialog import ...

class MyViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { fun bindata(text: SingleText){ itemView.title.text = text.title itemView.desc.text = text.desc ...

In Kotlin, we have a choice between: class|object X { [override] val y = Z } and class|object X { [override] val y: Y get() = Z } Which one should be chosen and when?

How to apply runtime button style in android kotlin? My Style (themes.xml): <?xml version="1.0" encoding="utf-8"?> <resources> <style name="WhiteButtonLightTheme" parent="...

After downloaded and installed latest Kotlin plugin I have Outdated Kotlin Runtime warning from Android Studio that telling me: Your version of Kotlin runtime in 'kotlin-stdlib-1.1.2' library is ...

How to use Kotlin Android Extensions with Fragments? If I use them inside onCreateView(), I get this NullPointerException exception: Caused by: java.lang.NullPointerException: Attempt to invoke ...

I have multiple account set up in my Google drive account1@gmail.com account2@gmail.com and I want to open the google drive with account2@gmail.com through intent. I'm able to open the Google Drive ...

Hi kotlin users and mainteners, Since I have updated Intellij IDEA to the latest patch for 2016 version, I am experiencing this issue while trying to compile my android project.. java.lang....

I'm learning android and kotlin, and I'm building a practice app. When I run my code the button isn't working and i don't know why or what I'm doing wrong/forgot to add. Any help is appreciated! My ...

I was trying to set the visibility of a view in android using ButterKnife with Kotlin I got the id in butterknife like: @BindView(R.id.progress) lateinit var progress: ProgressBar The visibility ...

Is there any way to check whether a function passed through another function's parameter is getting called? For example, override fun updateWeight(value: Editable, ...

Koltin 1.2.30 I am working with generic and lambda functions. The following works without the generic types fun onScanExt(): (Int, Int) -> Int = { num1, num2 -> num1 + num2 num1 + ...

I am getting the following error while building the project. haven't used CoordinatorLayout in this project. just added as a dependency in build.gradle : I am using Android Studio 3.2 Canary 4. ...

I have two activities Activity A and Activity B inside of the same application and they need to be able to call methods on each other. A needs to communicate to B at the start (possibly see "code" ...

I am currently writing a program, which batch processes different images. So I thought that it might be clever to do the operation (Scaling / adding watermark) in parallel. The problem is I get the ...

I am working with this code. fun main(args : Array<String>){ val someArray : Array<Int> = arrayOf(3,53,2,521,51,23,512,34,124); println("Original array is ") someArray.forEach {print("...

Hot questions

Language

Popular Tags