Android Studio - Move View (Linear Layout)
<p>it is almost 6 days traying to move the layout, but no success at all, trying alot of helps from internet but none helps..</p>

<p><a href="https://i.stack.imgur.com/XMiNw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XMiNw.jpg" alt="enter image description here"></a></p>

<p>I want llPic1 and llPic2 to be moved above ivNjeri with OnTouchListener.
So player to dicide which one need to be moved above ivNjeri.</p>

<p>With this code it vibrates on move and llPic1 and llPic2 goes under ivNjeri:</p>

<pre><code>float dx = 0, dy = 0, x = 0, y = 0;

@Override
public boolean onTouch(View view, MotionEvent event) {
    switch (event.getAction()) {
        case MotionEvent.ACTION_DOWN: {
            x = event.getX();
            y = event.getY();
            dx = x - view.getX();
            dy = y - view.getY();
        }
        break;
        case MotionEvent.ACTION_MOVE: {
            view.setX(event.getX() - dx);
            view.setY(event.getY() - dy);
        }
        break;
        }
        return true;
    }
</code></pre>

<p><a href="https://i.stack.imgur.com/TKQfR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TKQfR.jpg" alt="enter image description here"></a></p>

<p>I'm also trying alot of other codes but none works, any help will be very very appriciated :)</p>