开发者

how can we get popup by touching on particular image i n android?? code will be better help for me

开发者 https://www.devze.com 2023-02-06 07:08 出处:网络
how can we get popup by touching on开发者_运维技巧 particular image and popup should be cancel by moving out from image in android?? code will be better help for me...<ImageViewName>.setOnTouchL

how can we get popup by touching on开发者_运维技巧 particular image and popup should be cancel by moving out from image in android?? code will be better help for me...


<ImageViewName>.setOnTouchListener(new OnTouchListener() {

        public boolean onTouch(View v, MotionEvent event) {
            if(event.getAction()==0)//0-ACTION_DOWN
             {
                Toast.makeText(<Current Activity>.this, "Image is Pressed", Toast.LENGTH_SHORT).show();
             }else
                 if(event.getAction()==1)//0-ACTION_UP
                 {

                 }
            return false;
        }
    });

Through the above code we can display a pop up msg.In my code i am display a simple message.

0

精彩评论

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