1
0
mirror of https://github.com/bspeice/itcs4180 synced 2024-12-04 13:18:16 -05:00

Add methods to be used by both button presses and gesture detection

This commit is contained in:
DjBushido 2014-03-24 10:07:09 -04:00
parent cef01d01e0
commit 00f1f80d1a

View File

@ -32,17 +32,27 @@ public class ImageViewerActivity extends Activity {
}
public void onClickPrev(View v) {
displayPrev();
}
public void onClickNext(View v) {
displayNext();
}
public void onClickBack(View v) {
finish();
}
private void displayPrev() {
currentIndex -= 1;
displayImage(currentIndex);
}
private void displayNext() {
currentIndex += 1;
displayImage(currentIndex);
}
public void displayImage(int indexToDisplay) {