views:

754

answers:

1

Hi,

I'm beginner developing developing small application. I have 3 textview on screen, when i touch the any one of the view it should navigate to next new screen, how to do this help me

Thanks,

Suhani

A: 
yourTextView.setOnTouchListener(new OnTouchListener() {

    @Override
    public boolean onTouch(View v, MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_UP) {
            // do something here when the element is clicked
            ScreenManager.setCurrent(new YourNewPage());
        }

        // true if the event was handled
        // and should not be given further down to other views.
        // if no other child view of this should get the event then return false

        return true;
    }
});
Zidd0