When working with android studio, how can you tap and hold on alocation to add a marker to the app with being able to edit thetitle of it?
Solution
What you essentially want to do is to be able to get the x,ycoordinates of tap and hold location. And then add some floating UIelements at that location.
You may want to look at View.OnLongClickListener to be able toget x,y coordinates of the touch location.
————-Code Snipped forListener—————
private View.OnTouchListener handleTouch = newView.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event){
int x = (int) event.getX();
int y = (int) event.getY();
OR
OR