Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 30
Registered: ‎12-16-2010
My Device: Not Specified

Radio Buttons are huge

No matter what I set the size to, the circle graphic for the radio button skin always comes out to 50 px in height.  I can't tell which theme the apps use by default...is there a way to edit those?  My app is Flex 4.5.

 

 

Highlighted
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Radio Buttons are huge

Hey flash,

Can we get a sample code of wat you are working with to better assist you? Thanks!
J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Contributor
Posts: 30
Registered: ‎12-16-2010
My Device: Not Specified

Re: Radio Buttons are huge

Here's a plain app with just the Checkbox.  Note that the label isn't visible because the width is only 25 px.

 

 

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
  xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:CheckBox label="Huh?" width="25" height="25" />
</s:Application>

 

 

Screen shot 2010-12-16 at 5.47.58 PM.JPG

New Developer
Posts: 18
Registered: ‎11-14-2010
My Device: Not Specified

Re: Radio Buttons are huge

On an actual device that size, that is not huge. Working in a simulator is very misleading in terms of final product appearance on a real device.

 

50 pixels on the real device is only about 1/3 to 1/2 of an inch. Not much on a touch screen.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Radio Buttons are huge

hey,

 

it seems we cannot alter the size of the checkbox component even using the QNX AIR API through the normal AIR Mobile Project (strictly AS3). Doesnt just apply to MXML code. Here's a sample i tried:

 

 

var myCheckBox:CheckBox = new CheckBox();

addChild(myCheckBox);

myCheckBox.setSize(100,100);
 
trace(myCheckBox.width + ", " + myCheckBox.height);

 

although the race reports the size is changed the box itself isnt. when you apply the size to the checkbox it simply alters the size of the component that holds the checkbox not the actual checkbox. but as jackson stated the button is not a bad a size by default and feasible.

 

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 157
Registered: ‎12-16-2010
My Device: Torch 9800, PlayBook
My Carrier: I carry it myself

Re: Radio Buttons are huge

Here is a good article explaining the Hero mobile components and the fact that there is a "mobile skin" applied to them which makes them bigger.

 

http://www.adobe.com/devnet/flex/articles/mobile_development_hero_burrito.html

 

Also it states that the mobile skin is phone-size optimized and it will be fixed for tablets in the future release:

 

"Note that in this preview release, the mobile skins have been optimized for 240 dpi devices. On devices with lower pixel densities, such as tablets, these skins will appear a bit large by default—we'll be addressing this before our final release."

 

Hope this helps

----------
If you find this post helpful please "like" it and accept as a solution.
Contributor
Posts: 30
Registered: ‎12-16-2010
My Device: Not Specified

Re: Radio Buttons are huge

ah, thanks for that article, hadn't seen that.  

Developer
Posts: 157
Registered: ‎12-16-2010
My Device: Torch 9800, PlayBook
My Carrier: I carry it myself

Re: Radio Buttons are huge

You're welcome. This article is a great intro to Flex development overall and I am still digesting it myself Smiley Happy
----------
If you find this post helpful please "like" it and accept as a solution.