How to Get User Input, Show Toast Message and Change Image on Button Click in Android Studio

Опубликовано: 28 Сентябрь 2024
на канале: Sandip Bhattacharya
11,363
110

Master programming and take your career to new heights with clear, concise C, Android, and Web Development courses for just Rs. 999 / $ 12. Get lifetime access and certificate. Click here to enroll: https://courses.sandipbhattacharya.co...

Hi, in this demonstration, I'll show you how to get the text from an EditText and show a Toast message as well as change the image of an ImageView on a single button press. So, let's get started.

EditText is a user interface element for entering and modifying text. It is a subclass of TextView with text editing capabilities. We often use EditText in order to provide text into an app.

ImageView is used to display image resources, for example, Bitmap or Drawable resources. It is a subclass of View. ImageView takes care of the loading and optimizing of the image, freeing you to focus on app-specific details like the layout and content.

The button is a user interface element that can be pressed, or clicked, by the user to perform an action. It is a subclass of TextView.

A toast provides simple feedback about an operation in a small popup. It is the subclass of Object class. It only fills the amount of space required for the message and the current activity remains visible and interactive. Toasts automatically disappear after a timeout.

Source Code for this video
https://github.com/sandipapps/Get-Tex...

| -------------------------------------------------------------------- |

👍 Subscribe to the Channel
https://www.youtube.com/c/SandipBhatt...

Check out other Playlists

► Introduction to Programming with C (2 hours of video content)
   • C Programming Tutorial for Beginners  

► Android App Development for Beginners (8+ hours of video content)
   • Android Apps and Games Development fo...  

► Build a Complete Quiz App for Android
   • Build a Complete Quiz App for Android  

► Android SQLite Programming for Beginners (2.5 hours of video content)
   • Android SQLite Programming for Beginners  

► Android Game Development in Android Studio: Build Games for Absolute Beginners (3+ hours of video content)
   • Android Game Development in Android S...  

► Android Game Development - Create Your First Mobile Game
   • Android Game Development - Create You...  

► Android Game Development Tutorial
   • Android Game Development Tutorial  

► Programming Flappy Bird for Android
   • Programming Flappy Bird for Android  

► Object Oriented Programming Fundamentals
   • Object Oriented Programming Fundamentals  

► jQuery for Beginner to Advanced
   • jQuery for Beginner to Advanced  

► PHP MySQL CRUD Tutorial (Create, Read, Update, Delete) (1+ hour of video content)
   • PHP MySQL CRUD Tutorial (Create, Read...  

❤️ You can donate by clicking here
PayPal: https://paypal.me/CreatorSandip
For Indians: https://www.instamojo.com/@CreatorSandip

✉️ For Business Inquiries
[email protected]

📣 Follow me on other sites
→ Website: https://SandipBhattacharya.com
→ Udemy: http://bit.ly/SandipUdemy
→ Skillshare: http://bit.ly/SandipSkillshare
→ Google Play: http://bit.ly/SandipPlay
→ Facebook Page: http://bit.ly/SandipFacebook
→ Facebook Group: https://bit.ly/PWSGroup
→ LinkedIn Group: https://bit.ly/PWSGroupLI
→ Twitter: http://bit.ly/SandipTwitter
→ GitHub: http://bit.ly/SandipGitHub