Leo Uchiha
Leo Uchiha

Reputation: 61

What is "compiled resource datatype"?

I was going through Android Development Docs and there was "compiled resource datatype". What does this mean?

Upvotes: 0

Views: 164

Answers (1)

Giorgos Neokleous
Giorgos Neokleous

Reputation: 1767

A Compiled Resource Datatype is the jvm types the resources are compiled into.

If you look into the docs, you can find many examples.

Examples:

  1. A layout XML file has a compiled resource type of a View.
  2. A menu resource (xml) has a compiled resource type of a Menu.
  3. A bitmap drawable (.jpeg, .pngs) into BitmapDrawable.

The compiled resource datatype are the types which you will use to change, fetch, manipulate the datatypes. For example, loading a drawable using the Resource ID (can be found at the res/drawable), but if you want to apply tinting or shadows you need to use the BitmapDrawable methods.

Think of it as the medium of manipulating programmatically the files that can be found under the res/** directory.

Probably there is more to it than this, but for development purposes this would be a sufficient, I believe, explanation.

Upvotes: 1

Related Questions