Search Header Logo

Android Boot Camp Day 2

Authored by Ritesh Phadtare

Computers

University

Used 1+ times

Android Boot Camp Day 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What XML attribute is used to specify the width of a view in Android?

layout_height

android_width

android:layout_width

width

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In Android, how do you display a simple toast message?

Toast.makeText(this, "Hello", Toast.LENGTH_SHORT).show();

showToast("Hello");

new Toast("Hello").display();

Toast.showMessage("Hello", Toast.LENGTH_SHORT);

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you start a new activity using an explicit Intent in Android?

startActivity(new Intent(this, NewActivity.class));

startActivity(NewActivity.class);

intent.startNewActivity(this, NewActivity.class);

startNewActivity(Intent(this, NewActivity.class));

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which layout manager is used to arrange elements in a grid in Android XML?

LinearLayout

RelativeLayout

GridLayout

FrameLayout

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How can you set the duration of a Toast message to be displayed for a longer time?

Toast.LENGTH_SHORT

Toast.LENGTH_LONG

Toast.DURATION_LONG

Toast.DURATION_SHORT

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?