prustogi / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Patch for /trunk/engine/src/android/com/jme3/app/AndroidHarness.java #564

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
please extract the actual setContentview to an own method to allow better 
modification by overriding this method

Original issue reported on code.google.com by simon.heinen on 28 Dec 2012 at 7:10

Attachments:

GoogleCodeExporter commented 8 years ago
Why not just override the layoutDisplay method in your own Activity?

Original comment by remy.bou...@gmail.com on 13 Feb 2013 at 9:38

GoogleCodeExporter commented 8 years ago
Because then the complete code of layoutDisplay has to be copied and isn't 
automatically updated if the implementation in the superclass changes.. 

also there are many dependencies to fields in the class in the layoutDisplay 
which doesn't make it a good candidate to be overwritten. 

Original comment by simon.heinen on 13 Feb 2013 at 9:48

GoogleCodeExporter commented 8 years ago
That's the point you can absolutely make whatever you want in 
layoutDisplay,have a completely different layout and bypass the splash screen 
mechanism of jme.
I'd rather extract the framelayout creation to another method so that the code 
is lighter...but at first this method is meant for what you want to do

Original comment by remy.bou...@gmail.com on 13 Feb 2013 at 9:56

GoogleCodeExporter commented 8 years ago
yes moving the other code blocks in the method to an own method would work as 
well. any refactoring to a more modular method would be great :)

Original comment by simon.heinen on 13 Feb 2013 at 10:04

GoogleCodeExporter commented 8 years ago
ok. I'll do that.
Thanks

Original comment by remy.bou...@gmail.com on 13 Feb 2013 at 10:07

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 3 Jan 2014 at 10:51