Minimum size of radio buttons?

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
I created a layout on an 800x480x160 skin which includes two radio buttons. When I duplicated the layout on an 800x480x240 skin, the buttons were a lot larger, but when I try to reduce the size, it clips the button graphic.

It appears that the minimum size for a radio button at 160 dpi is about 35 and at 240 dpi, it's around 55. Is this correct?

At 55 dots on a 480-dot-high screen, two buttons take about a fourth of the screen, which is way too big. The button sizing has the same type of problem.

Here is a comparison of the two layouts:

 
Last edited:

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
The two screenshots above are a bit misleading. The lower resolution skin should be 50% larger than the high resolution skin.
The radio button physical size should be the same on both devices.

My concern is not with the buttons being the same physical size but that they are not the same size in relation to the rest of the layout. I can't do the layout if two radio buttons must, at a minimum, take a fourth of the screen.
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
I understand. I was afraid that was the reason. I think that my problem is that I have an 800x480x160 (7") device, so that is what I designed my layout on, but when I put it on an 800x480x240 (e.g.: 3.7") emulator, most of my layout was off the screen, so then I sized down the ImageViews and Labels to fit the screen, but ran into a problem when I couldn't size down the Checkboxes and Radio Buttons.

On top of that, I had the problem with fonts after sizing down Buttons and Labels, as discussed in another thread.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You need to make a difference with density and pysical screen size.
If you have a devive with 320*480 density 160 and another device with
480*720 density 240 both devices have almost the same physical screen dimensions. Working with dip dimensions adapts automaticaly the size of the views in pixels to get almost the same physical size. Fonts sizes are physical sizes so in that case not need to modify the values.
If you have two devices one with 800x480x240 and the other with 800x480x160, the second one has a bigger physical screen size. That means that you have more space on the screen and could put more views on it. In that case you could have a complete different layout (not a layout variant) taking advantage of the extra space. But even if you want the same layout but bigger you would also need another layout, to adapt the views pixel sizes and the font sizes.

Best regards.
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
I'm getting the same advice from Erel in the "Different font sizes..." thread. Between the two of you (and a couple of hours of experimenting), it's starting to sink in about how to do layouts for 800x480x160 and x240.

I still have some related questions, though:

First:

While experimenting, I had started with an 800x480x160 layout and compiled it onto an 800x480x240 emulator and of course, the print was too small. So I added a variant for the x240 (which I understand now should be done in a separate layout) and made the font bigger which, of course, caused the font to be too big on the x160 variant.

The unexpected result, however, was that when I compiled onto both an 800x480x160 and an x240 emulator, they both had the too-large fonts, but when I checked the x240 variant in Designer, it showed the font fitting okay.

In other words, it appears that the x240 variant was not being used when compiling to the x240 emulator -- it was still using the x160 variant. I thought that if a layout was made with a variant with the same specs as a particular device/emulator, it would use that variant, but it didn't in this case.

Maybe it doesn't matter since I should be doing the x240 in a separate layout instead of in a variant, but I'm just curious why it didn't use it.

Second:

If you look at either of the above links, you'll see that the title bar and icon/notification bar at the top are so small that they are illegible, yet if you measure it (make sure you're not magnifying the page), you'll see that it is 3.7" diagonally, so it is the same size as an actual device.

Third:

Speaking of same size -- when starting up an emulator with AVD Manager, I enter the actual device size and my monitor's specs, which I thought was supposed to make the emulator the actual size, but it's way too small.

Example: to get a device that is actually 3.7" diagonally on the screen, I have to enter 4.75", and to get a 7" emulator, I have to enter 9".

Isn't the point of entering the actual device size that it is supposed to make the emulator that size on the screen, or not?
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
The two screenshots above are a bit misleading. The lower resolution skin should be 50% larger than the high resolution skin.

The reason the skins are the same size is because that is how AVD Manager makes them as a default. If I check "Scale display to real size" when starting an emulator in AVD manager, I can get it to make an emulator the actual physical size of, say, a 3.7" screen, but not at a density of 240.

My second question in the prior message was about the title bar and icons appearing to be too small. (See the screen shot links in that message.) That's because while the emulator is 3.7" diagonal, it apparently is no longer 800x400, even though the AVD I was installing was 800x480x240.

I discovered this when I was following the advice from you and Klaus about putting the 800x480x240 layout in its own layout file and loading it if the device's width and density matched. When the app didn't load the x240 layout onto what I thought was the 800x480x240 emulator, I put a LOG in the code to check on the density and it said that the emulator's scale is 1.

So I'm back to letting AVD Manager make the oversized emulator, which does load the x240 layout file, but because of its size, it's hard for me to know if type sizes and buttons, etc., are big enough for the actual device size.

Is it possible to make a 1.5 scale emulator which is the actual physical size onscreen of a device (such as 3.7" diagonal)?

For the record, I did put in my monitor's screen size and resolution.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…