TOASTS AND CONTEXT - Android Fundamentals

  Рет қаралды 36,829

Philipp Lackner

Philipp Lackner

4 жыл бұрын

In this video you will learn about the context in Android an how to use it to display a little toast message.
⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/premium-courses...
Regular Android tutorials on my Instagram: / philipplackner_official
Checkout my GitHub: github.com/philipplackner

Пікірлер: 91
@wavecycle
@wavecycle 4 жыл бұрын
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 жыл бұрын
Wow thanks, that is a compliment, keep going! 🙏
@zareenwilhelm5811
@zareenwilhelm5811 Жыл бұрын
Lol me too - I can follow by just listening
@georgenady7375
@georgenady7375 4 жыл бұрын
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 жыл бұрын
Thank you man that's a great feedback ❤️
@georgenady7375
@georgenady7375 4 жыл бұрын
@@PhilippLackner you deserve it
@mattgraves3709
@mattgraves3709 3 жыл бұрын
Best explanation of Context in Android ever!
@maresolaris
@maresolaris 2 жыл бұрын
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 жыл бұрын
Thanks man these tutorials are much better than the course i bought
@Amandeep-uc7qh
@Amandeep-uc7qh 3 жыл бұрын
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💯
@deli5777
@deli5777 2 жыл бұрын
I like your videos. You are good at explaining things and you are easy to understand. Thanks
@muhammedrabee8234
@muhammedrabee8234 3 жыл бұрын
It was very helpful , Good work man.
@alexgireff2180
@alexgireff2180 2 жыл бұрын
Cool and clear as usual. Thanks🙏
@cherylm8210
@cherylm8210 4 жыл бұрын
Great video. None of the other videos i've seen mentioned custom toasts! It's new to me
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you! I'm glad it helps you
@hackingkingdom5634
@hackingkingdom5634 Жыл бұрын
Your videos really helpfull to understand the concepts .Thanku ❤
@GrumpyOldMan9
@GrumpyOldMan9 2 жыл бұрын
This German accent is much easier on the ear than that of "Coding In Flow"
@chadzulu4328
@chadzulu4328 2 жыл бұрын
Good ol' Mr. Poop! Another great video, thanks!
@guy1407
@guy1407 4 жыл бұрын
I liked the screen trainsition of "imagine ..." :) Thanks a lot for your efforts!!!
@V9ball
@V9ball 3 жыл бұрын
Absolutely awesome series :). BTW, it looks like the "view" at 14:58 is deprecated now.
@brian_clips
@brian_clips 2 жыл бұрын
did you solve this problem?
@dhruvmaindola673
@dhruvmaindola673 2 жыл бұрын
@@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.
@nvalet
@nvalet 3 жыл бұрын
Thank you for this amazing videos!
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Thanks for watching!
@amirayasmine8490
@amirayasmine8490 2 жыл бұрын
you are amazing, thank you
@thahaziq97
@thahaziq97 2 жыл бұрын
Thank you so much
@SuegroLM
@SuegroLM 2 жыл бұрын
Superb
@sergiaguilar1
@sergiaguilar1 2 жыл бұрын
view is deprecated how can I change that?
@javlontursunov6527
@javlontursunov6527 Жыл бұрын
Bro please make videos related to making an app which can connect to Nodemcu WiFi module
@danieladamiak8944
@danieladamiak8944 7 ай бұрын
nice
@retodenis5181
@retodenis5181 2 жыл бұрын
since api 30 setView is deprecated. Is any other easy way to set custom view for toast?
@azmyin
@azmyin 3 жыл бұрын
What would be the commands for the custom Toast in Java?
@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,
@walidaguib3944
@walidaguib3944 11 ай бұрын
hi Philipp , why you do not use Relative Layout ?
@undefinedbug1.0
@undefinedbug1.0 Жыл бұрын
Perfect :)
@lma_cristian
@lma_cristian 2 жыл бұрын
Buen video
@rotimidokun
@rotimidokun Жыл бұрын
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 Жыл бұрын
Thank you very very much!!!!!!!
@kskfernando2945
@kskfernando2945 Жыл бұрын
Thanks a lot
@dhivakardhiva2963
@dhivakardhiva2963 Жыл бұрын
thanks a lot brother
@fiedler65
@fiedler65 11 ай бұрын
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() } } } }
@colbydowns2268
@colbydowns2268 9 ай бұрын
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 9 ай бұрын
+1 I was getting an error too, did you solve it?
@Homo_Samiens
@Homo_Samiens 8 ай бұрын
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 7 ай бұрын
@@kushagragoel6760 just type null in the place of clToast
@DBClipss
@DBClipss 7 ай бұрын
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 4 ай бұрын
View binding. Philipp has and video about it
@MohamedReda-bg8is
@MohamedReda-bg8is Жыл бұрын
When I use the word "view" I see it written but crossed out. Does it have a newer version?
@user-ve6kt7uj5r
@user-ve6kt7uj5r 4 жыл бұрын
BOMB!!!
@PhilippLackner
@PhilippLackner 4 жыл бұрын
NSA wants to know your location
@karthicks1608
@karthicks1608 3 жыл бұрын
How to toast an error in onError(). I can't get any context.
@loveshpurswani632
@loveshpurswani632 3 жыл бұрын
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 2 жыл бұрын
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 жыл бұрын
@@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 Жыл бұрын
@@chochosan044 Woah thanks mate. What does deprecated mean?
@g3org3210
@g3org3210 2 жыл бұрын
@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.
@billmolloy2264
@billmolloy2264 8 ай бұрын
@riyazatkureshi1549
@riyazatkureshi1549 3 жыл бұрын
How to set width of toast match parent?
@ManeelxAkosAdor
@ManeelxAkosAdor 2 жыл бұрын
put match_parent on width xd
@aaratprasadchopra3255
@aaratprasadchopra3255 2 жыл бұрын
The custom toast is deprecated now I think
@tessanix9771
@tessanix9771 Жыл бұрын
Mr Poop has the bast name ever
@americancitizen748
@americancitizen748 3 жыл бұрын
"Welcome, Mr. Poop!"
@noso22ji
@noso22ji 3 жыл бұрын
😂😂
@mrak7588
@mrak7588 2 жыл бұрын
😂😂
@guy1407
@guy1407 4 жыл бұрын
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 2 жыл бұрын
hey, did you solve this problem?
@guy1407
@guy1407 2 жыл бұрын
No...
@brian_clips
@brian_clips 2 жыл бұрын
@@guy1407 it's so bad, but thanks
@trevorPhillips284
@trevorPhillips284 2 жыл бұрын
i am having a similar issue
@jacktolmie1971
@jacktolmie1971 3 жыл бұрын
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...
@nanonkay5669
@nanonkay5669 2 жыл бұрын
Did you just say Welcome Mr. Poop??? Lmao I wanna work with that guy now lol!!!!
@ajaygalagali5963
@ajaygalagali5963 3 жыл бұрын
:)
@Ilamarea
@Ilamarea 2 жыл бұрын
Ahah! You are German! Eingabe betrayed you.
@alfian3570
@alfian3570 3 жыл бұрын
Please add subtitle english
@KellyMalaki
@KellyMalaki Жыл бұрын
Even though it looks pretty shitty😂😂😂
@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 жыл бұрын
Noooo Kotlin
INTENTS AND STARTING ACTIVITIES - Android Fundamentals
16:11
Philipp Lackner
Рет қаралды 67 М.
PERMISSIONS - Android Fundamentals
19:00
Philipp Lackner
Рет қаралды 45 М.
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 24 МЛН
Kotlin Context Receivers - How to Use, Why, and Best Practice
24:22
Rock the JVM
Рет қаралды 4,1 М.
TEXTVIEWS - Android Fundamentals
14:09
Philipp Lackner
Рет қаралды 26 М.
CHECKBOX AND RADIOBUTTON - Android Fundamentals
16:01
Philipp Lackner
Рет қаралды 29 М.
Fundamentals of Compose Layouts and Modifiers - MAD Skills
11:56
Android Developers
Рет қаралды 85 М.
CHAINS AND GUIDELINES - Android Fundamentals
12:30
Philipp Lackner
Рет қаралды 48 М.
RECYCLERVIEW - Android Fundamentals
24:58
Philipp Lackner
Рет қаралды 101 М.
LAYOUT BASICS AND LINEAR LAYOUT - Android Fundamentals
16:45
Philipp Lackner
Рет қаралды 112 М.
NOTIFICATIONS - Android Fundamentals
15:39
Philipp Lackner
Рет қаралды 45 М.
What is the Context? - Android Basics 2023
11:22
Philipp Lackner
Рет қаралды 50 М.
Let, Also, Apply, Run, With - Kotlin Scope Functions
11:44
Philipp Lackner
Рет қаралды 93 М.
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 24 МЛН