<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-5125797420998499820</id><updated>2009-11-12T09:41:41.264-03:00</updated><title type='text'>Small and Adaptive</title><subtitle type='html'>Tips and good practices on how to create Small and Adaptive Java ME applications.
All knowledge posted here comes from my &lt;a href="http://smallandadaptive.blogspot.com/search/label/applications"&gt;free applications&lt;/a&gt;.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default?start-index=26&amp;max-results=25'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-5609014453119627371</id><published>2009-10-25T06:56:00.002-03:00</published><updated>2009-10-25T06:59:37.351-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Books version 1.2</title><summary type='text'>This week I shared version 1.2 of Books, so I updated the blog entry listing all features and related JSRs.</summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/5609014453119627371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=5609014453119627371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5609014453119627371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5609014453119627371'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/10/books-version-12.html' title='Books version 1.2'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-3164417499956270778</id><published>2009-10-12T07:46:00.005-03:00</published><updated>2009-10-13T22:50:05.239-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><category scheme='http://www.blogger.com/atom/ns#' term='small'/><category scheme='http://www.blogger.com/atom/ns#' term='applications'/><title type='text'>Alphabet: my third study case</title><summary type='text'>With this application you can help your children learn the alphabet. Three letters at a time. When the child correctly presses the key for each letter three other letters are presented. There is a counter to stimulate the child to achieve higher scores. You can change letter colors based on the handset theme, but the application also have predefined colors.The application is available for downloa</summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/3164417499956270778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=3164417499956270778' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/3164417499956270778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/3164417499956270778'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/10/alphabet-my-third-study-case.html' title='Alphabet: my third study case'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-7494426832767328130</id><published>2009-09-16T07:08:00.002-03:00</published><updated>2009-09-16T07:14:16.962-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom ui'/><title type='text'>Adding a simple progress bar</title><summary type='text'>A progress bar is a visual representation of a Real Number between zero and one or a percentage between 0% and 100%.Below is a method for drawing a simple progress bar:/** * @param g Graphics * @param x * @param y * @param w width * @param h height * @param p part between zero and total * @param t total */void fillProgressBar (Graphics g, int x, int y, int w, int h, int p, int t) {  g.drawRect(x,</summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/7494426832767328130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=7494426832767328130' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/7494426832767328130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/7494426832767328130'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/09/adding-simple-progress-bar.html' title='Adding a simple progress bar'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-440103252941374302</id><published>2009-09-09T07:02:00.004-03:00</published><updated>2009-09-09T17:10:49.364-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Application Sindication</title><summary type='text'>It has been only a week since I shared Books and it got more than one thousand downloads. Of course I am happy with this number, but I was wondering how did these people find out about it? Of course this blog does not have so many readers. I write to a very specific nich.So I did some search and navigation on GetJar and found out RSS Feeds for application updates. They are organized by platforms </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/440103252941374302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=440103252941374302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/440103252941374302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/440103252941374302'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/09/appliation-sindication.html' title='Application Sindication'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-8257321524353893191</id><published>2009-09-02T21:15:00.004-03:00</published><updated>2009-10-25T06:54:25.736-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><category scheme='http://www.blogger.com/atom/ns#' term='small'/><category scheme='http://www.blogger.com/atom/ns#' term='applications'/><title type='text'>Books: a new study case</title><summary type='text'>Updated on 25/Oct/2009. New features on version 1.2I had some TXT books and wanted to read them on my cell phone. So I made this application and shared it. Features:Fullscreen landscape reading with biggest font available.Recent files list, so you do not need to browse for files every time you open the application.Resume reading from the same line you were (with progress bar since version 1.1) - </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/8257321524353893191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=8257321524353893191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/8257321524353893191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/8257321524353893191'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/09/books-new-study-case.html' title='Books: a new study case'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-4281618059501921770</id><published>2009-08-23T22:29:00.000-03:00</published><updated>2009-08-23T23:56:28.160-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><title type='text'>Fullscreen Landscape</title><summary type='text'>Most handset screens are portrait: higher than wider. What if you want to show content in landscape mode? Since MIDP 2.0 we can use an Sprite to rotate an image in 90 degrees.First thing we need is an Image of the correct size. Following code could be inside the constructor of a class that extends Canvas - considering an Sprite and an Image attributes:int width = Math.max(super.getWidth(), </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/4281618059501921770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=4281618059501921770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/4281618059501921770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/4281618059501921770'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/08/fullscreen-landscape.html' title='Fullscreen Landscape'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-5339504439261776727</id><published>2009-08-17T22:46:00.003-03:00</published><updated>2009-08-17T23:08:30.391-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><title type='text'>Open File Dialog</title><summary type='text'>Ok, this is not a Dialog... It is an Implicit List. As we do not have File Dialogs on LCDUI I decided to share my version with you. It did work with Sony Ericson and Motorola iDEN handsets.import java.io.IOException;import java.util.Enumeration;import java.util.Stack;import javax.microedition.io.Connector;import javax.microedition.io.file.FileConnection;import </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/5339504439261776727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=5339504439261776727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5339504439261776727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5339504439261776727'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/08/open-file-dialog.html' title='Open File Dialog'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-4644635679700293081</id><published>2009-07-06T17:30:00.003-03:00</published><updated>2009-07-07T15:34:00.274-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='midp 1.0'/><title type='text'>Know your audience</title><summary type='text'>Which handsets are actually downloading your Java ME application? How many users report that your applications runs fine with their handsets? The answers are available to GetJar developers at Download Stats - Compatibility report, but I had a problem with it...Since 2009 May, 14 my chess board has two versions available, one for MIDP 1.0 handsets and another for MIDP 2.0. From this day onwards I </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/4644635679700293081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=4644635679700293081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/4644635679700293081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/4644635679700293081'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/07/know-your-audience.html' title='Know your audience'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-1174082678040262257</id><published>2009-06-30T06:56:00.003-03:00</published><updated>2009-06-30T12:06:25.565-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom ui'/><title type='text'>Adding a scrollbar</title><summary type='text'>Sometimes you have more data to show than available space. One way to make this clear to the user is presenting a scroll bar.Lets update our custom alert to paint a scroll bar when necessary.Below is the source code of my simple scroll bar component:import javax.microedition.lcdui.Graphics;public class Scrollbar {  private int x, y, width, height;  private int total; // how much you have to </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/1174082678040262257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=1174082678040262257' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/1174082678040262257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/1174082678040262257'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/06/adding-scrollbar.html' title='Adding a scrollbar'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-628547285423202245</id><published>2009-06-20T09:16:00.001-03:00</published><updated>2009-06-20T09:26:53.486-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><title type='text'>Key Repetition with TimerTask</title><summary type='text'>It is not friendly to force your user to repeat key presses. My CustomImplicitList had this fault. If you wanted to move the selection using up/down keys or 2/8 numbers you had to press the key once for every change. To avoid this I made a simple change, adding the following method:protected void keyRepeated(int keyCode) {  this.keyPressed(keyCode);}Now the user can press and hold a key to keep </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/628547285423202245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=628547285423202245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/628547285423202245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/628547285423202245'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/06/key-repetition-with-timertask.html' title='Key Repetition with TimerTask'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-5154171676403475361</id><published>2009-06-14T12:41:00.001-03:00</published><updated>2009-06-14T12:50:10.116-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='midp 1.0'/><title type='text'>MIDP 1.0 long tail</title><summary type='text'>I don't know of any new handset that comes with a MIDP 1.0 Java Virtual Machine. New handsets comes with MIDP 2.0 or 2.1 and will come, eventually, with 3.0.But I know there is a market for these old handsets and began following the daily downloads of my Chess board. Below is an updated graphic of these downloads:We can see a trend with a smaller number of downloads for each week. Some day this </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/5154171676403475361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=5154171676403475361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5154171676403475361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5154171676403475361'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/06/midp-10-long-tail.html' title='MIDP 1.0 long tail'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_n2h0YU2KhbM/SjUbOKv3IgI/AAAAAAAAAMA/gpAzfMXZ2yI/s72-c/dailydownloads-20090614.PNG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-4940115514160026363</id><published>2009-05-26T22:26:00.000-03:00</published><updated>2009-05-26T22:28:29.567-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom ui'/><title type='text'>Bordered text</title><summary type='text'>How about adding a fancy bordered text to your customized UI? Simple, draw the text with the border color four times around the anchor point with just one pixel difference. Then draw the text with the desired color at the anchor point. Did not get it? How about the source code below?public void drawBorderedText(Graphics g, String text,  int x, int y, int anchor, int textColor, int borderColor){  </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/4940115514160026363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=4940115514160026363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/4940115514160026363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/4940115514160026363'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/05/bordered-text.html' title='Bordered text'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-7261685954345995036</id><published>2009-05-25T23:06:00.004-03:00</published><updated>2009-05-26T00:26:14.366-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>My News view</title><summary type='text'>I share what I consider interesting news at this site. If you want to easily follow them please use this RSS feed. These are the same news available at this blog, section "Also read...".</summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/7261685954345995036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=7261685954345995036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/7261685954345995036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/7261685954345995036'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/05/my-news-view.html' title='My News view'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-8757536464462401117</id><published>2009-05-16T15:09:00.002-03:00</published><updated>2009-05-16T15:24:39.284-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='build'/><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><title type='text'>Development branches</title><summary type='text'>How can I evolve two different versions of the same application? Using the same source code? For example, if one version uses MIDP 2.0 but the other uses MIDP 1.0? The answer is preprocessing.Since October/2003 I use Antenna: an Ant plugin that allows a developer to easily build, preverify and package a Java ME application, but it also has a pre-processor built in. To use it you need to add </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/8757536464462401117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=8757536464462401117' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/8757536464462401117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/8757536464462401117'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/05/development-branches.html' title='Development branches'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-4103074673335313460</id><published>2009-04-30T18:07:00.003-03:00</published><updated>2009-06-14T12:50:31.149-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='midp 1.0'/><title type='text'>MIDP 1.0 still matters</title><summary type='text'>Is it worth to keep a MIDP 1.0 version of your product? I found out that the answer is yes and will share the reasons.The latest verstion of my chess board - 1.7 - requires MIDP 2.0 and minimum screen resolution of 128x96. The previous version - 1.6 - required the same minimum screen resolution, but MIDP 1.0 instead.I could delete 1.6 and focus only on newer handsets, but got curious about how </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/4103074673335313460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=4103074673335313460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/4103074673335313460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/4103074673335313460'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/04/midp-10-still-matters.html' title='MIDP 1.0 still matters'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_n2h0YU2KhbM/SfoURpD3kdI/AAAAAAAAAL4/dsZyMubCKhQ/s72-c/chess+-+downloads.PNG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-706431215790447489</id><published>2009-04-19T07:55:00.003-03:00</published><updated>2009-04-19T08:06:07.747-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><title type='text'>Adding colors</title><summary type='text'>Since MIDP 2.0 it is possible to discover some colors defined by the handset user.There is a new method Display.getColor(int), the parameter may be one of six public constants from class Display: COLOR_BACKGROUND, COLOR_BORDER, COLOR_FOREGROUND, COLOR_HIGHLIGHTED_BACKGROUND, COLOR_HIGHLIGHTED_FOREGROUND, COLOR_HIGHLIGHTED_BORDER. The return is a valid color to be used with Graphics.setColor(int).</summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/706431215790447489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=706431215790447489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/706431215790447489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/706431215790447489'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/04/adding-colors.html' title='Adding colors'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-1429877307145593651</id><published>2009-03-26T22:42:00.001-03:00</published><updated>2009-05-26T22:30:39.957-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><category scheme='http://www.blogger.com/atom/ns#' term='custom ui'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Painting custom commands</title><summary type='text'>Commands should be the last elements drawn on the screen. This way the user will always know his options for that screen.We are using the height of commands area as the default font height, so we need to override getHeight method:private boolean hasCommands () {   return (this.leftCommand != null) || (this.rightCommand != null);}public int getHeight () {   int height = super.getHeight();      if </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/1429877307145593651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=1429877307145593651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/1429877307145593651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/1429877307145593651'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/03/painting-custom-commands.html' title='Painting custom commands'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-3265863175743627665</id><published>2009-03-01T12:31:00.004-03:00</published><updated>2009-05-26T22:30:39.957-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><category scheme='http://www.blogger.com/atom/ns#' term='custom ui'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Custom commands</title><summary type='text'>We presented ways to customize title and content with Canvas, but now it is time to also treat commands.For our code lets define the following attributes:private int leftCommandKey, rightCommandKey;A good example of adaptive code to identify command keys can be found at LWUIT class com.sun.lwuit.Implementation, method setKnownSoftKeyCodes.Below is an adapted snippet to treat Nokia and Motorola </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/3265863175743627665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=3265863175743627665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/3265863175743627665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/3265863175743627665'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2009/03/custom-commands.html' title='Custom commands'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-5675756450890787633</id><published>2008-12-15T22:32:00.001-03:00</published><updated>2009-05-26T22:30:39.957-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><category scheme='http://www.blogger.com/atom/ns#' term='custom ui'/><title type='text'>Custom Monospaced Font</title><summary type='text'>If you want to use custom fonts the easiest one to start with is Monospaced.As each character has the same width a simple math can define the correct point to draw.Lets start with just numbers, from zero (Unicode value 48) to nine (Unicode value of 57).Below is a PNG image of a very small font with three pixels width and five pixels height.The following class can be used to draw numbers using </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/5675756450890787633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=5675756450890787633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5675756450890787633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5675756450890787633'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2008/12/custom-monospaced-font.html' title='Custom Monospaced Font'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_n2h0YU2KhbM/SUeSLn42VdI/AAAAAAAAAK0/gYuYa4YxiAo/s72-c/monospaced_3_5.PNG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-3811399034350060770</id><published>2008-12-10T23:25:00.004-03:00</published><updated>2009-09-02T21:14:07.872-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><category scheme='http://www.blogger.com/atom/ns#' term='small'/><category scheme='http://www.blogger.com/atom/ns#' term='applications'/><title type='text'>Chess: A study case</title><summary type='text'>Since June/2007 I have been studying how to develop small and adaptive Java ME applications. My study case is a simple chess board and is available for free at GetJar.Current version has help text, good usability, unselect feature and support for touch screen devices. But still does not support check mate.I have just uploaded a new version. A single 15k jar file that supports resolutions from </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/3811399034350060770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=3811399034350060770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/3811399034350060770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/3811399034350060770'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2008/12/study-case.html' title='Chess: A study case'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-5829394800112295681</id><published>2008-12-03T22:19:00.000-03:00</published><updated>2008-12-03T23:20:45.749-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><title type='text'>Internationalization (or just I18N - count the letters between I and N)</title><summary type='text'>When developing adaptive Java ME applications one thing to take into account is the language used.There is a System.property where you can read the current language selected on the handset.String locale = System.getProperty("microedition.locale");The first two letters identify the language while the last two letters identify the country. For example, "en-US" represents English on United States of</summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/5829394800112295681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=5829394800112295681' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5829394800112295681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/5829394800112295681'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2008/12/internationalization-or-just-i18n-count.html' title='Internationalization (or just I18N - count the letters between I and N)'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-3998408831874685553</id><published>2008-11-24T22:12:00.003-03:00</published><updated>2008-11-24T22:23:33.263-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><title type='text'>Adding touch support</title><summary type='text'>No List implementation is complete without support for touch screen.Since MIDP 1.0 Canvas has support for touch screen devices with pointer methods.To make things easier we add an int attribute to hold the top pixel from where items are painted.Every time an item is added or removed this attribute is changed.Below are the changes on the code from previous post:public class CustomImplicitList </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/3998408831874685553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=3998408831874685553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/3998408831874685553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/3998408831874685553'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2008/11/adding-touch-support.html' title='Adding touch support'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-236877014814931385</id><published>2008-11-16T22:34:00.003-03:00</published><updated>2009-05-26T22:30:05.264-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><category scheme='http://www.blogger.com/atom/ns#' term='custom ui'/><title type='text'>Custom Implicit List</title><summary type='text'>If you have a few items to choose from, you may not need an LCDUI List instance. Below is a class that implements some methods of List, but have a custom drawing as it extends Canvas.The main differences is that append method does not receive an Image parameter and the constructor receives only title as parameter.On the next post we will add support for touch screen devices.Attention: MIP 2.0 </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/236877014814931385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=236877014814931385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/236877014814931385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/236877014814931385'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2008/11/custom-implicit-list.html' title='Custom Implicit List'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-577313862552352285</id><published>2008-11-02T17:24:00.002-03:00</published><updated>2008-11-02T17:31:39.330-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='small'/><title type='text'>Remove debug messages</title><summary type='text'>While developing an application it is common place to first use emulators. This environment gives access to stepping and watching variable values. Very useful, high development speed.Then you need to run the application on actual devices. Some manufacturers implement On Device Debugging so, the same environment is available even when the MIDlet is running on an actual device.For those that do not</summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/577313862552352285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=577313862552352285' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/577313862552352285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/577313862552352285'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2008/11/remove-debug-messages.html' title='Remove debug messages'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5125797420998499820.post-8799471531645610301</id><published>2008-10-24T22:14:00.004-03:00</published><updated>2008-10-24T22:23:58.664-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adaptive'/><title type='text'>Vertically centered text</title><summary type='text'>Images can be easily drawn at the center of the screen because Graphics.drawImage supports both anchors: HCENTER and VCENTER. To drawString we can use only HCENTER. If VCENTER is passed as argument an IllegalArgumentException is raised.So how do we draw vertically centered text?The maximum number of lines that fits the screen is obtained with a division:int maxLinesPerScreen = getHeight() / </summary><link rel='replies' type='application/atom+xml' href='http://smallandadaptive.blogspot.com/feeds/8799471531645610301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5125797420998499820&amp;postID=8799471531645610301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/8799471531645610301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5125797420998499820/posts/default/8799471531645610301'/><link rel='alternate' type='text/html' href='http://smallandadaptive.blogspot.com/2008/10/images-can-be-easily-drawn-at-center-of.html' title='Vertically centered text'/><author><name>Telmo Pimentel Mota</name><uri>http://www.blogger.com/profile/04051227500777659491</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13732980684812218779'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>