This topic is moved from android-developers.

====== James Wang        Dec 4, 1:43 pm ====================
Dianne mentioned we can use "@*android:type/name" to reference
resource added to framework-res.apk at "what's the best way for OEM
to
organize it's own resources?"(http://groups.google.com/group/android-
framework/browse_thread/thread/e9974bd5a42af10a/1f7055086f5489a7).
And I did see it is used in android source and looks like it is used
to refer to internal resource not public, am I right?
I wonder whether it is possible to refer to internal resource without
errors in Eclipse. I tried but adt reports error.
Best regards.
James


======  Romain Guy   Dec 4, 3:40 pm ====================
That's correct, the @*android notation is used to access private
resources which you should *never* do unless you build the platform
at
the same time as your app. Private resources use unstable generated
ids which can and will change in each version of the platform. If you
were to use private resources in your app you would most likely see
your app break with the next version of Android.

- Show quoted text -
--
Romain Guy
Android framework engineer
[email protected]
Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

======  James Wang  Dec 4, 4:43 pm ====================
Thanks Romain.
I have to admit I have made wrong conclusion about build project
including @*android in Eclipse.
Just now, I tried it again with building success. Maybe I wrote it in
wrong way before.
However, we can not use com.android.internal.R to refer to resource
added by ourself in code since this R class is excluded from
android.jar.
Is there any way to get it included into android.jar?

======  Dianne Hackborn Dec 4, 4:53 pm ====================
Could you please move this to android-porting, since it is not about
app
development with the SDK?  Thanks.
(And fwiw, you can't access private symbols with the SDK.  If an app
is
doing that, it should be build with the platform build system to
ensure it
always is compatible with the platform.  ESPECIALLY when using
resources.)

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to