/** "Constructor." */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_production_site); findViews(); setupClickListeners(); productionSiteDB = new ProductionSiteDB(this); productionSiteDB.open(); // find out if it as new ProductionSite or update of existing. if (getIntent().hasExtra(EXTRA_PRODUCTION_SITE)) { setupUpdate(); } // try to set focus, no effect if updating etPpnr.requestFocus(); // disable direct entry of coordinates Utils.disableEntry(etCoord); // TODO Enable location buttons if we get the services working if (hasLocationService) { ibHere.setEnabled(true); ibMap.setEnabled(true); } }
@Override protected void onResume() { productionSiteDB.open(); super.onResume(); }