cluster1
cluster1

Reputation: 5674

What's is a "Android Resource File"?

Can someone provide me an understandable definition for "Android Resource File"?

Android Studio Menu

The following dialog confuses me even more:

Menu 2

What is considered as a "Resource Type" by them?

Upvotes: 2

Views: 4787

Answers (2)

Lisa
Lisa

Reputation: 127

Resource files hold extra content e.g. bitmaps, layout definitions, user interface strings, animation instructions that the app implements within its own code.

Resource types are held within resource files and are found in the project resource directory under res/. Find more information here: https://developer.android.com/guide/topics/resources/available-resources

Upvotes: 2

Son Truong
Son Truong

Reputation: 14173

In Android, a resource is a localized text string, bitmap, layout, or other small piece of noncode information that your app needs. At build time, all resources get compiled into your application.

The resources locates inside res directory of your app. The Android resource compiler processes resources arcording to which subforder they are in and the format of the file, for example:

  • res/drawable: Contains all resources file that can be drawable, such as (.png, .jpg, .gif) or xml file.

  • res/layout: Contains all resources file that defines user interface layout, such as activity_main.xml, fragment_login.xml.

  • res/color: Contains all resources file that defines list of colors that used in your app.

  • res/value: Contains all resources file that contains simple value like string, integer, etc.

  • ...

For more information, please see App resources overview and Resourcce types overview,

Upvotes: 2

Related Questions