This problem is not difficult. When triggering the drawing of drawing board A, you have to invert the coordinates of point A. According to the conversion relationship, calculate the coordinates of point B and draw the points in B. https://segmentfault.com/n/1330000005040693
This problem is not difficult. When triggering the drawing of drawing board A, you have to invert the coordinates of point A. According to the conversion relationship, calculate the coordinates of point B and draw the points in B. https://segmentfault.com/n/1330000005040693
@author CyrusCao
*
*/
class MainActivity extends Activity {
}
Board A
com.cyrus.demoboard;
android.annotation.SuppressLint;
android.content.Context;
android.graphics.Canvas;
android.graphics.Paint;
android.graphics.Path;
android.util.AttributeSet;
android.view.MotionEvent;
android.view.View;
/**
@author CyrusCao
*
*/
class BoardView extends View {
}
Board B
com.cyrus.demoboard;
android.annotation.SuppressLint;
android.content.Context;
android.graphics.Canvas;
android.graphics.Paint;
android.graphics.Path;
android.util.AttributeSet;
android.view.MotionEvent;
android.view.View;
/**
@author CyrusCao
*
*/
class BoardViewB extends View {
}
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
</RelativeLayout>
Websocket can be implemented, but you need to use flash under IE