[英]i want call MotionEvent.ACTION_DOWN in one activity and MotionEvent.ACTION_UP in another activity
ImageView ii = (ImageView)v.findViewById(R.id.picture);
ii.setOnTouchListener(new OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent e) {
ImageView i2 = (ImageView)findViewById(R.id.btn_imagetest);
if(e.getAction() == MotionEvent.ACTION_DOWN){
//call activity one
}
if (e.getAction() == MotionEvent.ACTION_UP)
{
//call activity 2
}
return true;
}
});
when i touch on image 'ii' i should go to imgview(i2)(can be activity too) and when i leave the imgview should go away(back to same activitiy) ..(Note:imgview is covers full screen in phone) i have no idea..how to proceed. 当我触摸图像'ii'时我应该去imgview(i2)(也可以是活动)当我离开imgview应该消失(回到相同的活动)..(注意:imgview覆盖手机全屏)我不知道......如何继续。
If I understand correctly, you're asking for information on how to start another Activity from the current Activity. 如果我理解正确,您要求提供有关如何从当前活动启动另一个活动的信息。 For information on that, take a look at Android - finishing activity from another activity 有关这方面的信息,请查看Android - 来自其他活动的整理活动
Also, take a look at the Notepad Tutorial , for a complete example. 另外,请查看记事本教程 ,以获取完整示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.