altosdroid: whitespace
[fw/altos] / altosdroid / src / org / altusmetrum / AltosDroid / AltosDroid.java
index a39dfa5d7fa3eac222b811bdf80547f4018b86d9..5b48d5710d73d17f8a13600d0f2f5569785a376b 100644 (file)
@@ -86,13 +86,19 @@ public class AltosDroid extends Activity {
                setContentView(R.layout.main);
                getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title);
 
-        // Get local Bluetooth adapter
-        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
                // Set up the custom title
                mTitle = (TextView) findViewById(R.id.title_left_text);
                mTitle.setText(R.string.app_name);
                mTitle = (TextView) findViewById(R.id.title_right_text);
 
+               mSerialView = (TextView) findViewById(R.id.in);
+               mSerialView.setMovementMethod(new ScrollingMovementMethod());
+               mSerialView.setClickable(false);
+               mSerialView.setLongClickable(false);
+
+               // Get local Bluetooth adapter
+               mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
+
                // If the adapter is null, then Bluetooth is not supported
                if (mBluetoothAdapter == null) {
                        Toast.makeText(this, "Bluetooth is not available", Toast.LENGTH_LONG).show();
@@ -156,11 +162,6 @@ public class AltosDroid extends Activity {
        private void setupChat() {
                Log.d(TAG, "setupChat()");
 
-        mSerialView = (TextView) findViewById(R.id.in);
-        mSerialView.setMovementMethod(new ScrollingMovementMethod());
-        mSerialView.setClickable(false);
-        mSerialView.setLongClickable(false);
-
                // Initialize the compose field with a listener for the return key
                mOutEditText = (EditText) findViewById(R.id.edit_text_out);
                mOutEditText.setOnEditorActionListener(mWriteListener);