mithrandiir42
Lurker
First a little background. I'm pretty new to Android development and I feel like I'm lacking some pretty basic concepts so this may just be pretty simple question.
I'm writing an app which contains three tabs.. let's just call them TabA, TabB, and TabC.
In my main class which extends TabActivity I have a BluetoothAdapter which handles sending and receiving messages. I initialize the BluetoothAdapter onStart. Part of the initialization tries to reference controls on the three tabs. But my problem is that only TabA (my default tab) has been initialized at this point so when it tries to access TabB and TabC, they're still null.. How can I initialize all 3 activities, and access controls on each of the tabs when receiving messages from the BluetoothAdapter? (Basically I want TabA to contain a TextView to log all messages, TabB will contain a few controls like sliders and checkboxes that will change based on the messages recieved, and TabC will just have an array of buttons that send specific data..)
Thanks in advance!
I'm writing an app which contains three tabs.. let's just call them TabA, TabB, and TabC.
In my main class which extends TabActivity I have a BluetoothAdapter which handles sending and receiving messages. I initialize the BluetoothAdapter onStart. Part of the initialization tries to reference controls on the three tabs. But my problem is that only TabA (my default tab) has been initialized at this point so when it tries to access TabB and TabC, they're still null.. How can I initialize all 3 activities, and access controls on each of the tabs when receiving messages from the BluetoothAdapter? (Basically I want TabA to contain a TextView to log all messages, TabB will contain a few controls like sliders and checkboxes that will change based on the messages recieved, and TabC will just have an array of buttons that send specific data..)
Thanks in advance!