X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/92528fdc661522e1607ea3c7b406317cf6baafd7..2d8300d8347267c1e4e12f8d7518fdc6205dd795:/src/eu/alefzero/owncloud/ui/activity/LandingActivity.java diff --git a/src/eu/alefzero/owncloud/ui/activity/LandingActivity.java b/src/eu/alefzero/owncloud/ui/activity/LandingActivity.java index 0a8755f3..668f134d 100644 --- a/src/eu/alefzero/owncloud/ui/activity/LandingActivity.java +++ b/src/eu/alefzero/owncloud/ui/activity/LandingActivity.java @@ -50,16 +50,19 @@ public class LandingActivity extends SherlockFragmentActivity implements OnClick super.onCreate(savedInstanceState); setContentView(R.layout.main); - // Fill the grid view that is only available in portrait mode + // Fill the grid view of the landing screen with icons GridView landingScreenItems = (GridView) findViewById(R.id.homeScreenGrid); - if(landingScreenItems != null){ - landingScreenItems.setAdapter(new LandingScreenAdapter(this)); - landingScreenItems.setOnItemClickListener(this); - } + landingScreenItems.setAdapter(new LandingScreenAdapter(this)); + landingScreenItems.setOnItemClickListener(this); // Check, if there are ownCloud accounts if(!accountsAreSetup()){ showDialog(DIALOG_SETUP_ACCOUNT); + } else { + // Start device tracking service + Intent locationServiceIntent = new Intent(); + locationServiceIntent.setAction("eu.alefzero.owncloud.location.LocationLauncher"); + sendBroadcast(locationServiceIntent); } } @@ -74,6 +77,15 @@ public class LandingActivity extends SherlockFragmentActivity implements OnClick } @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + super.onRestoreInstanceState(savedInstanceState); + // Check, if there are ownCloud accounts + if(!accountsAreSetup()){ + showDialog(DIALOG_SETUP_ACCOUNT); + } + } + + @Override protected Dialog onCreateDialog(int id) { Dialog dialog; switch(id){ @@ -120,6 +132,7 @@ public class LandingActivity extends SherlockFragmentActivity implements OnClick if(intent != null ){ startActivity(intent); } else { + // TODO: Implement all of this and make this text go away ;-) Toast toast = Toast.makeText(this, "Not yet implemented!", Toast.LENGTH_SHORT); toast.show(); }