question

centerroadsoftware avatar image
centerroadsoftware asked

Soft Key Size Confusion

Hi, What is the height in pixels of the collapsed soft key bar in the new Kindle Fire HD, both the 7" and 8.9" models? I checked the updated spec doc ( https://developer.amazon.com/sdk/fire/specifications.html), but the descriptions for the soft keys across all of the models are confusing. For example, the height of the collapsed bar on the original Fire is 20px, however the new spec sheet states the height as "60px x (screen) when visible, centered 60px x 38px drag handle when collapsed", which I don't understand. The descriptions under the other models are equally confusing, at least to me. Can someone clear this up? I'd like to create HD specific versions of my app, but need to know the effective resolution after taking into account the collapsed soft key bar. On the original Fire, this was 1024x580. Thanks.
fire tablet
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

StephenC@Amazon avatar image
StephenC@Amazon answered
Let me see if I can get a better description of the screen sizes for you. Thanks for your patience.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DGuy@BitsAtPlay avatar image
DGuy@BitsAtPlay answered
Agreed ... I read through much of the docs looking for just that bit of information (i.e. pixel sizes of collapsed soft-key bar) and came away similarly confused. -David
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

StephenC@Amazon avatar image
StephenC@Amazon answered
Using the Kindle Fire HD 7" as an example: "Soft Keys Icon Sizes (when toolbar is visible)" refers to the size of the *icons* on the toolbar. The first measurement is "physical", or the amount of screen real estate they take up (78x78). Since they are square, we can use that measurement for the toolbar height. So the toolbar is 78 pixels high. The "visual" measurement is the boundary of the icon *picture* (38x38), centered on the 78x78 icon area. The "Fullscreen Handle" is the size of the control used to bring the toolbar back up when the device is in fullscreen mode. To see the effect, open the Silk browser and go to fullscreen mode. You will see a chevron at the bottom of the screen. That is the Fullscreen handle. To sum up: 1. The toolbar height is the height of the physical toolbar icon. 2. When the device is in fullscreen mode, the height of the handle is the shorter of the Fullscreen Handle dimensions.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

centerroadsoftware avatar image
centerroadsoftware answered
Thanks for the clarification!
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brass Key Software avatar image
Brass Key Software answered
Here are the sizes I've come up with. The OG Fire numbers are from the actual device and the others are from the emulator. These are for portrait mode, both full-screen and non-. None of the Fires send the correct dimensions to onSizeChanged() when in portrait mode. Landscape seems okay in my testing. The Fire series are the only Android devices I've run into with soft key bars that do not pass [b]available[/b] screen dimensions to onSizeChanged(). It's a pain, because I have to specially hardcode for the display sizes of the Fires. if (kindleFire) { if (fullscreen) { h = 1004; } else { h = 924; } } else if (kindleFire2G) { if (fullscreen) { h = 1024; } else { h = 940; } } else if (kindleFireHD7) { if (fullscreen) { h = 1280; } else { h = 1178; } }
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anshul@Amazon avatar image
Anshul@Amazon answered
Thank you for your inputs Brass Key Software. This will surely help other developers.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brass Key Software avatar image
Brass Key Software answered
In my opinion, this really should be considered a bug in the Fire's OS. I tried to report it to Amazon several months ago, but I don't think I got to the right person. onSizeChanged() should always receive accurate width and height numbers of the available screen area, but it doesn't. Some Android devices occasionally call it with (0, 0), but the Fire is the only one I'm aware of that calls it with non-zero, but wrong, size numbers. I think no other devices require apps to manually subtract soft key size from the values passed to onSizeChanged(). I thought maybe this would be fixed with the new OS derived from ICS, but it's still a problem in the emulator, at least.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anshul@Amazon avatar image
Anshul@Amazon answered
@Brass Key Software Thank you for bringing this up. We have forwarded your opinion to the concerned team. Also authoritative samples on how to discover current resolution can be found in the SampleScreenLayout example here: https://developer.amazon.com/sdk/fire/samples.html
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brass Key Software avatar image
Brass Key Software answered
That sample seems to be missing from the zip file.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anshul@Amazon avatar image
Anshul@Amazon answered
Please refer to the "SampleSoftkeyConfiguration" example in the zip file & that should help you.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.