Catrobat/Catroid — pull request #768 by ManuelWallner (2013-10-14 15:00:22+00:00)
Title: Fix several issues concerning NestingBricks and ActionMode

* Copying of ```ForeverBrick``` threw a ```NullPointerException```
changed ```OnCheckedChangeListener``` to ```OnClickListener``` which seems to resolve this issue

* When entering action mode the ```CheckBox``` of ```LoopEndlessBrick``` wasn't shown properly

* When selecting the ```LoopEndBrick``` for copying from action mode the copied ```LoopEndBrick``` was moved in before the corresponding ```LoopBeginBrick```
```getAllNestingBrickParts(true)``` (ordered) resolves this

* When copying a ```NestingBrick``` via action mode the corresponding ```LoopEndBrick``` is not properly initialized.
The copied end brick referenced the source ```LoopBeginBrick``` which is wrong.
All bricks between the copied end brick and the source begin brick would have been selected.
Now the copied end brick references the new, copied ```LoopBeginBrick```.

* Copying of if bricks didn't work at all
changed OnCheckedChangeListener to OnClickListener as well

* Refactored the ```BrickAdapter``` a little

* Fixed two checkstyle warnings

Fix issue #759

Jenkins testrun: [658](https://jenkins.catrob.at/view/All-Categories/job/Catroid-Multi-Job-Custom-Branch/658/)