开发者

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开发者_如何学运维.


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

Also, take a look at the Notepad Tutorial, for a complete example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜