Forums Register Login

Passing Floats between activities.

+Pie Number of slices to send: Send
Hi,

Im trying to pass floats from one activity to another.

The 2nd activity is opening fine but its just passing the value 0.0.

How do i get it to pass the value inside "rMainValue" - its not a constant value and can be different each time..

Sending



Receiving



Thanks.
+Pie Number of slices to send: Send
It seems to be being set here

Have you tried setting a break point to see what it is actually evaluating to?
+Pie Number of slices to send: Send
Yes, thats where its set in first activity - im trying to pass that value into the next activity.
+Pie Number of slices to send: Send
Its doing that calculation no problem, just passing the value is where im stuck..

im getting the value 0 from here..


if i change that 0 to 8 for example, i get the value 8 in 2nd activity.

How do i get whats inside "resistorValue" into the 2nd activity, and display it in "mainResistorValue"
+Pie Number of slices to send: Send
 

Liam O'Connor wrote:
im getting the value 0 from here..


if i change that 0 to 8 for example, i get the value 8 in 2nd activity.


This just proves that the value is being passed correctly.

Once again I urge you to set a break point and check what resistorValue is actually evaluating to. You might have the calculation logic correct, but the value of some variable might be wrong. eg.band3Count
Don't play dumb with me! But you can try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1521 times.
Similar Threads
virtual key board source code
Code from developer.android.com
Creating Database and Tables
Database: don't edit row
Cannot find the problem in the code
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:58:50.