Hello JP, XPeria X10 mini resolution: 240x320
hope this helps On Oct 21, 9:35 am, JP <jetp...@yahoo.com> wrote: > Hi guys, > > I have a Layout Xml that is build up like this: > > - LinearLayout > -- RelativeLayout > ---- Some Stuff > -- RelativeLayout > ---- LinearLayout > ---- RelativeLayout > ---- MyLayout (extends RelativeLayout) > > Basically it is a view with a header, and a page with a top part in a > LiniearLayout, a middle part in a relative layout, and then the > remainder of the page in a layout that I created a class for that > extends RelativeLayout. > > I MyLayout I have drawn three circles. I use the OnMeassure method to > calculate their size based on how much space is available. This of > course changes based on the device it is viewed on. I then use > OnLayout to position the circles. In the OnLayout method I know the > size of the Layout. > > This works the way I want it to. There is one thing I don't > understand, and that is that the default scaling seems to be hdpi. So > when I ask for scaling I have to do this. Can anyone tell me why I > have to do this? > > float scale = getContext().getResources().getDisplayMetrics().density; > scale = scale / 1.5f; > > The next thing I don't get is that when I try this on a Sony Ericsson > eXperia X10 Mini the height scaling isn't correct. It is as if the > height is just way off scale. Can anyone tell me what the actual > resolution of the X10 mini is. Because it doesn't seem to be what the > phone reports back. > > Thanks, > JP -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en