我有一个图像编辑 android 应用程序,我在其中使用自定义EditTextView
放置在一个ImageView
.This 图像视图也是一个自定义视图,可以旋转、缩放、拖动等......现在,我想拖动它EditText
并旋转单击按钮时。这是我的习惯EditTextView
:
public class TemplateTextView extends EditText {
private static float angle;
// We can be in one of these 3 states
private int mode = NONE;
// Remember some things for zooming
PointF start = new PointF();
PointF mid = new PointF();
PointF startMargins = new PointF();
float oldDist = 1f;
/**
* Constructor for TemplateTextView
*
* @param context
* @param attrs
* @param defStyle
*/
public TemplateTextView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
// mWindowManager = (WindowManager)
// context.getSystemService(Context.WINDOW_SERVICE);
}
/**
* Constructor for TemplateTextView
*
* @param context
* @param attrs
*/
public TemplateTextView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
/**
* Constructor for TemplateTextView
*
* @param context
*/
public TemplateTextView(Context context) {
this(context, null);
}
}
长EdittextView
按时拖动。如何旋转和拖动此视图?