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

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Inside the application element of the AndroidManifest.xml file, write the code so that the app icon is the icon stored in the file myicon.p n g in the mipmap directory. < activity android:name = ".MainActivity" < !-- Your code goes here --> < /activity>

(Short Answer)
4.8/5
(44)

The ____________ method of the Activity class is automatically called after the onCreate method is called when the activity becomes visible to the user.

(Short Answer)
4.9/5
(37)

Inside an Activity class, we want to create an AdView, set its size using the SMART_BANNER constant of the AdSize class, and set its ad unit id to ca-app-pub-xyz. Write the code for it. The AdView constructor, setAdSize, and setAdUnitId methods of the AdView class have the following APIs: public AdView( Context context ) public void setAdSize( AdSize adSize ) public void setAdUnitId( String adUnitId )

(Essay)
4.9/5
(40)

The ____________ method of the GestureDetector.OnGestureListener is called when the user swipes the screen.

(Short Answer)
4.7/5
(36)

The ____________ class enables us to draw shapes and bitmaps.

(Short Answer)
4.9/5
(40)

The ____________ element defines a row inside a TableLayout.

(Short Answer)
4.9/5
(47)

The ____________ class from the com.google.android.gms.ads package encapsulates the size of an ad banner.

(Short Answer)
5.0/5
(36)

The direct superclass of RelativeLayout, LinearLayout, and GridLayout is ____________.

(Short Answer)
4.8/5
(34)

We want to load an AdRequest named ar inside an AdView named v. Write the code for it. The loadAd method of the AdView class has the following API: public void loadAd( AdRequest request )

(Short Answer)
5.0/5
(34)

We have already obtained a SharedPreferences.Editor reference named editor. Write the code to store the value 100 and associate it with the key NUMBER. // editor is a SharedPreferences.Editor reference // Your code goes here

(Essay)
4.9/5
(39)

The DB class extends SQLiteOpenHelper. The name of our database is MYDB, and its version is 0. Code the constructor of DB.

(Essay)
4.9/5
(35)

Inside an activity element of the AndroidManifest.xml file, write the code so that this activity is supported only in vertical orientation. < activity android:name = ".MainActivity" < !-- Your code goes here --> < /activity>

(Short Answer)
4.8/5
(33)

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

(Short Answer)
4.7/5
(27)

Assuming that a Logcat filter is already set with the tag MYTAG, write one statement to output ERROR to Logcat.

(Short Answer)
4.7/5
(37)

We are coding inside an Activity class. Write the code inside the goToSecondActivity method so that we start a new activity from the MyActivity class. public void goToSecondActivity( View v ) { // Your code goes here }

(Essay)
4.8/5
(39)

You are creating a menu. Add two lines of code so that the following menu item has the title defined in the string named go (defined in strings.xml) and has an id of abc. < menu …> < item < !--Your code goes here--> app:showAsAction="ifRoom"/> … />

(Essay)
4.8/5
(33)

Inside the onCreate method, we created a GridLayout named grid. Write the code so that gridLayout is the View showing in this activity. public void onCreate( Bundle savedInstanceState ) { // The GridLayout grid has been created // Your code goes here }

(Short Answer)
4.7/5
(33)

Inside MainActivity, we coded a private class named TW that implements the TextWatcher interface. We instantiated a TW object, and we want to register that TW object on an EditText named myET so that when the user inputs something in the EditText, the methods of the TW class execute. Write the code for it. TW tw = new TW( ); // your code goes here

(Short Answer)
4.7/5
(36)

Inside the onCreate method, fill in the code to set the layout and GUI defined in activity_main.xml. public void onCreate( Bundle savedInstanceState ) { // Your code goes here }

(Short Answer)
4.8/5
(40)

Inside a RelativeLayout element, write the code that asks an EditText whose id is age and that is positioned to the right of the View whose id is name; its right edge is lined up with its parent View. < EditText android:layout_width="wrap_content" android:layout_height="wrap_content" < !-- Your code goes here --> android:inputType="numberDecimal" />

(Essay)
4.9/5
(27)
Showing 81 - 100 of 127
close modal

Filters

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