Hi,

I have a general question about pass in the resource variable:

when i reference a string type, it's posible to do it this way
(reference):

Toast.makeText(this, R.string.app_error, Toast.LENGTH_LONG).show();

or this way (instance by using getResources method):

Resources myResources = getResources();
CharSequence styledText = myResources.getText(R.string.stop_message);

But when it's an Array, only the second method is possible:

String[] stringArray;
stringArray = myResources.getStringArray(R.array.string_array);

Why it's not possible to reference an Array using the code line?

String[] stringArray;
stringArray = R.array.string_array;

Thanks,
Elad

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to