Catrobat/Catroid — pull request #810 by sebheid (2013-11-12 15:27:58+00:00)
Title: Issue#665

Fixing #18

"My First Project" can now be deleted. If there are no projects available the look of the "continue" button in the main menu is changed and it is disabled. Also the ProjectsList is showing a watermark with a hint on how to add projects.

Fixing #665

Added watermark to the object activity

Changes:
- fragment_projects_list.xml: added watermark (empty view)

- fragment_sprites_list.xml: added watermark (Relative Layout simulating an empty view)

- strings.xml: added strings for watermarks

- styles.xml: added style for disabled "continue" button

- ProjectManager.java: deleted creation of standard project if no project can be loaded.

- StorageHandler.java: added if-statement to check if projectcodefile exists before it is opened.

- MainMenuActivity.java: "My First Project" is only created on the first start of the app. Updatecontinuebutton enables / disables the continue button, according to if there is a project available or not.

- SpritesListFragment.java: added updateWatermark() to show watermark if there are no objects in the list

- UtilFile.java: added check if contents != null in getSizeOfFileOrDirectoryInByte to avoid null pointer exception

- Utils.java: removed creation of standard project if no project can be loaded

Due to a known bug in the Intel Atom x86 Emulator on API Level 17 it is not possible to deliver a complete test run. This Pull Request is created to review the code. Refactoring (delete comments, log etc.) will be done as soon as testing this branch is possible.