Friday, July 1, 2011

[android-developers] Re: Scaling text up to be relative to screen pixels

You don't need to make lots of layouts for the text size. Just put the
size in separate res/values directories, e.g. res/values-mdpi-xlarge/
dimens.xml. For pixel-perfect scaling games I suggest using Open GL.

On 1 Juli, 05:57, keyeslabs <keyes...@gmail.com> wrote:
> Struggling with the same thing.  Anyone find answers besides "just
> make lots and lots of layouts based on resolution"?
>
> On May 26, 9:14 pm, Robert Green <rbgrn....@gmail.com> wrote:
>
>
>
>
>
>
>
> > Not possible, eh?
>
> > On May 26, 1:03 pm, Robert Green <rbgrn....@gmail.com> wrote:
>
> > > I'm a long time Android developer (Been here since pre 1.0).  My focus
> > > is on games, so I don't care too much about the apps side of things.
> > > Generally I want a game to just consume the screen and everything to
> > > just scale up as a percentage (a button should always be 50% of the
> > > screen, etc).  I even want that on 10" tablets and whatever size
> > > future devices, because without scaling up, I have no other content so
> > > there will just be more blank space and a less predictable UI.
>
> > > I can work it out for buttons and such but how do I scale up text on
> > > my menus?  Saying, "use a surfaceview" is awesome for the game itself
> > > but all my legacy games have multiple activities for menus and use
> > > standard Android UI components.  They worked great on all screens
> > > before honeycomb/tablets, which are quickly becoming a major headache
> > > for me.
>
> > > Usually I just want 5 or so buttons laid out linearly vertically
> > > either in the center or on the right side of the screen (portrait/
> > > landscape) and I want the text on the buttons to scale up with the
> > > screen so it looks exactly the same at 1280x800 vs 480x320.  Am I
> > > missing something or is this not possible to do without adding
> > > additional layouts for larger screens (and potentially making even
> > > more layouts for even bigger screens later, etc)?
>
> > > Best practices to achieve this, anyone?

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment