I want to create an edittext that can be drag-drop, rotate and resize. I found this library on github and want to use it.
The library working fine in imageview but i cant use it directly on the edittext because edittext dont have setImageMatrix method.
So my goal is to convert the edittext to the imageview and then setImageMatrix that imageview everytime the onTouch event is called.
My current problem is the edittext is not moveable, it cant be drag-drop, resize and rotate.
This is my oncreate:
text = (EditText) findViewById(R.id.txt);
text.setOnTouchListener(this);
text.setDrawingCacheEnabled(true);
text.buildDrawingCache();
ImageView img = new ImageView(this);
img.setImageBitmap(text.getDrawingCache());
img.setImageMatrix(mMatrix);
And this is my onTouch event :
v.buildDrawingCache();
ImageView img = new ImageView(this);
img.setImageBitmap(v.getDrawingCache());
img.setImageMatrix(mMatrix);
img.setAlpha(mAlpha);
I think the problem is because i need to make a new instance of imageview instead of converting the edittext to imageview directly.
Please help me out, Thanks for your help.
0 comments:
Post a Comment