I want my image to change the image as long as i press and hold on to the button . And when i release my finer i want it to revert back to the original image , is there a way to do this ?
bTen.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
bTen.setBackgroundResource(R.drawable.press);
s1+="E";
txtView.setText(s1);
}
});
i have used the above code ,but it does not revert back to original when i release my finger.