Android Infinite Auto Image Slider Using View Pager 2 | Android Studio | Java

  Рет қаралды 112,005

Chirag Kachhadiya

Chirag Kachhadiya

Күн бұрын

Пікірлер: 167
@shanthegamemaker958
@shanthegamemaker958 3 жыл бұрын
Thank you sooooo muchhhh bhai.... It's working... m sooo happy...it's help me.lott...
@someshsahu4638
@someshsahu4638 2 жыл бұрын
Nice explanation thankyou so much 🙏🏼🙏🏼🙏🏼
@Rabbits_Tech
@Rabbits_Tech 2 жыл бұрын
finally after 10+ tutorials i got the best video.. keep it up boss
@vishnusharda
@vishnusharda 4 жыл бұрын
Greate sir you tutorial really help us 😍😍😍😍
@jeanclayvieiracosta
@jeanclayvieiracosta 2 жыл бұрын
Thanks for you tutorial. Solved my problem.
@tomas.menniti
@tomas.menniti 3 жыл бұрын
You helped me a lot. Thanks so much for sharing!
@nerox8580
@nerox8580 2 жыл бұрын
Thank you very much for this tutorial it was really useful in my project.
@Astartes-lo1cx
@Astartes-lo1cx 2 жыл бұрын
Thanks. For me it was helpfull.
@eumproject2775
@eumproject2775 2 жыл бұрын
It is really amazing and very helpfull
@arazguliyev9043
@arazguliyev9043 2 жыл бұрын
Good Job man you helped me
@badal3187
@badal3187 3 жыл бұрын
This video helped me to fulfil my desired intention. Thanks a lot.
@amirtashakkori4162
@amirtashakkori4162 8 ай бұрын
Thanx, it helped alot ❤️‍🔥
@himanshuvaghela07
@himanshuvaghela07 4 жыл бұрын
Superb as always. You nailed it bro!! Keep posting. I'm your big fan👍
@danisegabrieldeperio7434
@danisegabrieldeperio7434 4 жыл бұрын
Thank you for this tutorial Quetion: How to add indicator below the view pager 2?
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
For that, you can go through following video Android Onboarding Screens Using ViewPager2 | Android Studio | Java kzbin.info/www/bejne/nqPEe2ufiZ2jpJI
@ritikagupta5600
@ritikagupta5600 3 жыл бұрын
thank you very much for this video.. it works like charm :)
@bishalmaji9586
@bishalmaji9586 3 жыл бұрын
Sir ,we can set loop to view pager in this way also - private final Runnable slideTransorm=new Runnable(){ ... ... Public void run(){ if(viewPager2.getCurrentItem==sliderItem.size()-1){ viewPager2.setCurrentItem(0); } else{ viewPager2.setCurrentItem(viewPager2.getCurrentItem+1); } }
@fahadammar7585
@fahadammar7585 2 жыл бұрын
Good tutorial. Kindly share the code (github etc) I will be really thankful. Looking forward to the reply.
@surflaweb
@surflaweb 4 жыл бұрын
thanks so much.. it works according to this tutorial.. great content great video!!
@조수민-y7s
@조수민-y7s 4 жыл бұрын
thank you so much, this is amazing! but is there a way to show both photos at the side with the first photo? so that it really seems like an infinite loop from the beginning?
@kimberlysimonton4973
@kimberlysimonton4973 4 жыл бұрын
man! why does android studio gotta make it so much code to just scroll images?!? great video btw
@nikhilpatil6185
@nikhilpatil6185 3 жыл бұрын
Thx buddy ..it helps me alot ❤️
@parthudawant7015
@parthudawant7015 3 жыл бұрын
Is there any way to start the app with the middle element focused and then the user can scroll in both directions left/right?
@adolfochavez2021
@adolfochavez2021 4 жыл бұрын
Thanks, it helped me a lot.
@Anonymous-hg2ky
@Anonymous-hg2ky 3 жыл бұрын
Best of best
@alirezaaraby
@alirezaaraby 4 жыл бұрын
Realy Helpful, Good Job.
@riturajsaha7831
@riturajsaha7831 4 жыл бұрын
thanks a lot for the tutorial...
@readmoreapp
@readmoreapp 2 жыл бұрын
Thanks. It was very helpful :)
@snehalmishra5429
@snehalmishra5429 4 жыл бұрын
Thank you for the tutorial, it worked perfectly keep it up Please make a video on How to apply on click listeners on these images
@sumitmishraclass930a3
@sumitmishraclass930a3 4 жыл бұрын
Best tutorial sir
@afreensworld786
@afreensworld786 3 жыл бұрын
Awesome, Is it possible possible use video instead of image.
@ratulmondal7154
@ratulmondal7154 Жыл бұрын
you save my life ;)
@CW_Tech_Gujarati
@CW_Tech_Gujarati 3 жыл бұрын
thank you so much for this tutorial. Please can you tell me how to do this using internet..?(Online image)
@chcoucoulamine6024
@chcoucoulamine6024 4 жыл бұрын
Hi, thanks a lot for that explanation, can we create button in the main activity to go to a specific slide?
@mrwaseemmalik5766
@mrwaseemmalik5766 4 жыл бұрын
Great video btw in my case images are streaching from top and bottom.
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
Set scale type to center crop on image view in layout.
@WidliAlfajar
@WidliAlfajar 4 жыл бұрын
Beautiful, really.. Can share the source code sir? I test your code, it's working, but, image to image to far, why?? The code same with you, images too (potrait)
@triaro
@triaro 4 жыл бұрын
same issue man
@phonegames2857
@phonegames2857 4 жыл бұрын
thank you so much evrything work amazing thx again
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
Thank you very much for watching.
@nurbakytorynbayeva3562
@nurbakytorynbayeva3562 4 жыл бұрын
The best tutorial ! thank you !
@yerlikacovv8674
@yerlikacovv8674 3 жыл бұрын
Thank you for this tutorial :) :) :) I have a question : how i can add slider click event ?
@shanthegamemaker958
@shanthegamemaker958 3 жыл бұрын
Can I ask any query .. about android..??
@topanime7563
@topanime7563 3 жыл бұрын
Thanks for the tutorial, but what should I do if I want to click the image to open up another Activity? Thank you
@AmitKumarGrrowingSlow
@AmitKumarGrrowingSlow 4 жыл бұрын
Looks like you are underrated
@AmaliaDevCode
@AmaliaDevCode 3 жыл бұрын
Thank you for the tutorial mate!
@hamzakhalil5527
@hamzakhalil5527 4 жыл бұрын
I was looking for same thing Thanku ❤
@codewithmi7749
@codewithmi7749 3 жыл бұрын
hy bro can u give me idea my viepager work but images on sides not show?
@grdfirst6050
@grdfirst6050 3 жыл бұрын
nice it work, please how can i set the image on the top of activity and not in the center? will be glad for your Replay. thanks
@fintechsoftsolutiondelhi8913
@fintechsoftsolutiondelhi8913 3 жыл бұрын
This save my day
@forrestxu5291
@forrestxu5291 3 жыл бұрын
one concerns. sliderItems.addAll(sildeItems) takes more memory. Can we have alternative solutions?
@olivercortes4542
@olivercortes4542 2 жыл бұрын
you need to changer the getandset class, for a array type int. this array having all the imagen of type drawable, your constructor is necessary change to list to array tipy int[
@learnliveimproverepeat...6522
@learnliveimproverepeat...6522 4 жыл бұрын
sir,please add voice when you are writing the code!!!
@vivekyadavf
@vivekyadavf 4 жыл бұрын
🤣🤣Best answer...😂😂
@aminshabaninejad457
@aminshabaninejad457 4 жыл бұрын
Thanks for your tutorial. It was very useful to me. but I want to know how can I change the alpha of next and previous items?
@wilsonofcanada
@wilsonofcanada 3 жыл бұрын
Other than text and images, can you place buttons or edittext in a page?
@user-yi9pq9sl6z
@user-yi9pq9sl6z 2 жыл бұрын
Great.
@agsdeathnote
@agsdeathnote 4 жыл бұрын
I loved it, can you upload the project to download it? please
@SandeepKumar-ov6fl
@SandeepKumar-ov6fl 4 жыл бұрын
Sir Mai chahta hu ki recycler view item Ko click krne pe viewpager open ho or clicked item viewpager me show ho. Pls ek video banaye 👏👏👏
@wilsonsim22
@wilsonsim22 4 жыл бұрын
Thank you sir!
@seyedsabbagh704
@seyedsabbagh704 4 жыл бұрын
veeeerrrryyyyyyyyyyyyyyyyyyyyyyyyyyyyyy niiiiiiiiiiccccccccceeeeeeeeeeeee
@ballerzer0
@ballerzer0 4 жыл бұрын
thanks for the tutorial I exactly followed the code but and also I copy the sizes of these 5 images but when I run the code the height of the images are too small how can I adjust the height so that I can see the images clearly.. thanks for the response
@FarhanAhmed-hs2vd
@FarhanAhmed-hs2vd 4 жыл бұрын
there is a glitch, the view doesn't scale and translate properly. if you scroll to last item and then remove item from dataList inside adapter and call notifyItemRemoved()
@grdfirst6050
@grdfirst6050 3 жыл бұрын
Awsome
@badadinfanti4553
@badadinfanti4553 4 жыл бұрын
What about removing items? Are you aware that item count is increasing 2x each time? What about performance?
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
Yes, you are right, if you have large number of items then infinite facility is useless. And if user swipe to the end then only we are increasing items not before. And average user will see 2-3 times whole items not more. If you really care about performance then you should remove auto sliding facility as well. Or suggest better solution in this comment section.
@Crabgore
@Crabgore 4 жыл бұрын
How can i mix videos and images using this code? And stop sliding while video is playing? and then start sliding again when video stops?
@parisahazhirghader5539
@parisahazhirghader5539 4 жыл бұрын
that was really good
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
Thank you very much for watching.
@akashde8919
@akashde8919 3 жыл бұрын
@@chiragkachhadiya bro plz talk in your video it makes more understandable
@alfredoherrera933
@alfredoherrera933 3 жыл бұрын
I want to do the same but with cardview instead of the images, could it be? could you help me please
@catkot8184
@catkot8184 4 жыл бұрын
awesome 😍👍
@artemcheck6332
@artemcheck6332 4 жыл бұрын
Hello! Thank you for tutorial. I have a question. Right page smaller then left page? How i can fix it?
@heetshah3033
@heetshah3033 4 жыл бұрын
the images you are taking set those images of same height and width your problem will be solved
@emremuslu7763
@emremuslu7763 4 жыл бұрын
Thank you.
@hungmai1059
@hungmai1059 2 жыл бұрын
thank you so much, can you send me project's github?
@RobertoMendezDominguez
@RobertoMendezDominguez 4 жыл бұрын
Thanks a lot for the tutorial, but may I ask you a question. Is it possible to slow down the speed transitioning? I've read that is not possible, but do you know how we can achieve the same behavior having a slow speed between transtions? Thx in advance!
@feryeho3171
@feryeho3171 4 жыл бұрын
mantap mastah
@shagidaniyarow9445
@shagidaniyarow9445 2 жыл бұрын
thank you bro
@franciscogautero3919
@franciscogautero3919 3 жыл бұрын
thank u men, i love u
@عربيانسان
@عربيانسان 4 жыл бұрын
so what is the deference between view pager 1 .. and 2 ?
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
ViewPager2 is the replacement of ViewPager and is much better. The biggest change in the ViewPager2 API is that it now uses the RecyclerView. You can read more about it here: developer.android.com/jetpack/androidx/releases/viewpager2
@jimmywong6082
@jimmywong6082 4 жыл бұрын
graet and thanks!!
@shreyasmookamale5891
@shreyasmookamale5891 3 жыл бұрын
Sir when we move to other activity this slider disappears how to resolve that because i want it to be running when i come back to this activity
@gilsonjuniorpro
@gilsonjuniorpro 4 жыл бұрын
Awesome! 👊🏼
@DenMaxProd
@DenMaxProd 4 жыл бұрын
Thanks for tutorial. Could you please make it in Kotlin
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
Sure, I will. Mean while you can check this related tutorial : kzbin.info/www/bejne/gajMmZx3ebNgZs0
@karuneshpalekar5212
@karuneshpalekar5212 3 жыл бұрын
How to stop the auto scroll on touch interception ? Any workaround ?
@FlakronSaidi
@FlakronSaidi 3 жыл бұрын
Can you help me with landscape mode, to show pages like that ?
@FGPT
@FGPT 4 жыл бұрын
does the runnable thread causes performance issues in production app
@nikhilpatil6185
@nikhilpatil6185 3 жыл бұрын
Bro I have a problem how can I adjust my image size cuz when my image size is big it shows big over screen ....if any plzz suggest
@vishnusharda
@vishnusharda 4 жыл бұрын
Sir please tell me we can use for showing product images in it 🙏🏼
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
Yes
@adityaroy1851
@adityaroy1851 2 жыл бұрын
Sir make android carousel recyclerview tutorial in kotlin
@potterhuy7112
@potterhuy7112 4 жыл бұрын
Thank you for tutorial. Questition: How to show 5 item in screen . i don't know. i can show 3 item in screen with Transformer. help me.
@friendinneedfriendindeed7467
@friendinneedfriendindeed7467 4 жыл бұрын
You should have used any other image , my parents are staring at me...Anyway Useful one..Thanks
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
😅🤣
@orang.gabut404
@orang.gabut404 4 жыл бұрын
Halo, this is great tutorial, thanks. can i get source code? please
@angelmauriciorivas6160
@angelmauriciorivas6160 3 жыл бұрын
LO ESTAS FELICITANDO Y ENTONCES SI YA PROBASTE EL CODIGO PARA QUE LO QUIERES?
@macyso8244
@macyso8244 3 жыл бұрын
I don't know why but it is not working for me, can I send you my doc and you cna check it out what happen ?
@kadiroguzyetis8611
@kadiroguzyetis8611 3 жыл бұрын
I wanna new activity intent when click an image , how can ı do?
@amrashraf170
@amrashraf170 4 жыл бұрын
Thank you for your tutorial but it's lagging when i swipe why does this happen ?
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
May be the resolution of images you are using. Try to load images with small resolution or small images.
@amrashraf170
@amrashraf170 4 жыл бұрын
@@chiragkachhadiya ok thank you sir
@maulanaakbar2889
@maulanaakbar2889 3 жыл бұрын
where does the sliderHanlder come from ?
@danishshakeel9404
@danishshakeel9404 4 жыл бұрын
When i try to add images in main activity it gives the error constructor slideritem in class slider item cannot be applied reason actual and formal argument lists differ in length
@nastyador9022
@nastyador9022 4 жыл бұрын
+
@jesusdev4272
@jesusdev4272 3 жыл бұрын
Can you share the source code on github?
@YayanAgustyan
@YayanAgustyan 4 жыл бұрын
how to add the indicator, like a dot indicator, etc.
@_T_Ashish
@_T_Ashish 3 жыл бұрын
How can we get the images from a folder instead of drawables?
@rizkyalkusaeri
@rizkyalkusaeri 4 жыл бұрын
Sir, how can i explain it to drop this at the bottom an display the picture at fragment
@purushothamp6641
@purushothamp6641 4 жыл бұрын
(at 7.30Sec) SliderItem class ViewPager2 is defined but you are not used that..Please verify. Could you please forward this code
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
Both are used, please watch full video carefully.
@williamwanderify
@williamwanderify 4 жыл бұрын
Hello all right, look you could not provide the funte code of the app, just for me to make corrections, thanks
@amankhandelwal423
@amankhandelwal423 4 жыл бұрын
thankx bro
@andreasantanaa9144
@andreasantanaa9144 4 жыл бұрын
How to get image from api, i have an api but i dont know how to use that, how to get the image from my database using api. Please tell me how 🙏
@lazzyengineer8253
@lazzyengineer8253 4 жыл бұрын
sir, please tell how i can load the images direct from the internet??
@pathor7265
@pathor7265 4 жыл бұрын
Using Picasso library . That's the easiest way. All you need is the url of that image
@idedhica
@idedhica 4 жыл бұрын
im using kotlin, and i follow your code .. but the infinite swipe is not working ... in Adapter, addAll() is not available .. i have to convert it into toMutableList(), but still not working... how to solve that ..??
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
Try casting list to Array List some thing like this (dataItems as ArrayList).addAll
@idedhica
@idedhica 4 жыл бұрын
@@chiragkachhadiya alright oits working .. thank you ... but if i want to add dots on the sliding .. i also has to make function in adapter right ..??
@chiragkachhadiya
@chiragkachhadiya 4 жыл бұрын
For indicators, you can follow this tutorial which is already in kotlin: kzbin.info/www/bejne/gajMmZx3ebNgZs0
@FarhanKhan-vq9fs
@FarhanKhan-vq9fs 4 жыл бұрын
Can you make a tutorial google photo api
@poojacuelix5823
@poojacuelix5823 2 жыл бұрын
how to click on slider viewpager get current position click in android
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 2,8 МЛН
Walking on LEGO Be Like... #shorts #mingweirocks
00:41
mingweirocks
Рет қаралды 5 МЛН
Building a Mobile App in 2024: The BEST Technologies
13:31
Dan Ilies
Рет қаралды 87 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 142 М.
DRM explained - How Netflix prevents you from downloading videos?
18:17
Mehul - Codedamn
Рет қаралды 184 М.
Android Onboarding Screens Using ViewPager2 | Android Studio | Java
35:05
Chirag Kachhadiya
Рет қаралды 46 М.