¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Mobile midterm

Duncan Levings 39 preguntas

Hacer el test

Este test tiene tipos de pregunta que se abren en el reproductor de siempre.

Preguntas del test (39)

  1. 1To create a click event for a button, there are 2 ways:
    Using onClick============
    XML:
    android:onClick="name"
    code:
    public void name (View view) {
    //code
    }

    using click listener===========
    Button btn = findViewById(R.id.name);
    btn.setOnClickListener(new View.OnClickListener() {
    @override
    public void onClick (View v) {
    //code
    }
    });
    1. AVerdadero
    2. BFalso
  2. 2Which of these layouts are most commonly used in our projects:
    1. AConstraintLayout
    2. BLinerLayout
    3. CFrameLayout
    4. DRelativeLayout
  3. 3Toasts:

    Toast.makeText(this, "hello", Toast.LENGTH_LONG).show();
    1. AVerdadero
    2. BFalso
  4. 4OnClick in XML
    Advantages:
    Easy to implement
    Disadvantages:
    Only available in OnClick event
    callback method must be in parent activity
    1. AVerdadero
    2. BFalso
  5. 5Inner class listener
    Advantages:
    Can use all events
    Disadvantages:
    harder to implement
    1. AVerdadero
    2. BFalso
  6. 6Widgets are design time created, when inflated it becomes a view
    1. AVerdadero
    2. BFalso
  7. 7Button hierarchy:
    Textview
    ^
    Button
    ^
    CompoundButton
    ^
    CheckBox, RadioButton, Switch, ToggleButton
    1. AVerdadero
    2. BFalso
  8. 8RadioButtons require a parent RadioGroup, which is a subclass of LinerLayout
    1. AVerdadero
    2. BFalso
  9. 9Spinners are a drop down selection of items that can be selected.
    Usually uses a string-array in string.xml to populate it.
    Can set the array in xml or by using an ArrayAdapter.
    Selected values can be get using getSelectedItemPosition or getSelectedItem.
    1. AVerdadero
    2. BFalso
  10. 10this vs MainActivity.this
    When the method call is directly within the Activity, use this
    When the method call is within an inner class, use MainActivity.this
    1. AVerdadero
    2. BFalso

Información

Descripción
Computer Science Test sobre Mobile midterm, creado por Duncan Levings el 17/10/2018.
Idioma
English
Visitas
6
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?