Most voted "kotlin" questions
Kotlin is a statically typed programming language compatible with JVM and Javascript.
Learn more…234 questions
Sort by count of
-
-1
votes2
answers54
viewsImplement a Layout in Android Studio
I want to implement a layout like this in Android Studio, I searched already in Google, but I did not know to refer to this type of bar I want to do, then I made this image. I think it is quite self…
-
-1
votes1
answer60
viewsHow can I get Bluetoothmanager of the device on Kotlin?
I am learning about Bluetooth in Kotlin and was reading this Google document about Bluetoothadapter https://developer.android.com/reference/android/bluetooth/BluetoothAdapter. I started implementing…
-
-1
votes2
answers27
viewsI can’t do dataBinding Androidstudiokotlin
I simply cannot make Binding work and when I put the mouse over it appears the following error : Unresolved Reference: Create your personagembinding Just cant make the Binding work and when i put…
kotlinasked 3 years, 4 months ago Pedro Tavares 1 -
-1
votes0
answers11
viewsBuild error in android studio using Kotlin
When I compile my application it does not build and from this error, how do I fix? in another application it works. java.lang.Assertionerror: annotationType(): unrecognized Attribute name MODULE…
-
-1
votes2
answers302
viewscan’t use android emulator on androidstudio
Good evening guys, I need to run android studio on my machine, but it gives the error: "Intel HAXM is required to run this AVD. VT-x is disabled in BIOS. Enable VT-x in your BIOS security Settings…
-
-1
votes1
answer41
viewsI can’t return the url of an android image
I’m using the following code to record data and images in firebase and it’s even working, but the image link I’m not able to capture. var uploadTesk: UploadTask = imageRef.putBytes(dadosImage!!);…
-
-1
votes1
answer106
views@Autowired service does not work on Constraintvalidator in Kotlin
I’ve been using Spring Boot for some time in Java and never had a problem with injections using @Autowired. But recently I decided to transform a Rest API project that was in Java to Kotlin, all the…
-
-1
votes1
answer198
viewsArray Creation in Kotlin : No value passed for Parameter array [init]
kotlin array Converti um código de java para kotlin, porém está com um erro que não consigo resolver Here is the java code public class IntroActivity extends AppCompatActivity { private ViewPager…
-
-1
votes1
answer55
viewsCardview on each other’s side
I want to leave Cardview side by side, but it’s in list form: <?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView…
-
-1
votes1
answer104
viewsmy code does not enter onActivityResult (Kotlin)
Good afternoon, I’m trying to take a photo with the camera phone and save it in a database, however I can’t recover the image bitmap, I can open the camera and take the photo but when entering…
-
-1
votes1
answer53
viewsHow to list data from an api in an Activity
Whoa, guys, good night The thing is, I have an application in android studio where I am consuming an api through retrofit and gson, able to make all the connection and the registration functionality…
-
-1
votes1
answer70
viewsI am Beginner and I am trying to Register and Login with Firebase but with errors that I can not solve
I’m following a tutorial I saw on Youtube but mine did not work... Elpe me Please.... By Debug I saw that the error starts inside the private fun functions creatOrLoginUser: I need to create a…
-
-1
votes1
answer32
viewsDiagonal Difference Hacker Rank Kotlin My solution approves in some but fails in the rest
fun diagonalDifference(arr: Array<Array<Int>>): Int { var tamanho = arr.size - 1 var i = 0 var diagonal1 = 0 var diagonal2 = 0 for(i in 0 .. tamanho){ diagonal1 += arr[i][i] diagonal2 +=…
-
-1
votes1
answer63
viewsHide Android/Kotlin Keyboard
I have a EditText I need you to stay focused, but do not open the keyboard at any time, as it will receive a reading from a Qrcode. You can do it? I’ve tried that:…
-
-1
votes1
answer29
viewsUsing Instrumentation Testing to Validate Layout on Android
People, Before asking my question, below is an example of instrumentation code (incomplete purposely) on Android: import android.content.Intent import androidx.lifecycle.Lifecycle import…
-
-1
votes1
answer20
viewsViewmodel with Hilt
I’m making a logic in my app to present the appBar of it just when I need wing to appear or not. For this I did the following Viewmodel: Stateappviewmodel @HiltViewModel class StateAppViewModel…
-
-1
votes1
answer20
viewsreceiving NULL parameter in details Fragment
My Pokemonitem class has a Skill List on it (another class), when I get the "abilities" I get a "null" on my screen instead of the "abilities". Someone can help me? private fun configDetalhes() {…
-
-1
votes1
answer67
views'onCreate' overrides Nothing - Kotlin
I’m new in the area and had made a currency converter application in Kotlin and wanted to put a API, but I am unable to start the application because of this error in the onCreate. I have tried to…
-
-1
votes1
answer27
viewsCaused by: java.lang.Classcastexception: android.widget.Framelayout cannot be cast to androidx.drawerlayout.widget.Drawerlayout
I’m trying to create a Drawer navigation menu, but when I run my app it crashes, already searched and the changes that were to be made at first I already did. Someone can help me? Error log:…
-
-1
votes1
answer61
viewsHow to know List Size? ANDROID KOTLIN
ANDROID KOTLIN : Next: I have my Data Class with its variables,I make a call to the api and I get in my Adapter the list size to add to my attributes in xml ok.. wanted in Activity I put the amount…
-
-1
votes1
answer52
viewsI cannot call an "id" of the "Mainactivity.kt" file inside the "activity_main.xml" file
Hello. I’m starting the program. I’m using Android Studio with the Kotlin language. I’m trying to call an "id", which is inside the file "activity_main.xml" in the file "Mainactivity.kt", I’m not…
-
-1
votes1
answer23
viewsProblem loading URL with Webview Kotlin
I’m trying to open an html inside the Assets in Android Studio, but the page is completely blank. NOTE: When I put any external link, it works. class MainActivity : AppCompatActivity() { override…
-
-1
votes0
answers15
viewsPARAMETER FOR SORT ORDER
I’m taking a course and would like to order the return list by name. I tried inserting as DISPLAY_NAME parameter but does not return. Could help me know how to identify and what parameter to return…
-
-2
votes1
answer280
viewsCheck the app version on Google play
Is there a Web Service that returns the version of my application? Because for example I have version 1.2 (most current) and when the user opens and for example it is version 1.1 do not let him run…
-
-2
votes1
answer49
viewsCall conversion from Java to Kotlin
I’m creating an app that will have a main Activity and some interspersed Fragments, in this case I’m trying to release a fragment_main but I can’t get this Java code to become Koltin code:…
-
-2
votes2
answers163
viewsPower in Java other than Excel
I’m having a problem to convert an Excel formula to Java/Kotlin. The scenario is as follows, in Excel I have: Interest rate: 0.07 Excel calculus: =(1+taxaDeJuros)^12-1 = %125.22 No Kotlin: val…
-
-2
votes1
answer16
viewsHow to use Firebase with Kotlin?
I wanted to take the text fields, and save in the bank, only I don’t know how to save in firebase. TelaOpcoes : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) {…
-
-2
votes1
answer38
viewsFirebase replaces information instead of adding
I’m making a task app with Kotlin and firebase, but every time I try to add information to my database, it doesn’t add it but replaces the previous one. This is my code: class AddActivity :…
-
-2
votes1
answer509
viewsAndroid app generating Exception: androidx.fragment.app.Fragment$Instantiationexception
My app is in production and I’m having a problem in a small part of the devices, I haven’t been able to identify the reason or at least reproduce the problem in a test environment, I did some…
-
-2
votes1
answer80
viewsVariable grab the ID of a button clicked on Activity
Hello, my Activity has several buttons. I would like to know if there is as a variable collect the button that the user click on the screen. Thus, the variable would update its value whenever a…
kotlinasked 4 years ago Ramon Barros 1 -
-2
votes2
answers28
viewsA question about Layout in android Kotlin
Good morning, I am developing a delivery app and wanted to make a cool layout and for that I looked at the layouts of the app that already exist and saw that a type of screen for the store products…
-
-3
votes1
answer36
viewsPassing data from one Ragment to another
I want to pass data from one Ragment to another, but the code works but does not pass the data. Someone can help me in this? I wish to go from ListaPokemonsFragment for DetalhesPokemonFragment…
-
-3
votes1
answer26
viewsHow to create video player activity
I am currently using the Kotlin programming language in the application but if someone has some documentation or example code in java has no problem regarding the question below I would like to…
-
-4
votes0
answers16
viewsName of the variable in looping
I need to display the name of the variable in which it contains the value that is inside the range... in case the variable name 'value2'. Is there a way to find the name of this variable for display…