Created
March 11, 2016 12:39
-
-
Save pwittchen/c4fe6cb3963f400baf1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
info = (TextView) findViewById(R.id.info); | |
swipe = new Swipe(); | |
swipe.addListener(new SwipeListener() { | |
@Override public void onSwipingLeft(final MotionEvent event) { | |
info.setText("SWIPING_LEFT"); | |
} | |
@Override public void onSwipedLeft(final MotionEvent event) { | |
info.setText("SWIPED_LEFT"); | |
} | |
@Override public void onSwipingRight(final MotionEvent event) { | |
info.setText("SWIPING_RIGHT"); | |
} | |
@Override public void onSwipedRight(final MotionEvent event) { | |
info.setText("SWIPED_RIGHT"); | |
} | |
@Override public void onSwipingUp(final MotionEvent event) { | |
info.setText("SWIPING_UP"); | |
} | |
@Override public void onSwipedUp(final MotionEvent event) { | |
info.setText("SWIPED_UP"); | |
} | |
@Override public void onSwipingDown(final MotionEvent event) { | |
info.setText("SWIPING_DOWN"); | |
} | |
@Override public void onSwipedDown(final MotionEvent event) { | |
info.setText("SWIPED_DOWN"); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment