代码如下,先设置监听事件,然后设置自动点击,但是运行却没有效果,自动点击无法执行。
请教各位大神。
Button takePhoto = (Button) findViewById(R.id.takephoto);
takePhoto.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(camera!=null){
camera.takePicture(null, null, jpeg);
}
}
});
takePhoto.performClick();//自动执行点击事件
请教各位大神。
Button takePhoto = (Button) findViewById(R.id.takephoto);
takePhoto.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(camera!=null){
camera.takePicture(null, null, jpeg);
}
}
});
takePhoto.performClick();//自动执行点击事件
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货