This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

Problem in accessing value of global variable  RSS feed

 
Madhu Nandan
Ranch Hand
Posts: 52
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello,

Please go through the code below.

String[] Info contains 2 values like this: shiftDirection & 1 or currGear & 5 and similar pairs. If I receive shiftDirection & 0, I should display the previously received value of currGear. So I create PresentGear as a global variable and when currGear is received, I store it's value in PresentGear. Then when I receive shiftDirection & 0, I try to display PresentGear but nothing gets displayed. PresentGear is assigned no value. It would be very helpful if someone could suggest why this is happening or if my approach is wrong, kindly suggest an alternative way.

Cheers,
Madhu

 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Appears to be a duplicate post of http://www.coderanch.com/t/525700/Android/Mobile/Android-Cannot-show-more-than, closing.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!