tag:blogger.com,1999:blog-77632299878569104322024-03-14T03:55:19.352-07:00petru'spetruhttp://www.blogger.com/profile/05770285129276823568noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-7763229987856910432.post-10536446959370314702014-01-08T12:18:00.000-08:002014-01-08T12:19:19.990-08:00How to get Extra Lives and Explore Map for FREE in Juice Cubes<br />
When I play Juice Cubes, I like to win and not get stuck too much on some levels. But this is quite hard with only 5 lives and a big waiting time, unless you want to pay real money for in-game gold bars. Well, I don't want and that's why I discovered how to do a small trick and be able to play continuously.<br />
<br />
There is no magic, but a little effort is required from your side on changing the device time. There are some tricks which makes this very easy though.<br />
<br />
Read bellow the simple steps:<br />
<br />
<h4>
Start clean </h4>
<br />
Make sure that <b>your number of lives is full</b> and you <b>don't have any quests waiting</b> in there, otherwise you risk that you get in trouble having to wait a lot of time or needing to move the clock to much in the future! All future steps are depending on this. <br />
<br />
<h4>
Preparation before playing</h4>
<br />
When I play this game I prefer setting the time backwards with a few days, like 5-10. This has the advantage that your future events will not be missed and you easily restore your lives within seconds.<br />
<br />
Example: today is 8th of January 21:00, I set the date 1st of January 01:00.<br />
<br />
<h4>
Make full lives bar again</h4>
<br />
So, you played all your lives and you have to wait? No problem ... go to time settings and change in the future with +4 hours and +10 minutes, let's say. If you start the game again your lives are there. Please make sure that you don't do just +1day, it won't work, if you pass the day from 22:00, than set the new time +1 day 02:00 and 10 minutes.<br />
<br />
Example: if the time is 17:15 I will set it to 21:25. If the time is 1st of January 22:04, I will set it to 2nd of January 02:14.<br />
<br />
<h4>
Pass the Explore Map</h4>
<br />
So, you got the Explore Map? A long waiting time or ... go to time settings and change +1 day, +1 minute and + 1 hour, let's say. Start the game and the quest is there.<br />
<br />
Example: if the time 1st of January 19:00, I will set it to 2nd of January 20:01.<br />
<br />
<h4>
After you are finished playing</h4>
<br />
Don't forget after you are finished playing to restore the time of your phone, it is important if you want to get your events and notifications right!<br />
<br />
Good luck playing :)petruhttp://www.blogger.com/profile/05770285129276823568noreply@blogger.com0tag:blogger.com,1999:blog-7763229987856910432.post-13570398701144706862013-11-13T11:31:00.001-08:002013-11-13T11:32:14.917-08:00CodenameOne running a Demo<h2>
Running a demo</h2>
<br />
After having setup the project I tried to run a demo. Everything went pretty smooth:<br />
I created in Eclipse the project with the same name as the demo<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRWQT0cCxHd3YBqxXUhRZru7fMKn57KruXUyiSQdgfOyBROKBSj2uZlLIcsns2x0W3LQP2wOOEwk5rweS81OOIMa0j_n_5_GMdWDEYZg66-Dt6KawXYejOMCraieX3JxXVu_tAvIQyoHg/s1600/new_codenameone_project.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRWQT0cCxHd3YBqxXUhRZru7fMKn57KruXUyiSQdgfOyBROKBSj2uZlLIcsns2x0W3LQP2wOOEwk5rweS81OOIMa0j_n_5_GMdWDEYZg66-Dt6KawXYejOMCraieX3JxXVu_tAvIQyoHg/s320/new_codenameone_project.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
making sure the package name is identical with the one from codenameone_settings.properties. Afterwards, I closed the Eclise project, and basically copied over the files from the KitchenSink demo. Opening and refreshing the project from Eclipse was successful and running it gave me </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAPbN_yEOSmGkaqr0cTdDhyphenhyphenY7D7eooN9RSV1ixNl3b4uNw7XlXKORqltLXaZlquZltkwy4DBq65LOoRLxCCW38E7AcJcum4bZlMDmZyYeq2QEgNFIpHqr20zu_rfhqlEbCWzUz0srVnw4/s1600/kitchenSink.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAPbN_yEOSmGkaqr0cTdDhyphenhyphenY7D7eooN9RSV1ixNl3b4uNw7XlXKORqltLXaZlquZltkwy4DBq65LOoRLxCCW38E7AcJcum4bZlMDmZyYeq2QEgNFIpHqr20zu_rfhqlEbCWzUz0srVnw4/s400/kitchenSink.jpg" width="208" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Topics: #codenameone #demo</div>
petruhttp://www.blogger.com/profile/05770285129276823568noreply@blogger.com0tag:blogger.com,1999:blog-7763229987856910432.post-7042460556095565452013-10-31T14:48:00.001-07:002013-11-13T11:33:32.144-08:00CodenameOne project settings and Splash<h3>
Project Settings</h3>
<br />
At the beginning of the project I want to have a higher degree of control of how the application would behave on the phone and therefor I started with basic things (for a native developer) like orientation and fullscreen mode and I ended up spending some time to find the solution. At the end I discovered how to do it:<br />
<br />
<h4>
Fullscreen,</h4>
not supported in the emulator, but available for Android an iOS via the build properties send to the build server. How to change it? Project Properties>CodenameOne> Build Hints add:<br />
<blockquote class="tr_bq">
</blockquote>
<blockquote class="tr_bq">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihvhzLzrHY1fxBj-5PSVkwNkHtZDBmBXuRiIJAvq5TZFJgDajPrblVV0gTdEUiXsJ-bSX9vesyyVvfhqFrE6ymg1hBMeMOHis-dtIWJztvkY4Cr38waW9iw0h2PbsqglCYk7mCPyt-Pf4/s1600/fullscreen.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihvhzLzrHY1fxBj-5PSVkwNkHtZDBmBXuRiIJAvq5TZFJgDajPrblVV0gTdEUiXsJ-bSX9vesyyVvfhqFrE6ymg1hBMeMOHis-dtIWJztvkY4Cr38waW9iw0h2PbsqglCYk7mCPyt-Pf4/s320/fullscreen.jpg" width="320" /></a></div>
</blockquote>
ios.statusbar_hidden<br />
android.statusbar_hidden having both the value "true"<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h4>
Orientation,</h4>
this is available during runtime, but I wouldn't bet that it works on all platforms:<br />
<br />
<blockquote class="tr_bq">
if (Display.getInstance().canForceOrientation())<br />
<blockquote>
Display.getInstance().lockOrientation(false);</blockquote>
</blockquote>
for portrait lockOrientation(true);<br />
landscape lockOrientation(false);<br />
<br />
Now that I got what I wanted lets continue<br />
<br />
<h3>
Splash screen</h3>
<br />
My goal was to have a background image cover all the screen and on top of it to add things like loading and a brands. I managed to do this by a combination between of themes with GUI or code.<br />
<br />
First thing, to have a background image was more complicated than expected, and the way to do this is by adding a custom form selector inside the Themes with the Designer tool (double click the theme.res)<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji-B8FBppGK0suZttWoD5ilDXKUX4UCviqzjl74bWPeDEWU73u8SWlHyhflkf-aKMWcPSUPP5s7xkbvPspIj5H3e6VPITv-xNs5hu3wS3nbhtA8oE-Y9BCeJgHqAwWWR_fdC9Y7COzSU0/s1600/form_image_bg.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji-B8FBppGK0suZttWoD5ilDXKUX4UCviqzjl74bWPeDEWU73u8SWlHyhflkf-aKMWcPSUPP5s7xkbvPspIj5H3e6VPITv-xNs5hu3wS3nbhtA8oE-Y9BCeJgHqAwWWR_fdC9Y7COzSU0/s400/form_image_bg.jpg" width="400" /></a></div>
<br />
While, having the image in the project is done via Images > Quick Add multi images, where you want to add a big size to cover the HD and the smaller ones will be scaled from it.<br />
<br />
The name of the component is important, if you select Form and keep it like this the change of property will be applied to all the Forms. In my case I want this background for Splash only, so I set the name to be SplashForm.<br />
<br />
There is a trick, the same custom form selector has to be set for all the Form states, like Selected, Unselected, Pressed and Disabled (maybe not all in case of Splash, but better to be sure :P)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCYfm-kB0HGDE-Tsis0N9UNQP94vx869THoY9ewMZ30KfDg2CfK7HurqKuM7-UolDAmj8NNV2iBJ4Xy4HPScHbihQ82ucBN106Iz3gmQBu_xnwogAu4odSUvDgNcxrIyBqDJqTa40YUVE/s1600/form_image_bg_states.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCYfm-kB0HGDE-Tsis0N9UNQP94vx869THoY9ewMZ30KfDg2CfK7HurqKuM7-UolDAmj8NNV2iBJ4Xy4HPScHbihQ82ucBN106Iz3gmQBu_xnwogAu4odSUvDgNcxrIyBqDJqTa40YUVE/s400/form_image_bg_states.jpg" width="400" /></a></div>
<br />
<br />
Also important is that for the Form that it is on Splash you change the UIID to SplashForm (instead of Form). If you are using GUI the way to do this is very simple...<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBlJlmuAzo-tXRaqcjRVicmWsAfeoi2PgnHcg1zCgbgHMNfoDSQCWILkJaB0Now95Ig7czJUhzgYEOF6_cUmWO8v0BE1tWo48oODnenr2dGzu1nIPKolBtLI5JZku27wk0rKgYnS3lSLc/s1600/SplashForm_GUI.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBlJlmuAzo-tXRaqcjRVicmWsAfeoi2PgnHcg1zCgbgHMNfoDSQCWILkJaB0Now95Ig7czJUhzgYEOF6_cUmWO8v0BE1tWo48oODnenr2dGzu1nIPKolBtLI5JZku27wk0rKgYnS3lSLc/s400/SplashForm_GUI.jpg" width="400" /></a></div>
<br />
For the code (I used the Add GUI > Splash and rewritten it into code):<br />
<br />
Form splash = new Form();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>splash.setUIID("SplashForm");<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>BorderLayout bl = new BorderLayout();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>bl.setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>splash.setLayout(bl);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Container c = new Container(new FlowLayout());<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>c.addComponent(new Label("petrumo"));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>splash.addComponent(BorderLayout.NORTH, c);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>c = new Container(new BoxLayout(BoxLayout.Y_AXIS));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Container i = new Container(new FlowLayout(Component.CENTER));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>i.addComponent(new InfiniteProgress());<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>c.addComponent(i);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>i = new Container(new FlowLayout(Component.CENTER));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>i.addComponent(new Label("Loading"));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>c.addComponent(i);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>splash.addComponent(BorderLayout.SOUTH, c);<br />
<br />
splash.show();<br />
<br />
resulting in a nice Splash screen :)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_nLLvJUg2Zbr2cjPZP6B2sxg6yiXJPW8sQK9VS3jSV3weoqp-HAe-Tj_j2c8lQMQDLlEfRvdNxH-MB3vlHL4Gtz9aA8AKfbiue1F5EbiMJp0ICuARE9Z3_P8sm-xp34HHLN535IIwiF0/s1600/splash.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_nLLvJUg2Zbr2cjPZP6B2sxg6yiXJPW8sQK9VS3jSV3weoqp-HAe-Tj_j2c8lQMQDLlEfRvdNxH-MB3vlHL4Gtz9aA8AKfbiue1F5EbiMJp0ICuARE9Z3_P8sm-xp34HHLN535IIwiF0/s400/splash.jpg" width="400" /></a></div>
<br />
Topics: #codenameone #setup #splashscreen #fullscreen #orientationpetruhttp://www.blogger.com/profile/05770285129276823568noreply@blogger.com0tag:blogger.com,1999:blog-7763229987856910432.post-10038639089765287822013-10-30T12:29:00.001-07:002013-11-09T03:02:03.844-08:00CodenameOne the setup<h3>
Setup</h3>
Setting up the evironment of codenameOne was quite straightforward. I chose the Eclipse route and pretty much followed the <a href="http://www.codenameone.com/download.html">instructions</a>.<br />
<br />
After linking to the build server, my environment is ready to develop :)<br />
<br />
<h3>
Getting started</h3>
Creating the first project is common flow in Eclipse, however at one point you get to the choice of what kind of project do you want:<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVaZVHUHlUY6gEJkyHMOezRStcqJz34cprIMp9q_yyWQO2H2LnFqZ0EZb8JMfv8AqEy0hHMazjBcG4ImmC-8DO3rCITfwkDQ9xN9Io9QhlQFIB7-EMReczP9Q3LY_fzGfnpR-E1ltdiOs/s1600/new_project.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="309" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVaZVHUHlUY6gEJkyHMOezRStcqJz34cprIMp9q_yyWQO2H2LnFqZ0EZb8JMfv8AqEy0hHMazjBcG4ImmC-8DO3rCITfwkDQ9xN9Io9QhlQFIB7-EMReczP9Q3LY_fzGfnpR-E1ltdiOs/s320/new_project.jpg" width="320" /></a></div>
<ul>
<li>HelloWorld (Visual)</li>
<li>HelloWorld (Manual)</li>
<li>...</li>
</ul>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
At the beginning this wasn't so clear what I am about to get with each project. After a few trial and error I discovered that the Visual was giving me a visual project where whatever I can change it in the visual editor and the Manual was an empty one where I have to create the UI structure by code.<br />
<br />
<h4>
What are the differences between this two types of project?</h4>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsJV1fgGRi0gOX_BdG4ML_Lbx6QfguEfVx4pDiHvMoKMn7eqN23y5sHYqDJPC2-FbChUfTDd7cB6gas5H8pQzcusjdZhVRzP6r49sFyEiN4EkqmTPwUo5CSYc6K4T-Eiyr18A85nVABN0/s1600/manual_vs_visual.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsJV1fgGRi0gOX_BdG4ML_Lbx6QfguEfVx4pDiHvMoKMn7eqN23y5sHYqDJPC2-FbChUfTDd7cB6gas5H8pQzcusjdZhVRzP6r49sFyEiN4EkqmTPwUo5CSYc6K4T-Eiyr18A85nVABN0/s400/manual_vs_visual.jpg" width="400" /></a></div>
<br />
From the folder structure, I would say that the visual project has extra StateMachines in the generated and userclasses folder. I am sure that there are more in the properties and in the themes.res<br />
<br />
From the source code point of the view, the instantiation is quite different.<br />
In case of Manual<br />
<blockquote class="tr_bq">
public void start() {<br />
...<br />
Form hi = new Form("Hi World");<br />
hi.addComponent(new Label("Hi World"));<br />
hi.show();<br />
}</blockquote>
<div>
all the Forms have to be coded</div>
<div>
while for the Visual</div>
<div>
<blockquote class="tr_bq">
public void start() {<br />
...<br />
new StateMachine("/theme"); <br />
}</blockquote>
</div>
it is relaying on the instatiation of StateMachine<br />
<br />
<h4>
What is the common part?</h4>
By double clicking on the theme.res, you will open the CodenameOne Designer.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBROmJzPnDm1RI0X0YkQzVSzg9FPtx6uMuyxU4EvU383lrqfUSRdChBjYl0K5szY7WLkH8yvpKUeBZAvQviJB4Sm1JTMdyUSi3Czctah4nSEJExNvh2xyg2uncAz6kjhyoU_3mSW96eGg/s1600/ThemeEditor.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBROmJzPnDm1RI0X0YkQzVSzg9FPtx6uMuyxU4EvU383lrqfUSRdChBjYl0K5szY7WLkH8yvpKUeBZAvQviJB4Sm1JTMdyUSi3Czctah4nSEJExNvh2xyg2uncAz6kjhyoU_3mSW96eGg/s400/ThemeEditor.jpg" width="400" /></a></div>
<br />
Regardless from what kind of project you open the Designer, it looks the same. At least in case of Theme. My initial disappointment was actually that in case of Visual you can create new GUI Builder elements and they will reflect in the project, while in case of Manual you can do the same, but nothing happens to your project. I would prefer not to have this distinction and start by developing visual and later switch to coding.<br />
<br />
<h4>
Workaround</h4>
<br />
For this potential problem, without too much hassle or need of digging into it, either I created 2 projects one Manual and one Visual in addition to the one I am working on and use them to combine the Visual creation of the items and afterwards translating them into code for a greater control or I convert them in between<br />
<br />
<br />
<h4>
How to convert from Visual into Manual (Hello world example)</h4>
<br />
<br />
<ul>
<li>From codenameone_settings.properties remove </li>
</ul>
<blockquote class="tr_bq">
<br />mainForm=Main<br />package=generated<br />baseClass=src/generated/StateMachineBase.java<br />userClass=src/userclasses/StateMachine.java<br />guiResource=theme.res</blockquote>
<br /><ul>
<li>Delete from theme.res the GUI Element called Main.</li>
</ul>
<br /><ul>
<li>Delete from the src/ folder the genereted/ and userclasses/ folders</li>
</ul>
<br /><ul>
<li>From MyApplication </li>
</ul>
<br />Replace inside the -> start() the new StateMachine("/theme");<br />
<br />with<br />
<blockquote class="tr_bq">
Form hi = new Form("Hi World");<br /> hi.addComponent(new Label("Hi World"));<br /> hi.show();</blockquote>
Make sure your init method is initializing the theme<br />
<br />
<blockquote class="tr_bq">
public void init(Object context) {<br /> try{<br /> Resources theme = Resources.openLayered("/theme");<br /> UIManager.getInstance().setThemeProps(theme.getTheme(theme.getThemeResourceNames()[0]));<br /> }catch(IOException e){<br /> e.printStackTrace();<br /> }<br /> }</blockquote>
<br />
<br />
<ul>
<li>Reorganize imports and you are good to go :)</li>
</ul>
<br />
<br />
<br />
<h4>
How to convert from Manual into Visual (Hello world example)</h4>
The order of doing this is important, so please follow closely<br />
<br />
<br />
<ul>
<li>Add into codenameone_settings.properties </li>
</ul>
<br />
<br />
<blockquote class="tr_bq">
mainForm=Main<br />package=generated<br />baseClass=src/generated/StateMachineBase.java<br />userClass=src/userclasses/StateMachine.java<br />guiResource=theme.res</blockquote>
<br />
<ul>
<li>At this point, you want to copy from a GUI project the src/ generated and /userclasses folder, don't bother with already inside they will be overridden. </li>
</ul>
<br />
<br />
Add into theme.res a new GUI Element called Main, whatever form you want, save the theme.res. This cause the /generated files to be overridden.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUIkVxnfoSndaY0RH37An6T1ov342xogpbaND7LXe2hzHmxPcVmaMHC83mW2VZMWsZn5fGi8O-sSLsoLT5wzY2RtfwPc__J-kN53BAIa0TMzh6kx29cuhdyaETRjKcGpKrO__YhGsBaP8/s1600/new_main_GUI.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUIkVxnfoSndaY0RH37An6T1ov342xogpbaND7LXe2hzHmxPcVmaMHC83mW2VZMWsZn5fGi8O-sSLsoLT5wzY2RtfwPc__J-kN53BAIa0TMzh6kx29cuhdyaETRjKcGpKrO__YhGsBaP8/s320/new_main_GUI.jpg" width="320" /></a></div>
<br />
<br />
<ul>
<li>in the MyApplication inside the start() method replace the creation of forms with the </li>
</ul>
<br />
<blockquote class="tr_bq">
new StateMachine("/theme");</blockquote>
<br />
Also make sure the theme is not initialized inside the init(Object context)<br />
<br />
<blockquote class="tr_bq">
public void init(Object context) {<br /> }</blockquote>
<br />
Now you have Visual project :)<br />
<br />
<br />
Continued on creating a <a href="http://petrumo.blogspot.no/2013/10/codenameone-project-settings-and-splash.html">SplashScreen</a><br />
<br />
<br />
Topics: #codenameone #setup #helloworldpetruhttp://www.blogger.com/profile/05770285129276823568noreply@blogger.com0tag:blogger.com,1999:blog-7763229987856910432.post-68205207759698802422013-10-29T10:54:00.001-07:002013-11-04T10:03:11.229-08:00CodenameOne the beginning<h2>
Intro</h2>
<br />
I attended a presentation about <a href="http://www.codenameone.com/">CodenameOne </a>some time ago and since I saw it, I was charmed by the idea and I decided to give it a chance. As any other new technologies, before adopting them I am willing to put it to the test. So, my first question is if I can use it to develop commercial apps requiring a high professional level of quality and customization?<br />
<br />
In order to get more information I decided to work on a 'dummy' application and share the learning as I go along.<br />
<br />
Continued on <a href="http://petrumo.blogspot.no/2013/10/codenameone-setup.html">setup</a><br />
<br />
Topics: #codenameone, #learnpetruhttp://www.blogger.com/profile/05770285129276823568noreply@blogger.com0tag:blogger.com,1999:blog-7763229987856910432.post-71493366872004246392011-05-05T17:06:00.000-07:002013-11-04T10:03:31.287-08:00Android Design & Apps<div style="color: blue; text-align: center;"><span style="font-size: x-large;"><b></b></span></div><div style="text-align: center;"><b><span style="font-size: large;"><span style="color: blue;"> </span></span></b></div><div class="separator" style="clear: both; text-align: center;"></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAeWH4IKRM1WjXRDL1_QVAOZ-scs37IUABuji78TmoF6gC4NMyomTifdLRF-wOo-JeNUfl1gOi7BjZIAHvMR4IWNgmVEZtfLYaXJH4kWkeplEredewajIG_qAcqu01ABn8s8Iors3ooc4/s1600/right.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAeWH4IKRM1WjXRDL1_QVAOZ-scs37IUABuji78TmoF6gC4NMyomTifdLRF-wOo-JeNUfl1gOi7BjZIAHvMR4IWNgmVEZtfLYaXJH4kWkeplEredewajIG_qAcqu01ABn8s8Iors3ooc4/s200/right.png" width="111" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5FV4sgK55fIz0tTXC3PLHegeoWRyomx9vxUkZ3qWXybQ3e6WkCkYN_kY5NYEyo1faLSVoE__dJKW3-9SYUkDjlkmRaZglYBaNGJNUvqpeG4Rudniz1LbaY6aF45AxmwKSusyuTUqhES4/s1600/left.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5FV4sgK55fIz0tTXC3PLHegeoWRyomx9vxUkZ3qWXybQ3e6WkCkYN_kY5NYEyo1faLSVoE__dJKW3-9SYUkDjlkmRaZglYBaNGJNUvqpeG4Rudniz1LbaY6aF45AxmwKSusyuTUqhES4/s200/left.png" width="111" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin4Fph67gajkFyCFNQRisaj2T1RNe19BPIdZBK11g0-k7JyGzWPNK_u7Edvt5OuS6D7fQktmucDiLPipwyHzumtstKK6T4k5xFCgxqU-i3sn35cmyVRVpYhJuZji6MdHqCkcRubl9p8TU/s1600/main_page.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin4Fph67gajkFyCFNQRisaj2T1RNe19BPIdZBK11g0-k7JyGzWPNK_u7Edvt5OuS6D7fQktmucDiLPipwyHzumtstKK6T4k5xFCgxqU-i3sn35cmyVRVpYhJuZji6MdHqCkcRubl9p8TU/s320/main_page.png" width="178" /></a></div><br />
<br />
This is my Android layout, I like it so much that I want to share it :). In the followings I will explain how I have done this scenery design and what Apps I am using.<br />
<br />
I am using Sony Xperia X10 with 2.1 SDK Android, the 2.1 SDK should be the minimum requirement.<br />
<br />
Firstly, in order to organize your Apps in folders you need <a href="https://market.android.com/details?id=com.google.code.appsorganizer&feature=search_result">Apps Organizer</a>, next, for the background I recommend <a href="https://market.android.com/details?id=net.zedge.android&feature=search_result">Zedge</a>, where you can pick from a huge list of pictures. Other widgets on the surface are <a href="https://market.android.com/details?id=de.stohelit.folderplayer&feature=search_result">Mort Player</a> (on top) the 4x1 one with transparency, making it easy to change music from the first page, and <a href="https://market.android.com/details?id=de.dnsproject.clock_widget_main&feature=search_result">Animated Analog Clock</a> with Glass Inner Circular style.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc7OZs0sjwczr1WSHjvmwdpM_kKCALy1riB64zWJ34nAYiSYShpZJm7dVYgvZ43WoHG0kWcRdkw1EF6BaWFJaRYQ2-sQYD53XWDb6E71FEOm2-fY3qckChUZYfShAKpsK8dM12byb3UDo/s1600/contact.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc7OZs0sjwczr1WSHjvmwdpM_kKCALy1riB64zWJ34nAYiSYShpZJm7dVYgvZ43WoHG0kWcRdkw1EF6BaWFJaRYQ2-sQYD53XWDb6E71FEOm2-fY3qckChUZYfShAKpsK8dM12byb3UDo/s200/contact.png" width="110" /></a></div><br />
I organized the apps into four categories: Contact, Applications, Games and Tools with Apps Organizer and for each of them I picked an 'intuitive icon from default icons; afterwards I dragged the Apps Organizer widget on the screen for each label, as you can see on main screen.<br />
<br />
In Contact label I keep the 'contacting' applications like facebook, gmail, ... and including Messaging and Phonebook.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimSk3GaZiDkqv5ari9JMbHlVWEgPutOFt1foKoe_vbbS0Y_9NjxpDrcWWkmQOHvK-aFGtyQh4l5SN4Ylo5Pm0VL1Re65al2xFyS7AVerHHTgp3CKQTWONG7u3pN-If3ud705dnOd_qobY/s1600/applications.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimSk3GaZiDkqv5ari9JMbHlVWEgPutOFt1foKoe_vbbS0Y_9NjxpDrcWWkmQOHvK-aFGtyQh4l5SN4Ylo5Pm0VL1Re65al2xFyS7AVerHHTgp3CKQTWONG7u3pN-If3ud705dnOd_qobY/s200/applications.png" width="111" /></a></div>It worths mentioning that the star on the folder toggles the display of only stared applications or all of them the category.<br />
<br />
<br />
<br />
Getting to the Applications, I added here ones that can be considered an application, more like non-tool and non-cotact. To get an idea, I have here the Browser, Calculator, Camera, Maps and also nice apps from the market like <a href="https://market.android.com/details?id=com.devuni.flashlight&feature=search_result">Flashlight</a>, <a href="https://market.android.com/details?id=com.google.android.apps.reader&feature=search_result">Google Reader</a>, <a href="https://market.android.com/details?id=com.google.android.apps.translate&feature=search_result">Google Translate</a>, <a href="https://market.android.com/details?id=com.alensw.PicFolder&feature=search_result">QuickPic</a> (one of my favorites) ... the blue covered one is also very nice, but ain't on the market yet, so I gotta keep my mouth shut ;) <br />
<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiPWo_eEz5SHmgPGTV16zw9rzKoircMnXYCPj-4-00A9w19O-ppjntOCziwexCMKt309iaUUkYxy0FJ365CrkFS5Hac2NwJETYAV34PwvRLiLnWDB9P7MtlknMBANgOTuHp4lM0R6tyOg/s1600/tools.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiPWo_eEz5SHmgPGTV16zw9rzKoircMnXYCPj-4-00A9w19O-ppjntOCziwexCMKt309iaUUkYxy0FJ365CrkFS5Hac2NwJETYAV34PwvRLiLnWDB9P7MtlknMBANgOTuHp4lM0R6tyOg/s200/tools.png" width="111" /></a>Moving further with Tools, I have here <a href="https://market.android.com/details?id=mobi.infolife.taskmanager&feature=search_result">Advanced Task Manager</a>, Alarm Clock, <a href="https://market.android.com/details?id=com.google.code.appsorganizer&feature=search_result">Apps Organizer</a> (which makes all this possible), <a href="https://market.android.com/details?id=com.metago.astro&feature=search_result">Astro</a> ... and <a href="https://market.android.com/details?id=net.zedge.android&feature=search_result">Zedge</a>. Regarding the games, they are a lot of good ones on the market, I won't mention any.<br />
<div style="color: blue;"><br />
</div><span style="color: blue;">All the apps above are free on the Market Place.</span>petruhttp://www.blogger.com/profile/05770285129276823568noreply@blogger.com0