No video

Drag/Move views around the screen in Android Studio || Dragging Views with MotionEvent | Custom View

  Рет қаралды 14,159

Hamza Rehman

Hamza Rehman

Күн бұрын

Welcome to an Android Studio tutorial that will take your app development skills to the next level! In this video, we'll dive deep into the world of MotionEvent, teaching you how to effortlessly drag any views around the screen. Whether you're working with ImageView, custom views, TextView, buttons, or any other view, this tutorial has you covered.
Key Takeaways:
Learn how to use MotionEvent to enable smooth view dragging.
Implement onTouchEvent in your custom views for precise control.
Enhance user interaction and experience in your Android apps.
Boost your Android Studio proficiency with practical examples.
🚀 Timestamps:
00:00 - Introduction to MotionEvent and Its Power
01:45 - Setting Up Your Android Studio Project
03:20 - Coding the Touch Listener for ImageView
05:10 - Implementing MotionEvent for Custom Views
08:05 - Fine-Tuning the Dragging Behavior
10:30 - Testing and Debugging Your Interactive App
12:15 - Pro Tips and Best Practices
13:45 - Subscribe to My Channel for More Tutorials!
📚 References:
Android Developer Documentation: MotionEvent and Touch Events
ZDNet Article: How to Use Multi-Touch in Android - Part 6
👍 If you found this video helpful in mastering Android Studio and enhancing your app's user experience, please consider subscribing to my channel for more insightful tutorials.
Additional Tags and Keywords:
Android Studio tutorial, Dragging Views with MotionEvent, Custom Views, Android app development, Touch Listener, Interactive Apps, User Experience, Android Development Tips, Android Programming, Android Studio Tips, Mobile App Development

Пікірлер: 34
@saiganesh9081
@saiganesh9081 10 ай бұрын
Super vedio bro thanks
@hamzarahman555
@hamzarahman555 10 ай бұрын
Welcome, Subscribe the channel
@truongvancong7659
@truongvancong7659 Жыл бұрын
Perfect, you saved me many time!!!!
@mahmood466
@mahmood466 3 жыл бұрын
Thank you sir, I just really appreciate what you described in a much simpler way, I've watched lot's of videos regarding to this, but bro this is the best one. Thanks again. Keep going!!! ❤
@hamzarahman555
@hamzarahman555 3 жыл бұрын
Thanks
@albertswinkels
@albertswinkels 3 жыл бұрын
Txxx! ... just what I needed. In addition to develope web-applications, I also want to learn more about Java for creating Android applications. After following a KZfaq basic course last week, this is a good case to continue.
@nullfing
@nullfing Жыл бұрын
Thanks for saving my time ✌
@diyshow888
@diyshow888 3 жыл бұрын
Awesome ! thanks for the tutorial, I came from iOS , this drag and move tutorial is exactly what I want (I'm trying to move my app from iOS to Android)
@jcayournewstyle182
@jcayournewstyle182 2 жыл бұрын
very good video, thank you very much for uploading it
@DS_GAMING_7669
@DS_GAMING_7669 Жыл бұрын
Nice... To the point tutorial...
@techsmash5923
@techsmash5923 3 жыл бұрын
You are really Awesome bro! just 4 minutes u done !! amaizing
@hamzarahman555
@hamzarahman555 3 жыл бұрын
Haha thanks
@kevin-qu1bh
@kevin-qu1bh Жыл бұрын
Thank you !!!
@Abdulrahman-uk9ny
@Abdulrahman-uk9ny Жыл бұрын
wow this is the best video :)
@8animer889
@8animer889 3 жыл бұрын
can we set boundaries so it won't go outside of the screen?
@PashtoEnglishTranslation
@PashtoEnglishTranslation 4 жыл бұрын
👨‍💻 you nailed it, man !
@hamzarahman555
@hamzarahman555 4 жыл бұрын
Thank you
@gahaakil8787
@gahaakil8787 2 жыл бұрын
Your are awesome bro
@hamzarahman555
@hamzarahman555 2 жыл бұрын
Thank you subscribe for more video
@NickProkhorenko
@NickProkhorenko Жыл бұрын
Its working on buttons and images, but not on layouts. I have nothing to answer when try to touch and drag constraint layout(i also try to put linear layout). Why is it happening? Touch goes through layout and it not processing?
@golfclashdz6580
@golfclashdz6580 3 жыл бұрын
Thanks, i need a code for seekbar when I move my finger in the screen it shows the percentage in seekbar can you help me please 🙏
@pavanisindhura7559
@pavanisindhura7559 3 жыл бұрын
Can you share the logic for undo and redo the position of the image? I have been searching for it for a long time.
@ashimghoshfm
@ashimghoshfm 2 жыл бұрын
In Android Studio software,,, "Devices for preview" option,, when I specify custom option, there is only drag optipon to change height+weight... But I m looking for "custom Resolution typing" option... I want to view with (720*1440px) but I can't able to do so.... help me plz
@mushoniko
@mushoniko 3 жыл бұрын
thank you so much... is this good for animated gifs too? can i do set/getX and set/getY on it too? love the music by the way..
@carlor4791
@carlor4791 2 жыл бұрын
god damm bgm.
@hamzarahman555
@hamzarahman555 2 жыл бұрын
Thank you
@mushoniko
@mushoniko 3 жыл бұрын
thank you so much... is the good for animated gifs too? can i do set/getX and set/getY on it too? love the music by the way...
@rudreshsp3236
@rudreshsp3236 2 жыл бұрын
is it possible to drag within a fixed parent layout..??? not to entire view as here..
@brayn7504
@brayn7504 Жыл бұрын
Hello can we achieve the same using drag and drop using ondraglistener? I want to achieve the same but couldn't do it as smoothly as this video. So my question is, is it because I am using the same container and moving the view within same container?
@s.parvez061
@s.parvez061 3 жыл бұрын
how to set click event in drag button???
@madguy1967
@madguy1967 3 жыл бұрын
Bro I want to drag it on touch but it should reach it's mean position when we leave the image view how we can do it bro
@aryanbhaskar7872
@aryanbhaskar7872 2 жыл бұрын
What is the name of Bgm music ......plzzzz
@abhishektripathi6957
@abhishektripathi6957 2 жыл бұрын
@Hamza Rahman bhai aapka code use karne pe bilkul sahi chal raha hai bs ek issue aa raha hai mera view drag karne par screen ke bilkul baher chala ja raha hai agar mai screen ki edge baher ki taraf jyada scroll kar du to, please bhai bs itna bata do ki mujhe mera view meri screen ki edge ke ander hi scroll karna hai uske baher na jai to kya karna padega please reply thanks in advance
@hamzarahman555
@hamzarahman555 2 жыл бұрын
03178127045 Send me TeamViewer id on this
FRAGMENTS - Android Fundamentals
17:29
Philipp Lackner
Рет қаралды 326 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 94 М.
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2,3 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 11 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 132 М.
Drag and drop Reorder in Recycler View | Android
7:05
Mafia Codes
Рет қаралды 32 М.
Highlight, Move, and Swipe RecyclerView with ItemTouchHelper
21:03
CodingWithMitch
Рет қаралды 26 М.
How ChatGPT Built My App in Minutes 🤯
8:28
Website Learners
Рет қаралды 2,2 МЛН
Android App Development Tutorial 16: OnTouchListener And Motionevent
19:29
Android Gestures: Getting Started
19:16
CodingWithMitch
Рет қаралды 54 М.
How to Make a FAB Explosion Animation - Android Studio Tutorial
15:15
Philipp Lackner
Рет қаралды 27 М.