Questions tagged [kotlin-android-extensions]

Questions related to Kotlin Android Extensions

Kotlin Android Extensions

721 questions
-1
votes
1 answer

Retrofit, response error handling (kotlin)

I am using Retrofit 2.6.3 . I can directly return data model now with Retrofit: interface WikiApiService { // Here declare that the function returns Observable @GET("student/") fun getStudent(@Query("id") sid: Int):…
Leem
  • 17,220
  • 36
  • 109
  • 159
-1
votes
3 answers

Assign a integer number to toolbar as title in Kotlin

I am developing Android project in Kotlin. I got my toolbar: @BindView(R.id.tool_bar) lateinit var toolbar: Toolbar I want to set its title : // student.id is a int type toolbar.title = student.id Student's id is a Int type. toolbar.title expects…
Leem
  • 17,220
  • 36
  • 109
  • 159
-1
votes
1 answer

"kotlin-android-extensions" find id is null in apply

When I use apply,"kotlin-android-extensions" find id is null private val nickDialog: NickDialog by lazy { NickDialog(this@AccountInformationActivity).apply { this.setOnClickConfirmListener { …
Symphony
  • 13
  • 3
-1
votes
2 answers

how to disable screen recording in android using Kotlin?

In generally while we use java , we use the below code getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); to disable screen recording. How can we do this in Kotlin ?
NJR
  • 37
  • 2
  • 8
-1
votes
2 answers

lateinit property songurl has not been initialized although I did

I have two activities first one has public String var called songurl and button leads to the second activity and second activity has mediaplayer receive URL from the String var which is in the first activity and then start playing but the problem is…
-1
votes
2 answers

Unresolved Symbol toInt() in MainActivity Kotlin Android

this is my code for Main activity import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.view.View import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { override fun…
Anjani Mittal
  • 507
  • 1
  • 7
  • 19
-1
votes
1 answer

Parcelize and ObjectBox clash

I'm using kotlin and ObjectBox in my application. My object box entity looks something like @Entity class Order { @Id var id: Long = 0 lateinit var customer: ToOne } @Entity class Customer { @Id var id: Long = 0 …
Sriram R
  • 2,109
  • 3
  • 23
  • 40
-1
votes
1 answer

In Kotlin Programming language importance of varargs in terms of uses

Let me know what is the importance of varargs in Kotlin, if there is any document or some useful links. Please share.
-1
votes
3 answers

Start a Project with the help of Kotlin in android

I am new in Kotlin for android and i have just started to learn.Please let me know how i should have a knowledge about Kotlin for creating a project in Android with the help of Kotlin.?
Peter
  • 587
  • 6
  • 16
-1
votes
2 answers

supportActionBar is null using Kotlin Android always

Just now google has made the Kotlin as an official programming language, so started converting my files to Kotlin. While converting my code, I am always getting null pointer exception when I try to use supportActionBar // set up action bar …
DevAnuragGarg
  • 1,592
  • 2
  • 14
  • 18
-2
votes
3 answers

Android In dutch language comma (,) is interpreted as dot (.)

I am using the following code to format the amount entered by user in EditText. fun String.formatWithComma(): String { return try { val formatter = DecimalFormat("#,###,###") formatter.format(toDouble()) } catch (ex:…
-2
votes
1 answer

Fresco with kotlin?

I am trying to display a image popup in Kotlin and for that I am creating a dilog and set image from url using library fresco but I am getting error with syntax how should I do this below is my implementation. I want to set onclick event too how to…
-2
votes
1 answer

How does Subtracting User Input Work in Kotlin on Android

I know this is wrong pls help Search all over Yt and nothing on how to do it :( need to learn how to use maths with Variable package com.example.myapplication import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import…
-2
votes
2 answers

android-studio 's program crashes while trying to run it

hey everybody i'm french so please excuse my bad english . i'm a programmer who's learning kotlin and i'm making my first program with android studio so i want to make a button(add) who when pressed will add the content of two textboxes(imp1/imp2)…
-2
votes
1 answer

listview per in click dont show Tost in kotlin lang?

What is the wrong in ListView per on click dont show Tost