- findViewById(R.id.open_button).setOnClickListener(this);
- findViewById(R.id.close_button).setOnClickListener(this);
- findViewById(R.id.buzz_button).setOnClickListener(this);
- findViewById(R.id.disconnect_button).setOnClickListener(this);
- findViewById(R.id.connect_button).setOnClickListener(this);
+ for (int view : new int[]{R.id.unlock_button, R.id.buzz_button, R.id.disconnect_button, R.id.connect_button}) {
+ findViewById(view).setOnClickListener(this);
+ }
+ logText = (TextView) findViewById(R.id.logout);
+ try {
+ logText.setText("Welcome to Hacksaar AndTuer, Version " +
+ getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
+ } catch (Exception e) {
+ logText.setText("Welcome to Hacksaar AndTuer, [unknown version]");
+ }