altosdroid: Re-locate TextView initialisation
authorMike Beattie <mike@ethernal.org>
Sun, 26 Aug 2012 02:54:54 +0000 (14:54 +1200)
committerMike Beattie <mike@ethernal.org>
Sun, 26 Aug 2012 02:54:54 +0000 (14:54 +1200)
Signed-off-by: Mike Beattie <mike@ethernal.org>
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java

index a39dfa5d7fa3eac222b811bdf80547f4018b86d9..c18a73f8044966f9816988ee32d4a53089bcd958 100644 (file)
@@ -93,6 +93,11 @@ public class AltosDroid extends Activity {
                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);
+
                // 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 +161,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);