Lecture 4: Resources and Drawables Flashcards

1
Q

Static or template data will probably be stored i the __ folder

A

/res

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the /res/values folder used for?

A

Holding the most basic datatypes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some of the types of .xml files that might be in the /res/values folder?

A
  • strings.xml
  • colors.xml
  • styles.xml
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why would you want to store things like strings in a strings.xml file?

A

To keep the content (strings) away from the styling (layouts) and the code (java)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Each string is a string __ object with a __

A
  • XML
  • name attribute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When fetching a string programmatically what permissions do we have?

A

Read-only

It cannot be modified

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the directory for image resources?

A

/res/drawable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What can you use to fetch an image resource?

A

@drawable/filename

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you apply additional metadata or attributes to the image?

A

Use an XML file as a wrapper for the image

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are nine-patch images?

A

A subclass of images

They are split into 9 sectors that are scaled separately from each other to fill a space without distorting the original shape

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are nine-patches usually used for?

A

Borders, textboxes, and cards

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are layer lists for?

A

Sets a draw order for images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are level lists for?

A

Lets you pick the order of images on top of eachother based on an integer level

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What types of files are the level-list and layer-list objects and where are they stored?

A
  • XML
  • /res/drawable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Where are custom fonts stored?

A

/res/font folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly