Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

The easiest way of adding menu items (to specify the options menu for an activity) is inflating an XML file into the Menu via MenuInflater. With menu_main.xml we can do it in this way:

A.

@Override

public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true;

}

B.

@Override

public boolean onOptionsItemSelected(MenuItem item) {

getMenuInflater().inflate(R.menu.menu_main, menu);

return super.onOptionsItemSelected(item);

}

C.

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.menu.menu_main);

}

When using an ImageView, ImageButton, CheckBox, or other View that conveys information graphically. What attribute to use to provide a content label for that View?

A.

android:contentDescription

B.

android:hint

C.

android:labelFor

When using an EditTexts or editable TextViews, or other editable View. What attribute to use to provide a content label for that View?

A.

android:contentDescription

B.

android:hint

C.

android:labelFor

If constant LENGTH_INDEFINITE is used as a parameter for the setDuration method in Snackbar, what will happen?

A.

The Snackbar will be displayed for a short period of time.

B.

The Snackbar will be displayed for a long period of time.

C.

The Snackbar will be displayed for a very long period of time.

D.

The Snackbar will be displayed from the time that is shown until either it is dismissed, or another Snackbar is shown.

E.

The constant LENGTH_INDEFINITE is impossible parameter for the setDuration method in Snackbar

In application theme style, flag windowDrawsSystemBarBackgrounds () indicates:

A.

whether this window should have an Action Bar in place of the usual title bar.

B.

whether there should be no title on this window.

C.

that this window should not be displayed at all.

D.

whether this is a floating window.

E.

whether this Window is responsible for drawing the background for the system bars.

For example, we have a file in our raw folder app/src/main/res/raw/sample_teas.json. To get an

InputStream for reading it, from out Context context, we can do this:

A.

InputStream input = context.openRawResource(R.raw.sample_teas);

B.

InputStream input = context.getRawResource(R.raw.sample_teas);

C.

InputStream input = context.getResources().openRawResource(R.raw.sample_teas);

Relative positioning is one of the basic building blocks of creating layouts in ConstraintLayout. Constraints allow you to position a given widget relative to another one. What constraints do not exist?

A.

layout_constraintBottom_toBottomOf

B.

layout_constraintBaseline_toBaselineOf

C.

layout_constraintBaseline_toStartOf

D.

layout_constraintStart_toEndOf

When scheduling unique work, you must tell WorkManager what action to take when there is a conflict. You do this by passing an enum when enquing the work. For one-time work, you provide an ExistingWorkPolicy, which supports some options for handling the conflict. (Choose four.)

A.

REPLACE (existing work with the new work. This option cancels the existing work)

B.

KEEP (existing work and ignore the new work)

C.

APPEND (the new work to the end of the existing work. This policy will cause your new work to be chained to the existing work, running after the existing work finishes)

D.

APPEND_OR_REPLACE (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is CANCELLED or FAILED, the new work still runs)

E.

APPEND_OR_KEEP (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is CANCELLED or FAILED, the new work still not runs)

F.

APPEND_AND_RUN (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is PAUSED, the new work still runs)

G.

DESTROY (if any work exists, the new work will be ignored)

What is a correct part of an Implicit Intent for sharing data implementation?

A.

Intent sendIntent = new Intent(this, UploadService.class) sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);

B.

Intent sendIntent = new Intent(); sendIntent.setType(Intent.ACTION_SEND);

C.

Intent sendIntent = new Intent(this, UploadService.class) sendIntent.setData(Uri.parse(fileUrl));

D.

Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND);

What method should we use with Notification.Builder to supply a PendingIntent to be sent when the notification is clicked?

A.

setContentInfo

B.

setContentIntent

C.

setDeleteIntent