TOASTS AND CONTEXT - Android Fundamentals

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 95

  • @wavecycle
    @wavecycle 4 года назад +50

    This is very well done, thank you. I'm disabled and can only spend a limited time staring at a screen, and your explanations are clear enough that I can mostly follow just using audio!

    • @PhilippLackner
      @PhilippLackner  4 года назад +9

      Wow thanks, that is a compliment, keep going! 🙏

    • @zareenwilhelm5811
      @zareenwilhelm5811 2 года назад

      Lol me too - I can follow by just listening

  • @georgenady7375
    @georgenady7375 4 года назад +17

    I am George From Egypt
    really I wana tell you something .. you are learn the content in very detailed and this is the point for the beginners
    you are awesome
    good job and you will be something great soon

    • @PhilippLackner
      @PhilippLackner  4 года назад +3

      Thank you man that's a great feedback ❤️

    • @georgenady7375
      @georgenady7375 4 года назад

      @@PhilippLackner you deserve it

  • @Amandeep-uc7qh
    @Amandeep-uc7qh 3 года назад +4

    I watch your videos even if I knew how to do that thing because you really teach all the small concepts which helps me to understand them better💯

  • @matt-g-recovers
    @matt-g-recovers 3 года назад +2

    Best explanation of Context in Android ever!

  • @maresolaris
    @maresolaris 2 года назад +1

    What an excellent tutorial, with excellent hints on HOW to use these methods and techniques without sounding hurried. Thank you for putting in your efforts. You gained a fan!

  • @akshaytati
    @akshaytati 3 года назад +2

    Thanks man these tutorials are much better than the course i bought

  • @cherylm8210
    @cherylm8210 4 года назад +7

    Great video. None of the other videos i've seen mentioned custom toasts! It's new to me

  • @V9ball
    @V9ball 3 года назад +6

    Absolutely awesome series :). BTW, it looks like the "view" at 14:58 is deprecated now.

    • @brian_clips
      @brian_clips 3 года назад +1

      did you solve this problem?

    • @dhruvmaindola673
      @dhruvmaindola673 2 года назад +1

      @@brian_clips its not a problem. One can still use it for now. There must be some new implementation of it that must be getting recommended although im not entirely sure.

  • @guy1407
    @guy1407 4 года назад +7

    I liked the screen trainsition of "imagine ..." :)
    Thanks a lot for your efforts!!!

  • @deli5777
    @deli5777 2 года назад

    I like your videos. You are good at explaining things and you are easy to understand. Thanks

  • @GrumpyOldMan9
    @GrumpyOldMan9 3 года назад +4

    This German accent is much easier on the ear than that of "Coding In Flow"

  • @colbydowns2268
    @colbydowns2268 Год назад +4

    Hey Philipp, I think the layoutInflater has undergone some changes in recent years. The custom toast portion of this video doesn't appear to work anymore if coded in Android today. I'm currently working through the playlist. I expect some hiccups from a 3 year old series... just wanted you to know. Thanks!

    • @kushagragoel6760
      @kushagragoel6760 Год назад

      +1
      I was getting an error too, did you solve it?

    • @Homo_Samiens
      @Homo_Samiens Год назад +1

      This Series is based in 2020 and yes some things are not relevant in 2023, Try following his "Android Basics 2023" hope you will find the latest tools in that playlist!

    • @sreeragvp4808
      @sreeragvp4808 Год назад

      @@kushagragoel6760 just type null in the place of clToast

    • @haamidmuhammad2633
      @haamidmuhammad2633 3 месяца назад

      @@sreeragvp4808 thanks for the tip. i'm wondering what exactly does null do though?

  • @hackingkingdom5634
    @hackingkingdom5634 2 года назад

    Your videos really helpfull to understand the concepts .Thanku ❤

  • @DevTipsForYou
    @DevTipsForYou Месяц назад

    This is why java is a lot better for learning, all those abstraction that you explain, you need to code in java.

  • @muhammedrabee8234
    @muhammedrabee8234 3 года назад +1

    It was very helpful , Good work man.

  • @retodenis5181
    @retodenis5181 2 года назад +2

    since api 30 setView is deprecated. Is any other easy way to set custom view for toast?

  • @DBClipss
    @DBClipss Год назад +1

    i have having trouble with the custom toast. When i try to create view in line 18, it doesnt allows me to select the root id and there a dash in the view text aswell. i think its probably cause of version or that this method is deprecated. What should i do for this?

    • @Klusio19
      @Klusio19 9 месяцев назад

      View binding. Philipp has and video about it

  • @sergiaguilar1
    @sergiaguilar1 3 года назад +3

    view is deprecated how can I change that?

  • @javlontursunov6527
    @javlontursunov6527 2 года назад +1

    Bro please make videos related to making an app which can connect to Nodemcu WiFi module

  • @chadzulu4328
    @chadzulu4328 3 года назад +1

    Good ol' Mr. Poop! Another great video, thanks!

  • @alexgireff2180
    @alexgireff2180 3 года назад

    Cool and clear as usual. Thanks🙏

  • @walidaguib3944
    @walidaguib3944 Год назад

    hi Philipp , why you do not use Relative Layout ?

  • @azmyin
    @azmyin 3 года назад +1

    What would be the commands for the custom Toast in Java?

  • @loveshpurswani632
    @loveshpurswani632 3 года назад +2

    Hey Phillip, I did the same thind as you did but the clToast ID that you gave in the layoutInflater Statement is hilighted as red and showing error: Unresolved reference.
    Please can you help me with that

    • @SuegroLM
      @SuegroLM 3 года назад +1

      Did you import kotlinx.android.Synthetic.* (or something like that)? If not, then probably you're getting the error because this kotlinx plugin's feature has been deprecated for a while now, if you want to reference your viewID you can either get it with findViewById (Which I'd not recommend, probably only for some rare cases) or ViewBinding which is a feature from the AndroidX Jetpack library that I recommend.

    • @trevorPhillips284
      @trevorPhillips284 2 года назад

      i am having the same error as well

    • @chochosan044
      @chochosan044 2 года назад +4

      @@trevorPhillips284 you have to use viewbinding, since synthetics are deprecated, and you already have ActivityMainBinding for the main activity xml you have to setup another one for custom toast, import ......CustomToastBinding, then in class MainActivity declare private lateinit var binding1 (or smth else since binding is already taken) : CustomToastBinding then use binding1.clToast in the inflater ...

    • @TheImaginativeSachin
      @TheImaginativeSachin 2 года назад

      @@chochosan044 Woah thanks mate. What does deprecated mean?

  • @linox20
    @linox20 2 года назад

    friend your videos are marvellous, maybe you settled your language for german because, i can read english but i cannot listen and when i use the subtitles youtube offer me german translation,

  • @nvalet
    @nvalet 4 года назад

    Thank you for this amazing videos!

  • @juanclopgar97
    @juanclopgar97 Месяц назад

    Is there a way to place a property to pass the text that the Toast is going to display?

  • @MohamedReda-bg8is
    @MohamedReda-bg8is 2 года назад

    When I use the word "view" I see it written but crossed out. Does it have a newer version?

  • @SuegroLM
    @SuegroLM 3 года назад

    Superb

  • @amirayasmine8490
    @amirayasmine8490 2 года назад

    you are amazing, thank you

  • @thahaziq97
    @thahaziq97 3 года назад

    Thank you so much

  • @g3org3210
    @g3org3210 3 года назад

    @Philipp - > " 'setter for view: View?' is deprecated. Deprecated in Java. "
    Any chance in still doing custom toasts with the latest Kotlin implementation?!
    Later EDIT:
    It seems to be working fine, just throws a warning.

  • @karthicks1608
    @karthicks1608 4 года назад

    How to toast an error in onError(). I can't get any context.

  • @billmolloy2264
    @billmolloy2264 Год назад

  • @danieladamiak8944
    @danieladamiak8944 Год назад

    nice

  • @rotimidokun
    @rotimidokun Год назад +18

    Some processes in this video are deprecated. If you want to complete a custom toast, see my code:
    class MainActivity : AppCompatActivity() {
    private lateinit var binding: ActivityMainBinding
    private var customToastView: View? = null
    override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    //bind your parent xml layout with view binding
    binding = ActivityMainBinding.inflate(layoutInflater)
    setContentView(binding.root)
    //inflate your custom toast xml file
    customToastView = layoutInflater.inflate(
    R.layout.custom_toast,
    findViewById(R.id.csToastContainer) as ViewGroup?
    )
    binding.btnShowToast.setOnClickListener {
    val toast = Toast(this@MainActivity)
    toast.duration = Toast.LENGTH_LONG
    toast.setGravity(Gravity.BOTTOM, 0, 200)
    toast.view = customToastView
    toast.show()
    }
    }
    }

    • @kluster120
      @kluster120 Год назад

      Thanky you bro !)

    • @sadiqusman2965
      @sadiqusman2965 Год назад +1

      Thank you very very much!!!!!!!

    • @kskfernando2945
      @kskfernando2945 Год назад

      Thanks a lot

    • @dhivakardhiva2963
      @dhivakardhiva2963 Год назад

      thanks a lot brother

    • @fiedler65
      @fiedler65 Год назад +3

      To me using findViewById does not look like a natural solution. This is what I would suggest.
      class MainActivity : AppCompatActivity() {
      private lateinit var binding: ActivityMainBinding
      override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      binding = ActivityMainBinding.inflate(layoutInflater)
      setContentView(binding.root)
      binding.btnShowToast.setOnClickListener {
      Toast(this).apply {
      duration = Toast.LENGTH_LONG
      view = CustomToastBinding.inflate(layoutInflater).root
      show()
      }
      }
      }
      }

  • @lma_cristian
    @lma_cristian 3 года назад

    Buen video

  • @undefinedbug1.0
    @undefinedbug1.0 Год назад

    Perfect :)

  • @aaratprasadchopra3255
    @aaratprasadchopra3255 3 года назад

    The custom toast is deprecated now I think

  • @SerhiiOr
    @SerhiiOr 4 года назад

    BOMB!!!

  • @riyazatkureshi1549
    @riyazatkureshi1549 3 года назад

    How to set width of toast match parent?

  • @nanonkay5669
    @nanonkay5669 2 года назад

    Did you just say Welcome Mr. Poop??? Lmao I wanna work with that guy now lol!!!!

  • @tessanix9771
    @tessanix9771 Год назад

    Mr Poop has the bast name ever

  • @jacktolmie1971
    @jacktolmie1971 3 года назад +1

    Skip the part when he is making the custom Toast. It is depreciated, and will not work.

    • @jacktolmie1971
      @jacktolmie1971 3 года назад

      ​@Lahty V. I think .makeText() is the new way:
      kotlin-android.com/android-toast-kotlin/
      I am still learning this myself, so hopefully this is right...

  • @americancitizen748
    @americancitizen748 3 года назад

    "Welcome, Mr. Poop!"

  • @guy1407
    @guy1407 4 года назад +2

    Hi, I have a problem with the custom toast.
    The view variable has a strike line, and the error is : Unresolved reference: inflate

    • @guy1407
      @guy1407 4 года назад

      setter for view: View?' is deprecated. Deprecated in Java

    • @brian_clips
      @brian_clips 3 года назад +1

      hey, did you solve this problem?

    • @guy1407
      @guy1407 3 года назад

      No...

    • @brian_clips
      @brian_clips 3 года назад

      @@guy1407 it's so bad, but thanks

    • @trevorPhillips284
      @trevorPhillips284 2 года назад +1

      i am having a similar issue

  • @Ilamarea
    @Ilamarea 2 года назад

    Ahah! You are German! Eingabe betrayed you.

  • @KellyMalaki
    @KellyMalaki Год назад

    Even though it looks pretty shitty😂😂😂

  • @alfian3570
    @alfian3570 4 года назад +2

    Please add subtitle english

  • @ajaygalagali5963
    @ajaygalagali5963 4 года назад

    :)

  • @guy1407
    @guy1407 4 года назад

    How can I send you a private message please ?

    • @PhilippLackner
      @PhilippLackner  4 года назад

      on my instagram

    • @guy1407
      @guy1407 4 года назад

      @@PhilippLackner Look there for a PM please

  • @Jojoyel
    @Jojoyel 4 года назад +2

    Noooo Kotlin