How to control Drag Drop Android Studio

0

I would like to know how I can control what goes into my layout.

I have the image's view but only the imgu, for example, can enter my "layoutrecebe" layout.

findViewById(R.id.imga).setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View v) {
                return false;
            }
        });
        findViewById(R.id.imga).setOnLongClickListener(new MyOnLongClickListener());
        findViewById(R.id.imge).setOnLongClickListener(new MyOnLongClickListener());
        findViewById(R.id.imgi).setOnLongClickListener(new MyOnLongClickListener());
        findViewById(R.id.imgo).setOnLongClickListener(new MyOnLongClickListener());
        findViewById(R.id.imgu).setOnLongClickListener(new MyOnLongClickListener());

        findViewById(R.id.layoutrecebe).setOnDragListener( new MyOnDragListener(1));
    
asked by anonymous 10.06.2018 / 01:55

0 answers