http://topic.csdn.net/u/20101025/17/b68f01a6-5dd5-4d2a-9c21-025568fc0bca.html
网上有一大堆,自己可以看看,或者去et上下载一个截屏的软件,然后反编译一下...
网上有一大堆,自己可以看看,或者去et上下载一个截屏的软件,然后反编译一下...
解决方案 »
- android sdk 版本问题
- 关于SQLite的问题
- 考勤系统
- ListView失去focus后 如何仍然高亮?
- 学习SQLite时eclipse中DDMS下,File Explorer中Data文件为空。
- 带左右滑动的选项卡点击进入,返回进入指定的选项问题
- 为什么FindViewById不用new一个对象就能直接赋值给某个引用变量?
- 大家帮看看,这样的功能用下面哪种方法实现比较合理?
- 求指点,要在Android平台上开发一款类似Hopscotch、Scratch的儿童用编程软件
- 布局实现问题
- 我收藏的android资料汇集,很全的哦!
- setEnableExtraScroller(false);
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Resources res=getResources();
bmp=BitmapFactory.decodeResource(res,R.drawable.a);
BitmapDrawable bmp1=new BitmapDrawable(bmp);
ImageView im=new ImageView(this);
im.setImageDrawable(bmp1);
im.setClickable(true);
im.setOnTouchListener(new OnTouchListener(){
float startx=0.0f;
float starty=0.0f;
float endx=0.0f;
float endy=0.0f;
public boolean onTouch(View view,MotionEvent event) {
float x=event.getX();
float y=event.getY();
Log.v("start","start");
if(event.getAction()==MotionEvent.ACTION_DOWN){
startx=x;
starty=y;
}
System.out.println("middle");
if(event.getAction()==MotionEvent.ACTION_UP){
endx=x;
endy=y;
}
System.out.println("end"); Float startxx=new Float(startx);
Float startyy=new Float(starty);
Float endxx=new Float(endx);
Float endyy=new Float(endy);
int sx=startxx.intValue();
int sy=startyy.intValue();
int ex=endxx.intValue();
int ey=endyy.intValue();
bmpp=Bitmap.createBitmap(bmp,sx,ex,sy,ey);
return true;
}
});