Тёмный
No video :(

BUTTONS - Android Fundamentals 

Philipp Lackner
Подписаться 180 тыс.
Просмотров 37 тыс.
50% 1

In this video you will learn how to use buttons in your app and detect when the user clicks on them.
⭐ 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/...
Regular Android tutorials on my Instagram: / philipplackner_official
Checkout my GitHub: github.com/phi...

Опубликовано:

 

6 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 103   
@SuegroLM
@SuegroLM 3 года назад
Worth pointing out that Kotlin Synthetics (Which is the feature [Extension Plugin] that allows you to call your Views (Buttons, Edittexts, etc) with their respective ID directly onto your Kt file/class is deprecated, which in general means it is not recommended to use anymore, instead it is good to use ViewBinding or DataBinding (or both if needed).
@ewomer100
@ewomer100 2 года назад
He covers view binding in this video here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-z0F2QTAKsWU.html
@lovenangelo5415
@lovenangelo5415 2 года назад
thanks
@TheImaginativeSachin
@TheImaginativeSachin Год назад
Yeah It didn't use the synthetics stuff because i as did that it didn't work but I knew about viewbinding so yeah I used viewbinding 😁
@jimlthor
@jimlthor Год назад
Glad I saw this comment. I would have driven myself insane and probably found a different set of tutorials and started all over.. AGAIN..
@pikaboyny
@pikaboyny 4 года назад
I was going through a bunch of videos on RU-vid trying to look on getting into Android Studio with Kotlin since it is the new language going forward by Google on Android. And all of the videos I could find would show you how to do something but not really explain what each part of the video does. For example, the way you broke down the meaning of "R.id.but..." to indicate this comes from resources and ID's, it's something not many do. Thanks for making this fundamental series, it has been super helpful so far for someone looking for a concentration in their CS degree ;)
@PhilippLackner
@PhilippLackner 4 года назад
Thanks so much for your feedback and taking your time. I'm glad I could help and I hope you benefit from my other videos too🙏
@AyushSachan2211
@AyushSachan2211 4 года назад
True
@aayushukey4524
@aayushukey4524 11 месяцев назад
Anyone please help me in my Android Studio it doesn't work when i type btnApply it shows create local variable also there the import library doesn't work i Tried many places still im stuck . help me
@daiyrkanybekov8575
@daiyrkanybekov8575 3 года назад
from 2021 and I got problems when I have tried to import views by using "synthetic". But I have fixed it by replacing with 'view binding'. Great tutorial bro keep going on!
@cutaguy
@cutaguy 3 года назад
Hi, You can add the line: id 'kotlin-android-extensions' into plugins section in build.gradle(app)
@shubhamgupta3396
@shubhamgupta3396 3 года назад
@@cutaguy Thanks for the solution.😊
@sahalsm2651
@sahalsm2651 3 года назад
​@@cutaguy Thanks for this!
@maxvoleanin570
@maxvoleanin570 7 месяцев назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-z0F2QTAKsWU.html&ab_channel=PhilippLackner view binding
@benbouzaadel
@benbouzaadel 11 месяцев назад
to do what he did in this video you need first to learn about view binding in this videos ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-z0F2QTAKsWU.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QVIgunA3jcQ.html this will help you to understand how android studio calls view by id now after that you can follow with the setOnClickListener part because after you call the button its the same in both ways
@gangardarwagle8938
@gangardarwagle8938 Месяц назад
Thank you
@benbouzaadel
@benbouzaadel Месяц назад
@@gangardarwagle8938 No problem Brother
@sandeepjalandra6877
@sandeepjalandra6877 23 дня назад
your comment helped me lot thank you
@nawledge4pwr
@nawledge4pwr 2 года назад
Hi Philipp, How do we import a button nowadays (Oct 2021)? the alt + enter method doesn't work anymore.
@wellingtonschutz6752
@wellingtonschutz6752 Год назад
Same here
@dimitritsikaridze6220
@dimitritsikaridze6220 3 года назад
I'm following this course so far but when I click alt + enter at 7:30 it doesn't import anything, I've tried manually typing it but kotlinx doesn't even autocomplete it only says kotlin
@dimitritsikaridze6220
@dimitritsikaridze6220 3 года назад
nvm I fixed it in my build.gradle (app) plugins for some reason there wasn't id 'kotlin-android-extensions' I added that and it worked
@morganlombard5985
@morganlombard5985 3 года назад
@@dimitritsikaridze6220 Thanks !
@ucminh7630
@ucminh7630 3 года назад
another thanks !!
@Joe-sm7mf
@Joe-sm7mf 2 года назад
And another thank you!
@tolugantidivyareddy6053
@tolugantidivyareddy6053 2 года назад
@@dimitritsikaridze6220 Thank you
@JoeMadds0
@JoeMadds0 Год назад
Followed along through your entire Newbie to Pro series, and per your recommendation, I'm going through this series to learn XML before jumping into Jet Pack Compose. This is my first time committing to learn to program since my Web Design HTML/CSS days over a decade ago. Anyways, THANK YOU. You're videos are not only well thought out and made, but your playlists are well structured and paced. I actually feel confident that I can be good at this because of your tutorials and advice. Figured after having watched 30+ videos of yours, I should stop and express my appreciation. Keep doing your thing!
@TheImaginativeSachin
@TheImaginativeSachin Год назад
Yeah I been following through this too. Well you are 2 weeks ahead of me. How's it going?
@sibymohamed3013
@sibymohamed3013 7 месяцев назад
Thank you Professor God Bless You from Senegal Great Job Enjoy you contribute to the humanity
@bacanalienigena
@bacanalienigena 2 года назад
Just in case if you are following along this tutorial as I am so the import " synthetic " is deprecated but Philipp has made an updated video using View Binding. Just keep coding. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-z0F2QTAKsWU.html
@wahyukoco4562
@wahyukoco4562 2 года назад
thanks!
@regressumdiabolus
@regressumdiabolus 2 года назад
Thanks! Saved me an hour of trying to find the correct google search string.
@timmyroberts1
@timmyroberts1 5 месяцев назад
Thanks. whenever you think its just something small and easy, but you actually need a whole video to explain!! thank you so much.
@TzarPlatypus
@TzarPlatypus 3 года назад
Wow holy crap these videos are easily the best coding tutorial videos I have ever seen. I am a complete beginner and self taught (more youtube taught honestly) and you are by far the most helpful.
@PhilippLackner
@PhilippLackner 3 года назад
Thank you! ❤️
@monbebex7302
@monbebex7302 Год назад
first of all thank you so much for you very useful curse and then I have a question in the 8 min where you teaching about "importing btnApply" it dosn't work for me I pressed Alt+Enter but it didn't work can you pleas help me to fix it?
@brianryan4053
@brianryan4053 3 года назад
Phillipp, your video about buttons is extremely good. Your tip about renaming buttons is very important. I had problem with renaming buttons. However I need button to save data in database - to implement Insert statement. I do not know how to do this in button.onclick. Could you please show this in comment. Because it is important for all Android Studio beginners. Or can you make video " Buttons to save and delete data in database". Thanks a lot
@gracialonignasiver6302
@gracialonignasiver6302 3 года назад
Great video, bro. I finished an Android App Development course on Udemy, and I'm now using your videos for review. These are helping tremendously. Keep up the good up work.
@nBioTechie
@nBioTechie Год назад
can you send me the link of the course?
@fulksatavonsamith4815
@fulksatavonsamith4815 4 года назад
if you add ads, i pleasure to watch it. thank you so much for good explanation
@BballShot90
@BballShot90 3 года назад
Love your videos. Could you also show how to do this stuff in code besides the design views?
@loganwhite5467
@loganwhite5467 3 года назад
Great Tutorial. You are what is getting me through my Mobile App Class. Thank you!
@captainbr0st.189
@captainbr0st.189 Год назад
I love how much this looks like Visual Basic but with OOP
@TheSharkbeast
@TheSharkbeast 3 года назад
Being a Java Developer at 7:18 i realized (one of the reasons maybe) why u hate java & love KOTLIN
@nervous711
@nervous711 2 года назад
Hello, I'm a newbie here. Many thanks to your video, one of the best explained android tutorials! Some issue occurred when I followed steps in the video Program compiled fine, but my emulator still showed "Hello World" layout, which is really strange because in the previous Linearlayout video the app ran no problem. My first thought is it's maybe android studio had some syntax updates during this time since 2020? I've googled it but most answers were so many years ago. Sorry if the question sounds stupid, would appreciate any help, thanks!
@anupambhatt3376
@anupambhatt3376 3 года назад
While running Android studio emulator when I increase the volume of the emulator it got crashed and showed blue screen error what could be the possible reason ??
@mikemikee7797
@mikemikee7797 4 года назад
Great series!
@PhilippLackner
@PhilippLackner 4 года назад
Thank you!
@S_Karthik
@S_Karthik 3 года назад
couldn't add my view directly in main activity. not showing any import
@PhilippLackner
@PhilippLackner 3 года назад
Add id 'kotlin-android-extensions' in your build.gradle file in the plugins block. Google removed this feature by default
@S_Karthik
@S_Karthik 3 года назад
@@PhilippLackner Thanks for reply, I tried it but now uninstalled and retried again it doesn't works.. also learning from your videos is good thanks
@SimspaceDev
@SimspaceDev 3 года назад
@@PhilippLackner I was having the same problem. That worked for me. Thanks!
@mrak7588
@mrak7588 2 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-dXVWTqXnF5U.html This will save u my brother
@kesavguru415
@kesavguru415 Год назад
@@S_Karthik You have to add id 'kotlin-android-extensions' in build.gradle (:app) file not in the other gradle file which is build.gradle (Your App Name)
@moattia9126
@moattia9126 Год назад
to solve button problem: - add : apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' to your build gradle (module...) -add : import kotlinx.android.synthetic.main.activity_main.* to your main activity
@yunierolivera5091
@yunierolivera5091 Год назад
Thanks. This modification worked for me ``` plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'org.jetbrains.kotlin.android.extensions' } ```
@gutic4824
@gutic4824 4 года назад
Perfect explanation :)
@PhilippLackner
@PhilippLackner 4 года назад
Thanks!
@abdulbasid2539
@abdulbasid2539 Год назад
How do we import a button , the alt + enter method doesn't work anymore
@devprasad8767
@devprasad8767 Год назад
Did you find it bro?
@wellingtonschutz6752
@wellingtonschutz6752 Год назад
@@devprasad8767 same here
@ucraceviri
@ucraceviri Год назад
Binding is used nowadays. This will help you ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-z0F2QTAKsWU.html
@aaaaa0000wu
@aaaaa0000wu 6 месяцев назад
Bro did you find the solution for it???
@abdremo
@abdremo 4 года назад
Nice 👍
@guy1407
@guy1407 4 года назад
First - thanks again and again for the videos. Second - Just a suggestion, you do not have to accpet: Instead of teaching us the shortcut to refactor (and we are familiiar with many other), right click and show us the popup menu - refactor All the best :)
@PhilippLackner
@PhilippLackner 4 года назад
Thanks for the feedback! For which particular reason? I mean the shortcut is faster of course and I never needed another option out of the refractor menu than renaming
@guy1407
@guy1407 4 года назад
@@PhilippLackner True, it is faster. But we are familiar with shortcut from (e.g. office, visual studio, python , norton commander (lol) ,android studio, access , you got it...) but if one will study "first" to do it with the correct menu - he/she will look for the shortcut there :)
@haydendavies2862
@haydendavies2862 3 года назад
Hey I was following this tutorial and I tried using the Alt enter shortcut and it didnt work I then tried doing the import with kotlinx and it didnt give me that as an option is this something I have missed during the setup? Other than that loving this content just finished your kotlin newbie to pro course and I never knew I could fall in love with a language but I think I have lol
@ashrayapandey5576
@ashrayapandey5576 3 года назад
You can add this id 'kotlin-android-extensions' to the plugins in your build.gradle file.
@712allen
@712allen 3 года назад
@@ashrayapandey5576 It works, thank you.
@ahmedsabahsabri1494
@ahmedsabahsabri1494 Год назад
why the placeholder text in the edittext fields stay when i write something
@Luffy_2804
@Luffy_2804 Год назад
just binge watching
@rounakdas3411
@rounakdas3411 3 года назад
What is the difference between left_to_left_of and start_to_start_of?
@marypaul9627
@marypaul9627 2 года назад
Mad respect
@AjaySharma-pk5sc
@AjaySharma-pk5sc 3 года назад
Great
@princedonkor44
@princedonkor44 Год назад
New ways to implement binding - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QVIgunA3jcQ.html&ab_channel=ProgrammingWithNick
@ishaangupta6915
@ishaangupta6915 Год назад
thanks a lot friend
@ranganathprasadkr3239
@ranganathprasadkr3239 3 года назад
in buttons whn am using Log.d its shwing error am imported android.util.Log
@shashwatkumarjain3337
@shashwatkumarjain3337 2 года назад
how to import button in kotlin file its not importing on presssing alt + enter
@akshayaarora4979
@akshayaarora4979 3 года назад
android.util.log not working. how to resolve?
@sidbot9622
@sidbot9622 Год назад
I think we need to know view binding here
@KhulKeBoloo
@KhulKeBoloo 2 года назад
when i click on Apply Button nothing works... why my button onclicklistener not working ??? no any logcat neither any response ... reply soon
@rajeshkanna9502
@rajeshkanna9502 2 года назад
it is deprecated now
@akshayrajsinhchudasama7315
@akshayrajsinhchudasama7315 2 года назад
Not able to import the id. How to do it?
@akshayrajsinhchudasama7315
@akshayrajsinhchudasama7315 2 года назад
Ok done thx for the amazing video
@amine250
@amine250 3 года назад
I couldn't import my button id automatically, I'm using Android Studio v4.1.2
@amine250
@amine250 3 года назад
it looks like the kotlinx synthetics got deprecated developer.android.com/topic/libraries/view-binding/migration
@bekzattolegenov8517
@bekzattolegenov8517 3 года назад
@@amine250 tnx, it helped
@g3org3210
@g3org3210 2 года назад
NamingExceptionError: "New York" is not a country! 😜
@javar1987
@javar1987 Год назад
private lateinit var binding: ActivityMainBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = ActivityMainBinding.inflate(layoutInflater) setContentView(binding.root) binding.applyBtn.setOnClickListener{ val firstName = binding.firstNameTxt.text.toString() val lastName = binding.lastNameTxt.text.toString() val birthDate = binding.birthdateTxt.text.toString() val country = binding.countryTxt.text.toString() Log.d("MainActivity:", "$firstName, $lastName, $birthDate, $country") } }
Далее
TEXTVIEWS - Android Fundamentals
14:09
Просмотров 27 тыс.
CHECKBOX AND RADIOBUTTON - Android Fundamentals
16:01
Fixing Plastic with Staples
00:18
Просмотров 814 тыс.
when you have plan B 😂
00:11
Просмотров 10 млн
TOASTS AND CONTEXT - Android Fundamentals
16:51
Просмотров 37 тыс.
IMAGEVIEWS - Android Fundamentals
10:14
Просмотров 24 тыс.
LAYOUT BASICS AND LINEAR LAYOUT - Android Fundamentals
16:45
What is the Context? - Android Basics 2023
11:22
Просмотров 56 тыс.
Fixing Plastic with Staples
00:18
Просмотров 814 тыс.