Posts:
5
Registered:
6/19/10
|
|
|
|
Differences between the simulator and the device
Posted:
Jun 19, 2010 4:43 AM
|
|
|
Hi, There are number of differences between the simulator and the device i've noticed.. My question is how to overcome such behavior? The list: 1) Changing KLabel font to BOLD dynamically - doesn't work on device. 2) Substitute Image by another image in code - works only on simulator. 3) Font size - fonts look much smaller on the device... i would make fonts larger, but this will impact the development on simulator.. Thanks! Dima
|
|
 |
Posts:
32
Registered:
2/24/10
|
|
|
|
Re: Differences between the simulator and the device
Posted:
Jun 20, 2010 10:38 AM
in response to:
dima2010
|
 |
Helpful |
|
|
Hi -- as a fellow developer, I'll give a few suggestions here:
In general, this is a bad problem. There are many difference between a real Kindle and the Simulator. (Other differences: An odd bug that can made a laid-out screen look fine on the Simulator, but be mostly or completely blank on a real Kindle [bug reported on another thread]. Security sandboxing differences that can make an app work fine or crash on each of real Kindle vs. Simulator/Mac vs. Simulator/PC.) In essence, one can't safely use the Simulator alone for development. I still find it convenient to use the Simulator; but one always has to transition to the real Kindle eventually and make sure everything works there too. The only cure is for the people at Amazon to gradually make the Simulator match the Kindle's behavior more exactly.
Re the three issues you bring up:
(1). I ran into this issue when I was trying to bold the currently-selected line in a menu. Eventually I realized that the problem was not with dynamic font-changing but with boldface not working on the real Kindle at all. To be specific, sans-serif bold currently does not work [bug reported on another thread]. Serif bold works, but looks hardly any darker than serif plain.
By the way, when I finally got the feature of dynamically bolding a menu line working (using serif bold), I found I didn't like it. Given the slow drawing speed on the Kindle screen, watching a line of text "stretch itself out" as it was replaced with its bold equivalent was slightly disturbing.
(2). "Substitute Image by another Image in code" -- Actually, I don't think this is a documented bug, and I think it should work. Are you calling repaint()?
(3). The font-size inconsistencies are a reported bug. They tried to fix this with the fairly recent revision of the Simulator, but apparently results were uneven. Hopefully will be further improved in future drafts.
|
|
|
 |
Posts:
186
Registered:
3/11/10
|
|
|
|
Re: Differences between the simulator and the device
Posted:
Jun 21, 2010 12:22 PM
in response to:
dima2010
|
|
|
1) As Halwass pointed out there is already a bug logged for San Serif bold text. We are working very hard to resolve all bugs but meanwhile you can use try out Serif bold. It should work just fine of the device.
2) The fact that image substitution works fine on the simulator leads me to suspect that you are calling repaint before the image is loaded all the way. Since the simulator is running on your computer, the CPU and file system transfer rate are no where compared to what they are on the Kindle. The images load much faster on the Simulator than they do on the Kindle which is why that paint call you make gets injected by the JVM since there is no change in UI at that point. A quick solution to this is to use a MediaTracker to make sure an image is loaded because calling a repaint on it. MediaTracker mtracker = new MediaTracker(this); mtracker.addImage(img,0); mtracker.waitForAll(); repaint();
Let me know if this helps.
3) Again this issue is also reported before. There is a bug on this issue. This is because the fonts on the Kindle and the Simulator are not the same. There is a slight difference in them which is why they are rendered differently. We are working very hard to resolve this issue as well.
Let me know if this helped you. Thanks
|
|
|
|
|