hi there, in this assignment, you will design a custom layout component for Android which we will call Pit from now on.
Pitis a ViewGroup that renders an interactive horizontal 2D graph of points, between every point there is a connected edge (linear edge).- every point of Pit is draggable.
Pitalso draws the Origin axis lines- when a point is dragged, the view is rendered again in order to show the edges, that means Pit is responsive :)
Pitalso has a very unique feature, the reordering feature which goes like this: if a user drags a point before or after another point, then Pit will change that point order and therefore the edges will still render beautifully.Pitshould have an interface to add point/s. every point is added at the origin axis (0, 0)
⚠️ you cannot use the built in Android drag functionality (i.e View.startDrag() etc..), you will have to write your own drag logic with the help of your own customOnTouchListener.⚠️ each point should be extended from aViewclass itself, but you can also implement it otherwise (which will be harder, but might be more efficient). your call.
- the activity should have a pit layout inside and a button to add a point into pit. every new point that is added by this button should be added at the origin axis (0, 0) coordinate.
Pitshould start with 5 different initial points.
❤️ docs and comments for each new method.
❤️ we love optimal code and memory optimizations.
❤️ we love to see a programmer gainining deep insights about what he is programming.
❤️ that means we love great practices
❤️ but also feel free to be creative when you feel the time is right.
❤️ we love communication. don't hesitate to ask questions and boldly asking questions
about your assignment.
❤️ coolness and attitude, don't feel bad if you don't hit your goals, we will still consider
your efforts 🥈
confidently open a github account if you don't have one, create a repository, push all of your code into the repository
and notify us when you are done. ![]()
me, Tomer Shalev, feel free to open issues or to bash me if you don't like this assignment ✍️
