X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/ab949b7d741697be3793be92131240d3b0b28baf..2b562903da978575fb3e25aac26abc09fc5871e2:/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 5260a5c4..7e2a8c03 100644 --- a/src/eu/alefzero/owncloud/ui/activity/LandingActivity.java +++ b/src/eu/alefzero/owncloud/ui/activity/LandingActivity.java @@ -50,12 +50,10 @@ 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()){ @@ -63,6 +61,24 @@ public class LandingActivity extends SherlockFragmentActivity implements OnClick } } + + @Override + protected void onRestart() { + super.onRestart(); + // Check, if there are ownCloud accounts + if(!accountsAreSetup()){ + showDialog(DIALOG_SETUP_ACCOUNT); + } + } + + @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) { @@ -111,6 +127,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(); }