protected void onLoggedNmeaBurst(INmeaBurst burst) { _Bursts.add(TtNmeaBurst.create(_Point.getCN(), false, burst)); if (!btnCalc.isEnabled() && getLoggedCount() > 0) { btnCalc.setEnabled(true); btnCalc.setBackgroundColor(AndroidUtils.UI.getColor(this, R.color.primary)); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_acquire_gps); setUseExitWarning(true); setUseLostConnectionWarning(true); setResult(RESULT_CANCELED); if (!isCanceling()) { SheetLayoutEx.enterFromBottomAnimation(this); Intent intent = getIntent(); if (intent != null && intent.getExtras() != null) { _Bursts = new ArrayList<>(); try { _Point = (GpsPoint) intent.getSerializableExtra(Consts.Codes.Data.POINT_DATA); _Metadata = intent.getParcelableExtra(Consts.Codes.Data.METADATA_DATA); setZone(_Metadata.getZone()); if (intent.getExtras().containsKey(Consts.Codes.Data.ADDITIVE_NMEA_DATA)) { _Bursts = TtNmeaBurst.bytesToBursts( intent.getByteArrayExtra(Consts.Codes.Data.ADDITIVE_NMEA_DATA)); setLoggedCount(_Bursts.size()); } } catch (Exception e) { e.printStackTrace(); } } else { setResult(Consts.Codes.Results.NO_POINT_DATA); finish(); return; } ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayShowTitleEnabled(false); } tvLogged = (TextView) findViewById(R.id.acquireGpsToolbarLblLoggedValue); tvRecv = (TextView) findViewById(R.id.acquireGpsToolbarLblReceivedValue); btnLog = (Button) findViewById(R.id.aqrBtnLog); btnCalc = (Button) findViewById(R.id.aqrBtnCalc); if (_Bursts.size() > 0) { btnCalc.setEnabled(true); } else { btnCalc.setBackgroundColor(AndroidUtils.UI.getColor(this, R.color.primaryLighter)); } // setupMap(); } }