I have an activity class that is implementing onClickListener Interface
I am not able to find out what to do next.
My aim is to have a overriding view method onClick(View v) that will increment the flag from 1 to 5 different uris (say 5 urls) on click of UP button and decrement from uri-5 to uri-1 on the click of DOWN button. It’ll dependent on the position of each button at any instance.
Please help me with a clue.
I had tried is as below:-
Button up = (Button) findViewById(R.id.button1);
Button down = (Button) findViewById(R.id.button2);
up.setOnClickListener(this);
down.setOnClickListener(this);
public void onClick(View v) {
}
Try this
make a static variable
in up
in down