X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosdroid%2Fsrc%2Forg%2Faltusmetrum%2FAltosDroid%2FAltosDroid.java;h=5b48d5710d73d17f8a13600d0f2f5569785a376b;hb=cfe93315fc0e4b01a95b8e59f24aca96b5a66daf;hp=a39dfa5d7fa3eac222b811bdf80547f4018b86d9;hpb=917f519a4e876087590a3a260fbbccf4c0ac3e31;p=fw%2Faltos diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java index a39dfa5d..5b48d571 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java @@ -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);