Exam 17: Android Development: Extending Views, Fragments, and Google Maps Permissions

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Assign the width of the current screen to a variable name width. // Your code goes here

(Essay)
4.9/5
(37)

The ____________ method of the Cipher class encrypts or decrypts an array of bytes into another array of bytes.

(Short Answer)
4.9/5
(37)

RSA is a(n) ____________ encryption algorithm.

(Short Answer)
4.8/5
(47)

Write a code that creates a GridLayout within the current context and sets its number of rows to four and its number of columns to two. // Your code goes here

(Essay)
4.9/5
(37)

Write the code to create a KeyGenerator object reference for the AES algorithm using the getInstance static method of the KeyGenerator class. The getInstance method has this API: public static KeyGenerator getInstance( String algorithm )

(Short Answer)
4.8/5
(36)

The View child is inside the View parent but is under another View, so we can see only part of it. We can use the ____________ method to bring the child to the front so that we can see it completely.

(Short Answer)
4.8/5
(38)

Inside an Activity class, write the code to retrieve an integer value written earlier by this app as a user preference. Assume that the integer has been written using the key ABC. If the corresponding value cannot be found, use a default value of 1.

(Essay)
5.0/5
(40)

db is a SQLiteDatabase reference; sql is a String representing a select SQL statement. Write a statement to execute that SQL statement and assign the result to an object reference of the appropriate data type.

(Short Answer)
4.8/5
(35)

Write a code that creates a 5 × 2 two-dimensional array of buttons. // Your code goes here

(Short Answer)
4.8/5
(42)

We want to center a map on a point defined by a LatLng object reference named center; map is the GoogleMap reference. Using the moveCamera method of GoogleMap, center the map on center.

(Essay)
4.8/5
(33)

Write a code that checks whether the button that was clicked is a button named b. If it is, it outputs to Logcat YES; otherwise, it outputs to Logcat NO (using the tag MA). private class ButtonHandler implements View.OnClickListener { public void onClick( View v ) { // Your code goes here } }

(Essay)
4.8/5
(37)

Inside an Activity class, a RelativeLayout named rl has been created. Write two statements to make its contents scrollable.

(Essay)
4.9/5
(42)

To create an Intent to open a web browser, we use an Intent constructor using the ACTION_VIEW constant of the Intent class as its first argument and a Uri as its second argument. Write the code to open a browser at the Google web page. Uri uri = Uri.parse( "http://www.google.com" ); // Your code goes here

(Essay)
4.7/5
(39)

We can use the ____________ method of the Canvas class to draw a rectangle.

(Short Answer)
4.9/5
(33)

Inside an Activity class, write a line of code to get a SharedPreferences reference.

(Essay)
4.8/5
(44)

The ____________ method of the View.OnTouchListener interface is called when the user touches the screen.

(Short Answer)
4.9/5
(35)

Write the code to create a Cipher object reference for the AES algorithm using the getInstance static method of the Cipher class. The getInstance method has this API: public static Cipher getInstance( String algorithm )

(Short Answer)
4.9/5
(37)

Inside a RelativeLayout element, insert code that adds an EditText element as follows: Its bottom edge is aligned with the bottom edge of an element whose id is a. Its left edge is aligned with the left edge of an element whose id is b. < EditText android:layout_width="wrap_content" android:layout_height="wrap_content" < !-- Your code goes here --> android:inputType="numberDecimal" />

(Essay)
4.8/5
(32)

Assuming that the device has a camera app installed, write two statements to start a camera app using 1 for the request code.

(Essay)
4.7/5
(48)

We want to define an area (a GridLayout.LayoutParams) within a GridLayout that starts at the first square of the grid and spans three rows and five columns. Write the code for it.

(Essay)
4.8/5
(43)
Showing 21 - 40 of 127
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)