单点缩放旋转拖动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);} 刚开始学android,照着书上例子做出现错误,不懂,代码贴出来高手指教下 android打开虚拟设备出launcher关闭错误,求教 android textview 内容覆盖的 问题 Android通过网络发送请求的问题 如何重新打包 addroid多线程问题求助 如何解析下面的json数据啊..求帮助,用阿里巴巴的解析jar包 图片的位置怎么设置 导入项目后,报错:No resource found that matches the given name proguard混淆 求教: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);
}