Android Dynamic Views Part 1 | Adding & Removing Views From Layout Using Java Code In Android Studio

  Рет қаралды 51,237

Droid Guru

Droid Guru

Күн бұрын

In some scenarios you might need to add and remove views programmatically in a layout.
In this video you will learn how to do it. You will see how it is being added to linear layout and how it is being removed.
Checkout complete project on Github:
github.com/dro...
Learn Complete Firebase Tutorial for Android App Development
rebrand.ly/qvc...
Learn Firebase Cloud Messaging & Android Notification Styles
rebrand.ly/qz0
Learn Android Responsive Layout Designing: Multiple Screen Sizes
rebrand.ly/g9k...
Learn App Localization in Android - Reach more users globally
rebrand.ly/0mk...

Пікірлер: 43
@fireicicle8379
@fireicicle8379 4 жыл бұрын
You saved my day bro..
@CalamityMitchell
@CalamityMitchell Жыл бұрын
Thank you so much for showing how to dynamically create views using sample
@tony119955
@tony119955 2 жыл бұрын
This video is pure gold!
@Lefinat
@Lefinat 3 жыл бұрын
Ohh this video deserves more, thanks a lot 😊🙏
@berenkanpak7375
@berenkanpak7375 3 жыл бұрын
When i close the app and run again these views disappear. How can i save them. sory I am new at this
@Nebrass_
@Nebrass_ 3 жыл бұрын
i think you need database like ROOM
@shubhamnaik1982
@shubhamnaik1982 3 жыл бұрын
Nice one sir, it really helped, Keep It Up 👍, A new Subscriber to you ✌
@sanjayk8360
@sanjayk8360 3 жыл бұрын
And can any say how to save instance state , views like this .. ?
@EGSniperShock
@EGSniperShock 3 жыл бұрын
very helpful thank you so much
@tentiatikaputri1421
@tentiatikaputri1421 3 жыл бұрын
Nice Video, Thank you. But do you know how to add views based on user input? For example, when we want to add detail passengers when booking a flight ticket, we input 2 passengers. Then, the detail form show up for 2 passengers.
@MahirSheikh
@MahirSheikh 3 жыл бұрын
very useful video, thanks alot
@aliciajohn5528
@aliciajohn5528 6 ай бұрын
Thank you so much!!!!🥰
@shubhamarora2505
@shubhamarora2505 3 жыл бұрын
hey bro, when i create any layout (.xml) and run on my device (emulator) that's not same as i designed. Like the design got scattered. What should i do so that it appears as same as activity showed in .xml ?
@entertainmentvib
@entertainmentvib Жыл бұрын
you have to set layout constraints bro , then only it will be the same
@ramadanntila4837
@ramadanntila4837 4 жыл бұрын
thanks bro u save my day
@berkekocaman5836
@berkekocaman5836 2 жыл бұрын
Thanks bro that was what i was looking
@dhanrajdesai3668
@dhanrajdesai3668 4 жыл бұрын
bro keep it up very nice channel
@mondjay1858
@mondjay1858 4 жыл бұрын
It helped me a lot, thank u so much!
@harshilvekariya7196
@harshilvekariya7196 4 жыл бұрын
Hiii bro great video
@muhammetalidivan
@muhammetalidivan 3 жыл бұрын
nice..... God sent you to me. thanks for everything....
@nancygupta3200
@nancygupta3200 3 жыл бұрын
can anyone tell me how to get ids for the layouts
@CookwithNahima
@CookwithNahima 2 жыл бұрын
what is written in the colors.xml? can you type it in the comment please?
@mahamudamoni6029
@mahamudamoni6029 3 жыл бұрын
how to fragment setup dynamic views add and remove. plz help me.
@bbigapp
@bbigapp 3 жыл бұрын
This good video, but you haven't implemented scroll bar.. With out that feature. We can't use it... Can you please make a video for adding the scroll bar for this item?
@proscawards3754
@proscawards3754 2 жыл бұрын
Just put your linearlayout within a scrollview...when overflow, you can then scroll automatically 🌝
@KimKim-dh2xk
@KimKim-dh2xk 4 жыл бұрын
Can you enable scroll feature with this code? I tried several methods but couldn't figure it out :(
@droidguru613
@droidguru613 4 жыл бұрын
Just put Linearlayout in NestedScrollview, it will do.
@Kristin-yf9rq
@Kristin-yf9rq 4 жыл бұрын
@@droidguru613 Put the LinearLayout in the Scrollview? Or put the Scrollview in the Linear Layout? I have tried both ways and nothing works. Would love to see a tutorial on it.
@keybarbarosa
@keybarbarosa 3 жыл бұрын
@@Kristin-yf9rq Wrap you linearLayout to scrollview - whatever is in scrollview and didn't get enough room to the screen it will add scroll feature.
@yesidmartins3918
@yesidmartins3918 3 жыл бұрын
amazing mate
@royarunava007
@royarunava007 3 жыл бұрын
thank you
@deependrabishwakarma4612
@deependrabishwakarma4612 2 жыл бұрын
how to get data from those added views ?
@ajeetpatel4054
@ajeetpatel4054 4 жыл бұрын
nice video
@project3149
@project3149 3 жыл бұрын
man you are dragon but i wish if there someone who speaks and or timestamp for every level
@spyboyyyyy
@spyboyyyyy 2 жыл бұрын
How to handle input
@ajeetpatel4054
@ajeetpatel4054 4 жыл бұрын
please send me code
@kennyroigarcia9584
@kennyroigarcia9584 2 жыл бұрын
Gold here!!
@p.jeevan2467
@p.jeevan2467 2 ай бұрын
Please use dark mode
@harshilvekariya7196
@harshilvekariya7196 4 жыл бұрын
Par kuch samaj nahi aaya mereko😫😫😓😓
@droidguru613
@droidguru613 4 жыл бұрын
Sometimes you might need add views dynamically to the list, like items with quantity and category, items in cart like that. It is useful at that time.
@androidjava4623
@androidjava4623 4 жыл бұрын
Como criar TextView dinamicamente por código java (em 2 min) How to create TextView dynamically programmatically in java (in 2min) kzbin.info/www/bejne/f5eZdoh_eamsoJo
@akshatjain9511
@akshatjain9511 6 ай бұрын
Bolke smzana hota hai, irritating gana laga diya sir dard krwa diya Ch#$ ne
@bohdanzdorovets2934
@bohdanzdorovets2934 3 жыл бұрын
Thanks a lot! Thats what i needed 🤌
LAYOUT BASICS AND LINEAR LAYOUT - Android Fundamentals
16:45
Philipp Lackner
Рет қаралды 117 М.
He bought this so I can drive too🥹😭 #tiktok #elsarca
00:22
Elsa Arca
Рет қаралды 53 МЛН
Whoa
01:00
Justin Flom
Рет қаралды 59 МЛН
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 36 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 1,2 МЛН
Rewrite React Native App
12:14
Hitesh Choudhary
Рет қаралды 71 М.
Building a scalable, modularized, testable app from scratch
21:31
Android Developers
Рет қаралды 175 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 136 М.
Support Multiple Screen Sizes - Android Studio Tutorial
8:20
Stevdza-San
Рет қаралды 98 М.
React Native vs Flutter in 2024 - Make the RIGHT Choice (Difference Explained)
10:31
Daniel Dan | Tech & Data
Рет қаралды 174 М.
Getting started with Firebase on Android
12:24
Firebase
Рет қаралды 89 М.
Foreground Services - Android Basics 2023
22:22
Philipp Lackner
Рет қаралды 78 М.
He bought this so I can drive too🥹😭 #tiktok #elsarca
00:22
Elsa Arca
Рет қаралды 53 МЛН