Questions tagged as 'kotlin'

2
answers

What's missing in this code? [closed]

fun main(args: Array<String>) { val minhaTarefa = Tarefa("Daniel", "Programação", 10, "30 de Setembro") minhaTarefa.entregar() } class TarefaDeCasa( var nomeDoAluno: String, var nomeDaMateria: String, var nota: In...
asked by 09.10.2017 / 20:28
2
answers

What tools should I use to create an android application

I'm starting in the mobile development that will be done in Java or Kotlin and my question is what tools can I use in both the design part and in the database what are the main technologies?     
asked by 11.05.2018 / 23:51
2
answers

Working with custom layout of an alertdialog

I created this layout so I could work with this alertdialog. I created it, because I have to save the states after the click and also, when I open the dialog, I can get the value that was previously marked. Search through preferences. But eve...
asked by 22.12.2017 / 13:29
1
answer

Signing a generic function in Kotlin

I was seeing the generics part and would like to know why fun <T> addToList(vararg arg : T): ArrayList<T> { and fun addToList(vararg arg : T): ArrayList<T> {     
asked by 17.12.2018 / 22:19
1
answer

How to filter to show only the required fields in a class using Gson

I'm using Gson to work with json, let's say it has this class class Track( @SerializedName("id") val id: Long, @SerializedName("name") val name: String, @SerializedName("modality") val modality: String, @SerializedName("paper")...
asked by 13.08.2018 / 23:07
1
answer

User authentication with H2 bank in Kotlin Spring Boot Application

Problem: Authenticate user using H2 database in Spring Security Context: The application is done using Spring, the user class is this @Entity data class Usuario( @NotEmpty var nome:String = "", @NotEmpty var...
asked by 14.05.2018 / 00:40
1
answer

Error Kotlin does not find bytecode for lambda function: "Failed to find byte code for java / util / function / BiConsumer"

When I try to run my app on my phone (the same thing happens in the emulator), the following error occurs: Error:FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformClassesWithInstantRunForDeb...
asked by 29.12.2017 / 13:41
1
answer

How to add Firebase data to a RecycleView and show on the Android screen with Kotlin?

How to bring this list from fire to the screen of cel? val store = Shop("Fique Linda", "Temos o melhor!", R.drawable.storefiquelinda) val dataBase = FirebaseDatabase.getInstance() val myRef = dataBase.getReference("mensagens") myRef.child("...
asked by 24.10.2017 / 12:30
1
answer

Kotlin - How to reproduce the effect of "lateinit" on a "var" of an interface?

I have an interface called UserManager which has a var of type User interface UserManager { var user:User /* ... */ } and a class named UserManagerImpl that implements UserManager class UserManagerI...
asked by 21.04.2016 / 00:32
3
answers

How to save in SQLite database SeekBar Android value

I am trying to register values in the database in Kotlin coming from SeekBar, DatePicker, Radio Group, I go by parts in my CadastroScrolling.kt I can play the age viewer // definindo SeekBar seekbarIdade = findViewById<SeekBar...
asked by 22.12.2018 / 20:13