单点缩放旋转拖动Edittext。 你说的这个是不是就是 GIF快手 高级编辑里面那个功能? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 还没搞定哪?这个主要是太麻烦了,三句两句的说不明白。基本上的思路就是每一个文字框都是一个自定义的Drawable,这个Drawable记录了自己的坐标。每次onTouch的时候,如果是DOWN事件,就检查一遍所有的Drawable,看这个DOWN事件hit到了哪个Drawable。接下来就比较好弄了,如果是hit到了框框上,就是move事件,如果hit到了旋转按钮上,就是拉伸事件。具体实现scale和move的效果,就是利用drawable的draw方法,对canvas进行translate和scale和rotate操作。具体实现的时候还是挺麻烦的,加油哈 有木有demo啊。。麻烦的是那个单点的手势以及缩放,旋转Edittext。还有就是Edittext 的触摸事件挺多 缩放,通过设置Edittext里面的字体大小 旋转 通过if (Build.VERSION.SDK_INT < 11) { RotateAnimation animation = new RotateAnimation(rotations, rotations,Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF,0.5f); animation.setDuration(10); animation.setFillAfter(true); edittext.startAnimation(animation); } else { edittext.setRotation(rotations); } 还是不太懂,楼主方便把demo发我邮箱吗?万分感激![email protected] 楼主大大!这个你搞定了没呀?我也遇到了,项目里要做这个功能,求分享!万分感激啊!邮箱:[email protected] 抱歉,没有用的是这个缩放,通过设置Edittext里面的字体大小 旋转 通过if (Build.VERSION.SDK_INT < 11) { RotateAnimation animation = new RotateAnimation(rotations, rotations,Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF,0.5f); animation.setDuration(10); animation.setFillAfter(true); edittext.startAnimation(animation);} else {edittext.setRotation(rotations);} 请问怎么用eclipse编写andriod应用,都不知道代码写在哪里 关于编译android源码 高手,请问这是什么控件 在下拉菜单中加入RadioButton等控件的问题 怎么更新ListView?? 还是mediarecorder的问题,和机子有关系? 如何用android打开PPT文件,思路或者源码都可以 android图像处理问题,求大神指导,急!!! android退出应用 关于webview解析rc="data:image/gif;base64, 这类标签失败 求教:Eclipse中跨项目引用layout的问题 android中NoClassDefFoundError
这个主要是太麻烦了,三句两句的说不明白。
基本上的思路就是每一个文字框都是一个自定义的Drawable,这个Drawable记录了自己的坐标。
每次onTouch的时候,如果是DOWN事件,就检查一遍所有的Drawable,看这个DOWN事件hit到了哪个Drawable。
接下来就比较好弄了,如果是hit到了框框上,就是move事件,如果hit到了旋转按钮上,就是拉伸事件。
具体实现scale和move的效果,就是利用drawable的draw方法,对canvas进行translate和scale和rotate操作。
具体实现的时候还是挺麻烦的,加油哈
有木有demo啊。。麻烦的是那个单点的手势以及缩放,旋转Edittext。还有就是Edittext 的触摸事件挺多
缩放,通过设置Edittext里面的字体大小 旋转 通过
if (Build.VERSION.SDK_INT < 11) {
RotateAnimation animation = new RotateAnimation(rotations, rotations,Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF,0.5f);
animation.setDuration(10);
animation.setFillAfter(true);
edittext.startAnimation(animation);
} else {
edittext.setRotation(rotations);
}
抱歉,没有用的是这个
缩放,通过设置Edittext里面的字体大小 旋转 通过
if (Build.VERSION.SDK_INT < 11) {
RotateAnimation animation = new RotateAnimation(rotations, rotations,Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF,0.5f);
animation.setDuration(10);
animation.setFillAfter(true);
edittext.startAnimation(animation);
} else {
edittext.setRotation(rotations);
}