how can we limit views inside the parent layout in android till now I am able to move views on touch event but I want to limit those views inside parent layout
Asked
Active
Viewed 779 times
1
-
write down a boundary collision detection check! – Muhammad Babar May 29 '15 at 11:31
-
use "View Pager" concept. – krunal shah May 29 '15 at 11:32
-
can you please explain little more about how could I do that @MuhammadBabar – Faris Jameel May 29 '15 at 11:34
-
refer [link](http://stackoverflow.com/questions/13796382/android-viewpager-as-image-slide-gallery) – krunal shah May 29 '15 at 11:39
-
1you know that your bounds are 0(x) left most, screenWidth(x) right most, 0(y) top most, screenHeight(y) bottom most. Now create a logic and check if your views bound are colliding them then don't move further. – Muhammad Babar May 29 '15 at 11:40
-
I already did that but not working proper @MuhammadBabar thats why i am here for a refine logic – Faris Jameel May 29 '15 at 11:47