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

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

Hamza Rehman

4 года назад

14,216 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@saiganesh9081
@saiganesh9081 - 26.09.2023 12:45

Super vedio bro thanks

Ответить
@brayn7504
@brayn7504 - 23.06.2023 04:36

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?

Ответить
@nullfing
@nullfing - 19.03.2023 19:44

Thanks for saving my time ✌

Ответить
@DS_GAMING_7669
@DS_GAMING_7669 - 24.01.2023 18:04

Nice...
To the point tutorial...

Ответить
@kevin-qu1bh
@kevin-qu1bh - 23.01.2023 16:56

Thank you !!!

Ответить
@truongvancong7659
@truongvancong7659 - 17.01.2023 15:40

Perfect, you saved me many time!!!!

Ответить
@Abdulrahman-uk9ny
@Abdulrahman-uk9ny - 05.01.2023 19:39

wow
this is the best video :)

Ответить
@NickProkhorenko
@NickProkhorenko - 29.12.2022 00:16

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?

Ответить
@abhishektripathi6957
@abhishektripathi6957 - 29.07.2022 14:53

@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

Ответить
@aryanbhaskar7872
@aryanbhaskar7872 - 08.05.2022 13:20

What is the name of Bgm music ......plzzzz

Ответить
@ashimghosh3808
@ashimghosh3808 - 17.03.2022 14:47

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

Ответить
@rudreshsp3236
@rudreshsp3236 - 17.02.2022 10:28

is it possible to drag within a fixed parent layout..??? not to entire view as here..

Ответить
@jcayournewstyle182
@jcayournewstyle182 - 18.12.2021 01:04

very good video, thank you very much for uploading it

Ответить
@carlor4791
@carlor4791 - 06.12.2021 10:38

god damm bgm.

Ответить
@gahaakil8787
@gahaakil8787 - 04.11.2021 09:57

Your are awesome bro

Ответить
@golfclashdz6580
@golfclashdz6580 - 15.05.2021 17:57

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 - 06.05.2021 14:50

Can you share the logic for undo and redo the position of the image?
I have been searching for it for a long time.

Ответить
@s.parvez061
@s.parvez061 - 09.02.2021 19:02

how to set click event in drag button???

Ответить
@diyshow7892
@diyshow7892 - 28.01.2021 18:13

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)

Ответить
@mahmood466
@mahmood466 - 14.01.2021 09:51

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!!! ❤

Ответить
@mushoniko
@mushoniko - 13.01.2021 18:20

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..

Ответить
@mushoniko
@mushoniko - 13.01.2021 18:19

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...

Ответить
@8animer889
@8animer889 - 01.01.2021 16:21

can we set boundaries so it won't go outside of the screen?

Ответить
@techsmash5923
@techsmash5923 - 20.11.2020 18:54

You are really Awesome bro! just 4 minutes u done !! amaizing

Ответить
@madguy1967
@madguy1967 - 22.09.2020 09:14

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

Ответить
@PashtoEnglishTranslation
@PashtoEnglishTranslation - 11.04.2020 17:04

👨‍💻 you nailed it, man !

Ответить