Take the 2-minute tour ×

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



share|improve this question
add comment

1 Answer

yourTextView.setOnTouchListener(new OnTouchListener() {

    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;
share|improve this answer
add comment

Your Answer


