• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Issue with android TextWatcher with spinners

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a small unit converter.
It has 2 edittexts and two spinners.
The user needs to input a value (edittext 1) and choose to convert from one unit (spinner 1) to another unit (spinner 2).
The problem is that the converted value (edittext 2) only works when the input is changed,
when the user selects different units for the spinner the converted value (edittext 2) doesn't change. Any solution?

See the two pictures as example. (mm to km, mm to mm - no changes to eddittext 2)
lik1.PNG
[Thumbnail for lik1.PNG]
from mm to km
lik2.PNG
[Thumbnail for lik2.PNG]
from mm to mm
 
ian bilgaen
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
#Edit1 ignore the button.
 
Ranch Hand
Posts: 570
3
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We need to see your code here
 
ian bilgaen
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The above code has some useless code in it I updated it.

 
Rancher
Posts: 4190
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put some logging in there so you can track where in the code it is getting to, and what the values of various things are.
At the moment you are flying blind.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!