What you say is very true for just localization but with the Android
approach I can have different resources (string, layouts, etc) for
portrate, landscape, local, even screen size and DPI etc.  In my
opinion the current resouce implementation is there to enable the
evolution of the Android hardware and allow application developers to
support future devices not just translations.

When resources can be dependant on the physical aspects of the device
(as well as local etc) you will need a much larger class to carry
around the necessary information.

--
RichardC

On Oct 18, 11:19 am, Jeffrey Blattman <jeffrey.blatt...@gmail.com>
wrote:
> yes of course that's the whole point of resources ... there's better
> ways to do it. Context is a massive class with UI-centric functionality.
> even the android Resources class has UI functionality. localization
> could have been factored out into a smaller non-UI class. in std Java i
> have Locale and ResourceBundle and those are used no matter what system
> framework i'm coding to.
>
> On 10/18/09 3:06 AM, RichardC wrote:
>
>
>
> > The need to pass the context around is because your strings (and all
> > resources) may be different for localization, layout, screen size etc.
> > So accessing a string (resource) without an application context does
> > not make sence.
>
> > --
> > RichardC
>
> > On Oct 18, 11:04 am, RichardC<richard.crit...@googlemail.com>  wrote:
>
> >> Try this:http://developer.android.com/guide/topics/resources/index.html
>
> >> --
> >> RichardC
>
> >> On Oct 18, 10:48 am, jax<jackma...@gmail.com>  wrote:
>
> >>> I have made a regular class that needs to use string from the R class.
>
> >>> I have imported the R class into the activity and am able to access
> >>> all the variables.
>
> >>> My Question is, how do you convert them to string,
>
> >>> For example: If I access R.string.myString it will return as an int
> >>> not a String
>
> --
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to