• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Button Click Tracker

Hi - Im trying to keep track of the number of times a button has been pressed on my main activity. The number of times the button is clicked should be displayed on the activity is is connected to.

I have tried to do this but the tracker integer variable doesn't increment. Would this be because in order to transfer this information back and forth the secondary activity would need to be a sub-activity of the first?

Also, would i be right in suggesting that I would need other methods, e.g. get(), set() variable, to properly track the variables value?

Cheers
 
Back
Top Bottom