I tried to implement Facebook as a drag and drop by changing the layout fields, however they always leave traces even if I call invalidate in the view
Facebook for android / ios does this, I wonder how they did it, everywhere I see that only images are dragged and dropped
I am trying to implement something like this , however it leaves traces in my application
package com.example.dragdemo; @SuppressLint({ "NewApi", "ParserError", "ParserError" }) public class MainActivity extends Activity { TextView x; TouchExampleView tex; Context ctx=MainActivity.this; private float mPosX=0; private float mPosY=0; private float mLastTouchX; private float mLastTouchY; LinearLayout redLinear; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tex=new TouchExampleView(ctx); redLinear=(LinearLayout)findViewById(R.id.newLinear); redLinear.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) {
source share