use view binding in your gradle use (at the bottom of android}android{ ... buildFeatures { viewBinding = true } } in main activity use this codee lateinit var binding: ActivityMainBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = ActivityMainBinding.inflate(layoutInflater) setContentView(binding.root) with this you can reference like this: binding.buttonClear.setOnClickListener{ binding.input.text="" binding.output.text="" }
Just starting with Kotlin... even though you don't speak here, i was able to accomplish the final result. Great work my man. Keep it up!
THANK YOU VERY MUCH BRO BECAUSE OF YOU I MADE MY FIRST KOLTIN CALCULATOR!
I wrote it as is, and it works very well. You made the video very well. thank you👍
thx man it...i followed the code and it worked perfectly👍
Does anyone know what was pressed at the minute 12:52?
I need this answer too
alt+enter
is your android studio need to build with maven or gradle bro?
Plz add your voice as well to explain the process
it doesnt work anymore bro because the The 'kotlin-android-extensions' Gradle plugin is no longer supported
use view binding
in your gradle use
(at the bottom of android}android{
...
buildFeatures {
viewBinding = true
}
}
in main activity use this codee
lateinit var binding: ActivityMainBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
with this you can reference like this:
binding.buttonClear.setOnClickListener{
binding.input.text=""
binding.output.text=""
}
@@taimurahmadthank you
bro ,same problem , did you get the solution ?
@@aarinsheik1583 i got it bro but i forgot and i didnt touch kotlin anymore for 4 months🤣
What did you did in 3:33 with that color and create new folder
Go to res folder , then in values folder, here you see the colors.xml file
res
thanks buddy
@@maryamimran933 thank you
@@maryamimran933 thx
why kotlinx becomes red and means error?
Thank you. Great Tutorial!
is there anyway you can add modulo in this calculator?
Thanks, this help me so much ❤❤
Amazing !! I just have a problem with the import of dependencies, is there another way I can use it?
Hello, do you find a fix?
i found fix, just press sync on the build file.
Thank you so much bro
val result=Expression(expression).calculate(), i have an error in Expression word would you please give an idea.
me too
add dependency: implementation 'org.mariuszgromada.math:MathParser.org-mXparser:4.4.2'
Thank you !
thanks❤
Please, how can I round a number let say 1.333333334 to 1.34, in kotlin, because anytime I used the round(), it gives me an integer value
You Just copied the code from somewhere, speak up 🗣️, if you know how to explain it. Teachers aren't dumb!
At least it works, teachers copy from something too
You don't know what you are doing