Support Multiple Screen Sizes - Android Studio Tutorial

  Рет қаралды 97,629

Stevdza-San

Stevdza-San

4 жыл бұрын

🏆 My Online Courses
⭐Discount Coupon: LAUNCH-STEVDZA-SAN
stevdza-san.com
🐱‍👤 Wanna become a member? Join!
/ @stevdzasan
📸 Instagram
/ stevdza_san
Android devices come in all shapes and sizes, so your app's layout needs to be flexible. That is, instead of defining your layout with rigid dimensions that assume a certain screen size and aspect ratio, your layout should gracefully respond to different screen sizes and orientations.By supporting as many screens as possible, your app can be made available to the greatest number of users with different devices, using a single APK.
And in this video I'm going to show you how your application can fit on different screen resolutions by creating layout files for each screen density.The pixel density is the number of pixels within a physical area of the screen and is referred to as dpi (dots per inch).
This is different from the resolution, which is the total number of pixels on a screen.To ensure that your layout is flexible and adapts to different screen sizes, you should use "wrap_content" and "match_parent" for the width and height of most view components, instead of hard-coded sizes.
Download Background Vector: bit.ly/3bmYeSK

Пікірлер: 102
@fatihmeric6990
@fatihmeric6990 4 жыл бұрын
I searched this for months but i didn't found it. Thank you very much for making this video. Sub and like!
@antomicawad6377
@antomicawad6377 4 жыл бұрын
Cool this is topic i have been waiting for !! Thank you
@MohammedMansour64
@MohammedMansour64 3 жыл бұрын
thank you sir , you're videos are very clear and straight to the point . keep going !
@hashimal-haddadi4877
@hashimal-haddadi4877 4 жыл бұрын
Brilliant , This is how tutorials should be
@joshuageorge7246
@joshuageorge7246 3 жыл бұрын
Very easy to understand! Thank you simplifying this topic
@hassesponnys8433
@hassesponnys8433 Жыл бұрын
Great video and a really professional info section. Great job my man
@hafizegungor2854
@hafizegungor2854 4 жыл бұрын
thank you it helped a lot!
@meetgurl
@meetgurl 2 жыл бұрын
This tutorial helps me a lot ! thank you sir!
@mouzinu
@mouzinu 2 жыл бұрын
Great tutorial, thank you so much!
@iszaffar
@iszaffar 4 жыл бұрын
Great video dude 👍🏽
@fernandocarlos9477
@fernandocarlos9477 4 жыл бұрын
so damn good tutorial sir, suscribed inmediatly, keep going!
@Robert723
@Robert723 3 жыл бұрын
Great video! Thanks a lot!
@begmyratmammedov9357
@begmyratmammedov9357 3 жыл бұрын
Brilliant! Thank you Sir
@benjaminjr.togonon3827
@benjaminjr.togonon3827 4 жыл бұрын
Thank for the Tutorial :)
@jumps63
@jumps63 4 жыл бұрын
Ne znam hoces li vidjeti komentar, ali pozdrav iz Hrvatske. Naisao sam slucajno na tvoj kanal i mogu ti reci samo nastavi!
@vuongqtvn
@vuongqtvn 3 жыл бұрын
Thank you nice tutorial keep it up
@vaibhavkumarpatel6863
@vaibhavkumarpatel6863 4 жыл бұрын
There is no other way to make the app responsive for all devices. I mean this is the long process to make the app responsive.
@ireshanadeeshani7534
@ireshanadeeshani7534 4 жыл бұрын
Thanks .Great video
@mehdigavanji5443
@mehdigavanji5443 2 жыл бұрын
Thank you so much
@md.asrafuzzaman1363
@md.asrafuzzaman1363 4 жыл бұрын
wow. That's amazing video... Thanks
@Arzacks
@Arzacks 4 жыл бұрын
Super fast but super good haha ! Thanks
@mahirbird9071
@mahirbird9071 4 жыл бұрын
Thanks for your great tutorials. Sub and like
@MyJuli1000
@MyJuli1000 3 жыл бұрын
Thanks dude
@yurandejesus7656
@yurandejesus7656 2 жыл бұрын
Awesome!
@Smietsde
@Smietsde Жыл бұрын
Thank you
@marsadch9397
@marsadch9397 4 жыл бұрын
Awesome video
@skaterope
@skaterope 4 жыл бұрын
perfect simple and clear !
@yerbolkabzitov9216
@yerbolkabzitov9216 4 жыл бұрын
Thanks!
@ilikecats45648
@ilikecats45648 3 жыл бұрын
Thank you so much, that really helped me understand what i was missing. Just one question, why you don't use any Density?
@mohammadjohari8074
@mohammadjohari8074 4 жыл бұрын
Thank you
@HARSHRANAYT
@HARSHRANAYT 3 жыл бұрын
thanks!
@windroid_
@windroid_ 4 жыл бұрын
I added all different screen sizes but when i run my project the main_activity.xml is never used! I tried multiple devices in the emulator but never managed to use it! should I delete the main_activity.xml ?!
@ValdaXD
@ValdaXD 3 жыл бұрын
Oh. A video in english. Take your like
@hex24
@hex24 4 жыл бұрын
Does wrap-content, match-parent, weights usage will prevent from using differend layout?
@xphis0528
@xphis0528 Жыл бұрын
great video! Question How does a device know which layout file to display? Do I need to program that logic in the kotlin file?
@neohezzy2799
@neohezzy2799 3 жыл бұрын
Why not choose the any density option when creating activities with the same same background so as to avoid maximizing and minimizing?
@bboydarknesz
@bboydarknesz 4 жыл бұрын
Soo.. If we want to add new / modified View, we do the same things many times? 🙊🙊🙊
@superno1bidi
@superno1bidi 4 жыл бұрын
Sir make a video on searchview on recycleview
@haithamwehbi6552
@haithamwehbi6552 3 жыл бұрын
whats the difference between density and size when you create new xml file?
@Goad2
@Goad2 5 ай бұрын
So when I make any update to the app I need to do manually for all the device resolutions?
@aritrabhattacharya7722
@aritrabhattacharya7722 4 жыл бұрын
great tutorial. But wouldn't it be better to use ratios and constraints along with vector drawables rather than creating same screen for each dpi? In that way the UI will always scale according to the ratios and fit all devices
@StevdzaSan
@StevdzaSan 4 жыл бұрын
Yes, but sadly that's not enough on more complex layouts.
@cyrillebournival2328
@cyrillebournival2328 Жыл бұрын
I would say the same but knowing this option exist and how to use it might be helpful.
@muzamilhaq7411
@muzamilhaq7411 3 жыл бұрын
which is best multi screen size, Smallest widht (SW600),or Density
@alekseimulin6151
@alekseimulin6151 3 жыл бұрын
Really curious what is the program name used to export to SVG?
@pradeepkumarreddykondreddy7048
@pradeepkumarreddykondreddy7048 4 жыл бұрын
Is this the only solution for supporting multiple screen sizes ?
@StevdzaSan
@StevdzaSan 3 жыл бұрын
You can also create multiple dimens xml files for various margin sizes.
@mayank9266
@mayank9266 3 жыл бұрын
@@StevdzaSan plz provide
@christoffere425
@christoffere425 3 жыл бұрын
I did it using only weights.
@maheshmahadar4780
@maheshmahadar4780 Жыл бұрын
We can use multiple dimen files instead of multiple layout files
@terlanabaszade9221
@terlanabaszade9221 2 жыл бұрын
Hello bro. Please help me. How can i calculate all dps in the each layout file??
@princeampofo9056
@princeampofo9056 4 жыл бұрын
Awesome this is a very useful video, please can you make a video on how to upload list of images to firebase
@StevdzaSan
@StevdzaSan 4 жыл бұрын
I'm planning to make a full course for Firebase realtime database and firestore in the future.
@princeampofo9056
@princeampofo9056 4 жыл бұрын
@@StevdzaSan I really appreciate you replying....Thanks
@artemii8672
@artemii8672 3 жыл бұрын
Hello, what i need to do with a lot of xml files? add one by one?
@RajeshYadav-zv2uo
@RajeshYadav-zv2uo 3 жыл бұрын
Which site use for design please asked
@chechent3706
@chechent3706 4 жыл бұрын
excellent work, could you tell me the name of the software I use to design in the background vector?
@StevdzaSan
@StevdzaSan 4 жыл бұрын
Adobe Xd
@rexwan561
@rexwan561 3 жыл бұрын
How can I handle same density with different screen size?
@sabrinafeliz4822
@sabrinafeliz4822 3 жыл бұрын
Hello sir i need to Know how to résolve the same problem but the view (table. Button) are create programmatically please help me
@cristimanolache5890
@cristimanolache5890 3 жыл бұрын
If I have five interfaces is this method efficient?
@radhiosoftifybd8982
@radhiosoftifybd8982 3 жыл бұрын
Damn!
@deepakshetter6504
@deepakshetter6504 Жыл бұрын
What to do when two phones with the same density have different screen sizes?
@raihanchaira9653
@raihanchaira9653 5 ай бұрын
I wanna ask something, is that not make the code boilerplate??
@hakimapg
@hakimapg Жыл бұрын
very informative, but you are making login screen three times right? that sound so not efficient when building a big app.
@mw9463
@mw9463 3 жыл бұрын
thanks for the video :) I have one question. Is it really important to save background file as .svg? Won't it work on .png?
@StevdzaSan
@StevdzaSan 3 жыл бұрын
Using vectors has many benefits, less apk size, pixel perfect images and better performance.
@mw9463
@mw9463 3 жыл бұрын
@@StevdzaSan Thanks for answer. So I'm gonna make some changes in my app !
@bboydarknesz
@bboydarknesz 4 жыл бұрын
Umm,, how did you handle image size that come from api? Maybe like for a banner? It usually have fixed height in android. What is the better solution for this? Thanks
@StevdzaSan
@StevdzaSan 4 жыл бұрын
Use glide library. I have made a video about that
@rizkiadisaputra5971
@rizkiadisaputra5971 4 жыл бұрын
how did you know, if nexus S using High density not XXX-Density, how do you check it ?
@Blackops1990
@Blackops1990 3 жыл бұрын
In Device Manager it tells you under resolution
@ramukattimani
@ramukattimani 2 жыл бұрын
What does error "E/MultiWindowProxy: getServiceInstance failed!" mean? please help me regards this
@kkiran-zk8ed
@kkiran-zk8ed 3 жыл бұрын
Why can't you use different dimensions based on density
@un_known7299
@un_known7299 4 жыл бұрын
Should I repeat this method for any layout for example if I made Recycleview when I made the custom layout for it should I make it 4 times hdpi and xhdpi ...
@gajendrapandeya5081
@gajendrapandeya5081 3 жыл бұрын
Basically recycler view fits well in all devices. You have to worry about your startup Screens
@un_known7299
@un_known7299 3 жыл бұрын
@@gajendrapandeya5081 thanks bro 🌹
@MrIMacro
@MrIMacro 3 жыл бұрын
Thanks, but why don't you just export from xd for Android. It will export that background in different resolutions, and will also do everything for you.
@Thiago-vw4vl
@Thiago-vw4vl 3 жыл бұрын
Tell me more, please?
@durgeshsawant497
@durgeshsawant497 3 жыл бұрын
So if u have 20 screens you create 60 xmls to support those 3 densities .. Is there a way we don't have to go through this tedious process
@StevdzaSan
@StevdzaSan 3 жыл бұрын
Other way is to declare different size values in dimens.xml. Each dimens.xml with different qualifier like in layouts.
@arqamsidd
@arqamsidd 4 жыл бұрын
Nice, so we always have to make different XMLs to support multiple DPIs There's no special layout (relative, linear etc) which would adjust the layout according to screen size?
@StevdzaSan
@StevdzaSan 4 жыл бұрын
Well you could use match parent for a view instead of using fixed dimensions, that way the view will expand everytime your app is running of different screen sizes or even on landscape mode. However for more complex layouts you would use multiple layout files.
@sachinsrivastava2056
@sachinsrivastava2056 4 жыл бұрын
Having images of all dpi's VS creating multiple screen size layout.....which one is bettter or which one should be used at which moment
@StevdzaSan
@StevdzaSan 4 жыл бұрын
Multiple layouts and preferably vector assets.
@sachinsrivastava2056
@sachinsrivastava2056 4 жыл бұрын
@@StevdzaSan I'm confused when to use all pixel size images and when to use multiple layout for single screens
@AllmightC94
@AllmightC94 4 жыл бұрын
I have 2 devices with different sizes but they both have the same xhdpi , when i run my app they look different different, why is that, help please
@StevdzaSan
@StevdzaSan 4 жыл бұрын
For more info, read this: developer.android.com/training/multiscreen/screensizes
@ireshanadeeshani7534
@ireshanadeeshani7534 4 жыл бұрын
@ Brian Puron, same problem is occured me.were you able to resolve it?.if you have an idea help me.
@ayushraj5672
@ayushraj5672 2 жыл бұрын
In which software did you create you design 0:09 . Kindly reply with the name of that software as soon as possible...
@NETHRANKUMARASWAMYSWB
@NETHRANKUMARASWAMYSWB 2 жыл бұрын
Adobe xd
@contractcenter965
@contractcenter965 3 жыл бұрын
What the application name?
@crazycock2263
@crazycock2263 Жыл бұрын
The file is no longer available
@mockingspyhd6099
@mockingspyhd6099 3 жыл бұрын
Guys, I have created Low Density, then I install 2 device which is LDPI, but each other have different layout design and didn't match the layout which I created. why? how support all resolutions?
@mockingspyhd6099
@mockingspyhd6099 3 жыл бұрын
P.S I have RecyclerView which I want to show current DPs on the screen
@marc988
@marc988 2 жыл бұрын
You sure are teaching us great stuff and thanks but... do we have to do that for every single xml layout that will be shown in our app? 🙄 is there any way to make this automatically?
@abhilashdharavath6901
@abhilashdharavath6901 4 жыл бұрын
So the question is, which screen you gonna publish to playstore? I don't think it's the right solution.
@StevdzaSan
@StevdzaSan 4 жыл бұрын
Among many different layouts, Android OS automatically choses the right one for your smartphone.
@edmoods
@edmoods 3 жыл бұрын
Would've been better without the music. It's distracting
@comiccoder9257
@comiccoder9257 4 жыл бұрын
First viewer
@shakilahmed6870
@shakilahmed6870 3 жыл бұрын
you just messed up the tutorial...remember not everyone is expert as you
@GalesGames69
@GalesGames69 3 жыл бұрын
????
Implementing Android apps for all screen sizes
13:53
Android Developers
Рет қаралды 33 М.
How to Support ALL Screen Sizes on Android - Full Guide
19:10
Philipp Lackner
Рет қаралды 111 М.
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 20 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 15 МЛН
Layouts in Android Studio (XML) | Android UI Design Explained
1:04:41
How to Support All Screen Sizes in Jetpack Compose
11:57
Philipp Lackner
Рет қаралды 28 М.
Motion Layout in Action | Android Studio Tutorial
14:19
Stevdza-San
Рет қаралды 69 М.
Most overpowered way to build mobile apps?
8:33
Beyond Fireship
Рет қаралды 737 М.
Navigation Component - Android Studio Tutorial
12:11
Stevdza-San
Рет қаралды 171 М.
Build Android UIs for any screen size
34:43
Android Developers
Рет қаралды 54 М.
Adaptive layout (Адаптивная верстка) в Android Studio
14:37
Андрей Яшев
Рет қаралды 5 М.
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 20 МЛН