471,072 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,072 software developers and data experts.

Android / Java Code Running Order Question.

Hello,
I'm having an issue with how code is being ran on an app that I'm writing. I have a spinner on a pop up window, and when ever I bring up the pop up window I have code that changes the Spinner to the last selection the user had. Well when I do so it triggers the Spinner Selection Listener which is fine, and actually the wanted behavior. Now my question and where it comes to be an issue is. The Calling Method seems to completly itself before the Spinner's selection Code runs.

I.e.

Expand|Select|Wrap|Line Numbers
  1. Method A. {
  2.    Code 1
  3.    Code 2
  4.    Code 3
  5.    SomeSpinner.setPosition(x);
  6.    Code 4
  7.    Code 5
  8.    Code 6
  9. }
  10.  
  11. SpinnerSelection {
  12.   Code Block A
  13. }
Whats happenins is Code lines 1-6 are running prior to Code Block A, but i thought it should run Lines 1-3, Then Block A, then Lines 4-6, Obivious I'm wrong in my understand, but I was wondering how to understand why it is this way.

Thank You.
Dec 20 '13 #1
0 1135

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by Ravi | last post: by
6 posts views Thread by Jim | last post: by
5 posts views Thread by Michael Murphy | last post: by
3 posts views Thread by Woody Splawn | last post: by
m6s
1 post views Thread by m6s | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.