Комментарии:
Sir ab android studio me default text size 14 sp hota hai
ОтветитьBasically kotlin is a enhanced and optimised language of java🤔
ОтветитьHelp
I got error
Val name =nameInput.editableText.toString()
Show unresolved reference nameInput
Finally made my first app! 🥳 Thank you so much bhaiya 🙏🏻
ОтветитьIn Java, there is no direct equivalent to Kotlin's companion object. However, you can achieve similar functionality by using a static inner class.
ОтветитьYou should shame on your self you purposely wasteing our time
ОтветитьText is not coming in cursive , how to resolve it ?
ОтветитьYou create problems in your videos to solve later on your comments 🤣
ОтветитьI am getting error in mainActivity in this line
intent.putExtra(BirthdayGreetingActivity.NAME_EXTRA, name)
can anyone help me, please
try this ! in case commented line causes error
//birthdayGreetings.text="Happy Birthday $name"
val textView = findViewById<TextView>(R.id.birthdayGreetings)
textView.setText("Happy Birthday $name").toString()
Thanks bhaiya
ОтветитьSir i have set the image for first activity..and now i want to also set image to the second activity but i am not able to do it..please can you just tell me how?
Ответитьmy app is not running it closes everytime i click on create card
ОтветитьPhli baat to y ki intent vali line m error show kr rha
Ответитьbhaiya ek doubt aap chair pr baith kr record kr rhe ho ya khade hokar video record kr rhe
coding m koi doubt nii wo sb toh sahi chal gya
birthday Greeting.text = "Happy Birthday $name"
i'm getting error
if anyone is stuck on something, heres the working code :)
BirthdayGreeting Activity
package com.example.birthdaygreet
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.TextView
class BirthdayGreetingActivity : AppCompatActivity() {
companion object{
const val NAME_EXTRA = "name_extra"
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_birthday_greeting)
//finding birthdayText
val birthdayText = findViewById<TextView>(R.id.birthdayText)
val name = this.intent.getStringExtra(NAME_EXTRA)
birthdayText.text = "happy birthday\n$name !"
}
}
MainActivity.kt
package com.example.birthdaygreet
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.EditText
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
fun createBirthdayCard(view:View){
//Finding the edit text
val nameInput = findViewById<EditText>(R.id.name_input)
val name = nameInput.editableText.toString()
val intent = Intent(this, BirthdayGreetingActivity::class.java)
intent.putExtra(BirthdayGreetingActivity.NAME_EXTRA, name)
startActivity(intent)
}
}
anyone can explain what anuj bhaiya said about dp and sp
Ответить