non-integer array type resources?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

non-integer array type resources?

Postby SigmaX » Sat Jun 27, 2009 5:13 am

Hi,

I see helpful methods like getIntArray() and getStringArray() that return int or string array xml resources. However, I'd like to store numbers with decimal digits. How do I go about storing those in an xml resource? I don't see any equivalent float-array declaration type or something similar in the docs. I doubt storing them as strings and then going through the hassle of converting them prior to every calculation to be the right solution so I must be missing something.

Thanks in advance,
SigmaX
Freshman
Freshman
 
Posts: 2
Joined: Sat Jun 27, 2009 5:03 am

Top

Postby KillaChaos » Sun Jun 28, 2009 1:44 pm

It doesn't seem like there is any other option, but if you are making the array how can it be a hassle? If you know that they are going to be numbers you can just surround it with Double.parseDouble() and forget error checking.
KillaChaos
Freshman
Freshman
 
Posts: 6
Joined: Mon Jun 22, 2009 10:30 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 7 guests