0

I want my app to be able to use an onSwipeListener, which I have coded, to make the background's color darker or lighter based on the direction of their swipe. If the user swipes right, it gets brighter and left, it gets darker.

view.setOnTouchListener(new OnSwipeTouchListener(MainActivity.this) {
    @Override
    public void onSwipeLeft() {
          //Make Darker
    }
    @Override
    public void onSwipeRight(){
          //Make Lighter
    }

is my code, but I'm having trouble understanding how I would change the color outside of radio buttons.

TheCoxer
  • 501
  • 1
  • 4
  • 15

1 Answers1

0

This question has been answered in part before so here's the link explaining onSwipeTouchListener

I know this doesn't explain changing the background of the view that can be simply done in this example:

MainActivity.java

activity_main.xml

Community
  • 1
  • 1