wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Android Quiz 02

Total questions: 20

Worksheet time: 44mins

Name
Class
Date
1.

which is the correct camel case for method called getstudentname ?


ما هي الصيغة الصحيحة لكتابة الاجراء

getstudentname

باسلوب

camel case

a)

GetStudentName

b)

Get_student_Name

c)

getStudentName

d)

GETSTUDENTNAME

2.

ListView is a ViewGroup ?


هل الليست فيو تعتبر فيو جروب ؟

a)

Yes

b)

No

3.

To Make LinearLayout take screen width we use attribute ?


لجعل

LinearLayout

تأخذ عرض الشاشة نستخدم الخاصية

a)

android:layout_width = "screen_width"

b)

android:layout_width = "match_parent"

c)

layout_width = "match_parent"

d)

android:layout_width = "wrap_content"

4.

we use layout_weight with RelativeLayout to ....


نحن نستخدم الخاصية

layout_weight

مع

RelativeLayout

من اجل

a)

center content

b)

separate layout with percent

c)

set width for layout

d)

do not used

5.

what is the default value for attribute layout_weight ?


ما هي القيمة الافتراضية للخاصية

layout_weight

a)

1

b)

0

c)

100

d)

1dp

6.

To order elements Vertically inside RelativeLayout we use ..


اذا اردنا ترتيب العناصر بصورة رأسية داخل اداة

RelativeLayout

نستخدم

a)

android:orientation = "horizontal"

b)

android:orientation = "vertical"

c)

orientation = "vertical"

d)

do not used

7.

choose the correct statement to register id for TextView called txtUserName


قم بإختيار العبارة الصحيحة لتسجيل معرف

id

الي اداة النص المسماه

txtUserName

a)

android:id="@id/txtUserName"

b)

android:setId="@id/txtUserName"

c)

android:layout_id="@+id/txtUserName"

d)

android:id="@+id/txtUserName"

8.

what is the attribute that used to set font size for TextView


ما هي الخاصية التي تستخدم لاعداد حجم الخط للكنترول

TextView

a)

android:font-size

b)

android:font_size

c)

android:textsize

d)

android:textSize

9.

what is the font size unit in android ?


ما هي وحدة قياس حجم الخط في الاندرويد ؟

a)

px

b)

sp

c)

dp

d)

inch

10.

we have 2 TextView inside RelativeLayout called txtFirstName and txtLastName , if we need to align txtLastName under txtFirstName we will use ...

a)

android:layout_alignParentBottom="true"

b)

android:layout_alignBottom="@id/txtFirstName"

c)

android:layout_toBottomOf="@id/txtFirstName"

d)

android:layout_alignBottom="@+id/txtFirstName"

e)

android:layout_below="@id/txtFirstName"

11.

choose the correct statement to set inner margin for ImageView


قم باختيار العبارة الصحيحة لاعداد الهامش الداخلي لعنصر

ImageView

a)

android:padding = "12dp"

b)

android:layout_margin = "12dp"

c)

android:layout_margin = "12db"

d)

android:layout_margin = "12sp"

12.

LinearLayout is a View Group that support overlapping Elements ..

a)

True

b)

False

13.

To Config Image Resource for ImageView use ..


لاعداد مصدر الصورة للاداة

ImageView

نستخدم

a)

android:src="@drawable/photo.png"

b)

android:src="@+drawable/Photo"

c)

android:image="@drawable/Photo"

d)

android:src="@drawable/photo"

14.

To Make Comment inside XML File we use ..


لكي نقوم بعمل تعليق داخل ملف اكواد

XML

a)

//Comments Here

b)

/*comments Here*/

c)

/** comments Here */

d)

<!-- comments Here -->

15.

we have Class called Person that contain 2 public variables , so Person is Primitive Data Type

a)

True

b)

False

16.

Int x = 100;

Int y = 200;

int sum = x + y ;


The Sum value is :


تنفيذا للاكواد السابقة تكون قيمة المتغير

Sum

تساوي

a)

100200

b)

300

c)

200100

d)

do not used

17.

String 1MArabCoder = "One Million Arab Coder";

String forEver = "For Ever" ;

String output = 1MArabCoder + " " + forEver ;


The value of variable output is :

a)

One Million Arab Coder For Ever

b)

1MArabCoder forEver

c)

One Million Arab Coder forEver

d)

do not used

18.

Select Error Reasons for next statements (Multi Choose)


int _Salary = 5000 ;

int $price = 200 ;


اختر اسباب الأخطاء في الجمل التالية

a)

cant start variable with UnderScore

b)

cant start variable with $

c)

cant start variable with number

d)

no errors

19.

The PSeudo Code for next statement is ..


String firstName = "My name is Mohammed Salah" ;

Log.v("MainActivity",firstName ) ;

a)

My name is Mohammed Salah

b)

Log the varialbe firstName

c)

firstName

d)

mainActivity

20.

LinearLayout is a viewgroup that support nested layout

a)

yes

b)

no