Questions tagged as 'kotlin'

2
answers

Extract numerical value of a string with kotlin

How to extract the value from a string until you find a number, for example: val cadena = "512ASND" I want to get the value "512" of that string!     
asked by 03.09.2018 / 19:34
2
answers

Different types of data in the same Array?

It is possible to have more than one type of data in an arrayOf, a ListOf or an arrayListOf Or is it not possible to have Int and String data, for example, in the same Array?     
asked by 14.10.2018 / 07:05
1
answer

How to declare a constructor without arguments?

I'm trying to get all the documents from firebase and convert them directly into an object but I jump with the following error:    java.lang.RuntimeException: Could not deserialize object. Class com.chdzma.changeproject.objects.Food does not...
asked by 20.05.2018 / 22:27
1
answer

How can I change the visibility of an xml object in ViewModel?

I have a question about how the visibility of an object in the ViewModel will change. I expose my case: I have a login interface that has two Edittext and two buttons, a button and an Edittext are invisible by default, and I want to press the...
asked by 20.04.2018 / 14:34
1
answer

Records in .txt file [duplicated]

I'm trying to save some words contained in a variable text in a .txt file by clicking on a button . The drawback is that you should be saving a sequence of what you put in the variable text , but only save what you put it in the last exe...
asked by 13.03.2018 / 16:22
2
answers

Error using Kotlin Android Extensions

I'm using these extensions and everything works great, but I've noticed that sometimes does not perform the bind correctly, in modules such as Adapters, ViewHolders and this time in a DialogFragment. This exception is throwing me: java.lang.Nu...
asked by 08.10.2017 / 20:24
0
answers

Parcelable executes twice the init block on android with kotlin

I have a custom class that I am sending from an activity to a tabbed activity (fragments) using parcelable . In the init block of my custom class I execute a function to transform one of the values that arrive to the constructor when I...
asked by 16.10.2018 / 02:39
1
answer

Truth Tables (Kotlin)

It's like this for the first time here, I'm learning to use the programming language Kotlin, I have to develop a Boolean formula with true or false, I already do it in Java and it stayed like this private static final boolean VALUES[] = ne...
asked by 01.09.2018 / 21:28
1
answer

When adding banner the RecyclerView does not add a new position

Placing a banner in the recyclerView does not generate a new position for that element (banner) but instead "mounts" it or places it in the position of the elements practically eliminating the element that is in that position. I'm using kotli...
asked by 02.10.2018 / 22:49
1
answer

I can not upload my app to the playstore console

I tried to upload my latest version of my app, but I get an error in the playstore This is after updating compileSdkVersion to Android-P and bringing Android support dependencies 28.0.0-alpha1 I get this exactly in the playstore T...
asked by 08.06.2018 / 03:09