Android boot camp for developers using java by C. Hoisington (2013) PRG 335-Mobi
ID: 645584 • Letter: A
Question
Android boot camp for developers using java by C. Hoisington (2013)
PRG 335-Mobile Applications Development II
Chapter 7: Developer FAQs
1. Which Android control displays a two-dimensional grid of images?
2. In which category on the Palette is the GridView control located?
3. Name three locations where photos that are used in the Android environment can be stored.
4. Why was the ImageView control coded in the XML code in the chapter project instead of dragging the ImageView control onto the emulator?
5. Name six View containers.
6. Write a line of code that uses an instance of a GridView control named grLayout in a new ImageAdapter class using setAdapter().
7. Write a line of code that creates a reference array named Games for the images named callofduty, candycrush, halo, and sonicdash.
8. What are the array name and index of halo in question 7?
9. What is the array length of the Games array in question 7?
10.Write a line of code that determines the length of the Games array from question 7 and assigns the value to an int variable named numberOfGames.
11. Write a line of code that assigns dentalLength to the length of a string named dental.
12. What is the purpose of the argument arg2 in the chapter project?
13. In the chapter project, if the user selects panada, what is the value of arg2?
14. Write a custom toast message that resides within an onItemClick() method and states You have selected picture 4 of the political photos when arg2 is 4.
15. What do the numbers in the following statement represent?
pic.setLayoutParams(new GridView.LayoutParams(300, 325));
16. What does the aspect ratio 3:2 mean?
17. In the following method, what does int (integer) represent?
public int getCount( ) {
return Soccer.length;
}
18. What would be returned in the method in question 17 if the Soccer array has the maximum index of 22?
19. What term does the following define? Constructs the values of data members of the class.
20. Write a statement that sets the scale type to CENTER for an ImageView instance named tower.
Explanation / Answer
20.<img
19.data values
18.22
17.method
16.view purpose ratio.
15.arguments(parameters)
14.onItemClick(){
alert(You have selected picture 4 of the political photos when arg2 is 4.);
}
13.
1.kitkat
2.Development
3.Emulators
4.image save purpose
5.a.viewgroup
b.layout
c.Reference
d.Emulator
e.AVD
f.SD
6.
7.
8.
Games[2],halo
9.4
10.
11
12.