Deck 7: Google Analytics Individual Qualification

ملء الشاشة (f)
exit full mode
سؤال
In our TeaViewModel class, that extends ViewModel , we have such prorerty: val tea: LiveData An observer in our Activity (type of mViewModel variable in example is ) is set in this way: mViewModel!!. tea .observe(this, Observer { tea: Tea? -> displayTea(tea) } ) What will be a correct displayTea method definition?

A) private fun displayTea()
B) private fun displayTea(tea: Tea?)
C) private fun displayTea(tea: LiveData?)
D) private fun displayTea(tea: LiveData?)
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
If you want the Database Inspector to automatically update the data it presents as you interact with your running app, check the Live updates checkbox at the top of the inspector window. While live updates are enabled, what happens with the table in the inspector window?

A) It is still editable. You can modify data in a table by double-clicking a cell, typing a new value, and pressing Enter.
B) It becomes read-only and you cannot modify its values.
C) It becomes read-only, but you cannot see its updated values before updating the data by clicking the Refresh table button at the top of the inspector window.
سؤال
What happens when you create a DAO method and annotate it with @Insert?
Example:
@Dao
interface MyDao {     
@Insert(onConflict = OnConflictStrategy.REPLACE)     
Fun insertUsers(vararg users: User)
}

A) Room generates an implementation that inserts all parameters into the database in a single transaction.
B) Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
C) Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
سؤال
The Log class allows you to create log messages that appear in logcat. Generally, you could use the following log methods: (Choose five.)

A) Log.e(String, String) (error)
B) Log.a(String, String) (all outputs)
C) Log.w(String, String) (warning)
D) Log.i(String, String) (information)
E) Log.q(String, String) (questions)
F) Log.d(String, String) (debug)
G) Log.v(String, String) (verbose)
سؤال
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Into <strong>When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Into   you can</strong> A) examine the object tree for a variable, expand it in the Variables view. If the Variables view is not visible B) evaluate an expression at the current execution point C) advance to the next line in the code (without entering a method) D) advance to the first line inside a method call E) advance to the next line outside the current method F) continue running the app normally <div style=padding-top: 35px> you can

A) examine the object tree for a variable, expand it in the Variables view. If the Variables view is not visible
B) evaluate an expression at the current execution point
C) advance to the next line in the code (without entering a method)
D) advance to the first line inside a method call
E) advance to the next line outside the current method
F) continue running the app normally
سؤال
With a room database. When performing queries, you'll often want your app's UI to update automatically when the data changes. Can you use a return value of type LiveData in your query method description to achieve this?

A) Yes
B) No
سؤال
To automate UI tests with Android Studio, you implement your test code in a separate Android test folder. Folder could be named:

A) app/androidTest/java
B) app/src/androidTest/java
C) app/java/androidTest
سؤال
What do you want from Room when you create a DAO method and annotate it with @Delete? Example:
@Dao
Interface MyDao {
@Delete
Fun deleteUsers(vararg users: User)
}

A) Room generates an implementation that inserts all parameters into the database in a single transaction.
B) Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
C) Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
سؤال
Filter logcat messages. If in the filter menu, a filter option "Show only selected application"? means

A) Display the messages produced by the app code only (the default). Logcat filters the log messages using the PID of the active app.
B) Apply no filters. Logcat displays all log messages from the device, regardless of which process you selected.
C) Create or modify a custom filter. For example, you could create a filter to view log messages from two apps at the same time.
سؤال
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Out <strong>When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Out   you can</strong> A) examine the object tree for a variable; expand it in the Variables view. If the Variables view is not visible B) evaluate an expression at the current execution point C) advance to the next line in the code (without entering a method) D) advance to the first line inside a method call E) advance to the next line outside the current method F) continue running the app normally <div style=padding-top: 35px> you can

A) examine the object tree for a variable; expand it in the Variables view. If the Variables view is not visible
B) evaluate an expression at the current execution point
C) advance to the next line in the code (without entering a method)
D) advance to the first line inside a method call
E) advance to the next line outside the current method
F) continue running the app normally
سؤال
Once your test has obtained a UiObject object, you can call the methods in the UiObject class to perform user interactions on the UI component represented by that object. You can specify such actions as: (Choose four.)

A) click() : Clicks the center of the visible bounds of the UI element.
B) touch() : Touch the center of the visible bounds of the UI element.
C) dragTo() : Drags this object to arbitrary coordinates.
D) moveTo() : Move this object to arbitrary coordinates.
E) setText() : Sets the text in an editable field, after clearing the field's content. Conversely, the clearTextField() method clears the existing text in an editable field. F) swipeUp() : Performs the swipe up action on the UiObject. Similarly, the swipeDown() , swipeLeft() , and swipeRight() methods perform corresponding actions.
سؤال
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) val input = context!!.openRawResource(R.raw.sample_teas)
B) val input = context!!.getRawResource(R.raw.sample_teas)
C) val input = context!!.resources.openRawResource(R.raw.sample_teas)
سؤال
<strong>  What is illustrated in the picture?</strong> A) Logcat window with filter settings B) Debugging native code using LLDB C) The Variables and Watches panes in the Debugger window D) The Breakpoints window lists all the current breakpoints and includes behavior settings for each E) Adding a watchpoint to a variable in memory <div style=padding-top: 35px> What is illustrated in the picture?

A) Logcat window with filter settings
B) Debugging native code using LLDB
C) The Variables and Watches panes in the Debugger window
D) The Breakpoints window lists all the current breakpoints and includes behavior settings for each
E) Adding a watchpoint to a variable in memory
سؤال
For example, we have a file in our assets folder app/src/main/assets/sample_teas.json . To get an I nputStream for reading it, from out Context context, we can try do this:

A) val input = context!!.resources.openRawResource(R.raw.sample_teas)
B) val input = context!!.assets.open("sample_teas.json")
C) val input = context!!.resources.assets.open("sample_teas.json")
سؤال
If you want to access a specific UI component in an app, use the UiSelector class. This class represents a query for specific elements in the currently displayed UI. What is correct about it? (Choose two.)

A) If more than one matching element is found, the first matching element in the layout hierarchy is returned as the target UiObject.
B) If no matching UI element is found, an IOException is thrown.
C) If more than one matching element is found, the last matching element in the layout hierarchy is returned as the target UiObject.
D) If no matching UI element is found, a UiAutomatorObjectNotFoundException is thrown.
سؤال
To create a basic JUnit 4 test class, create a class that contains one or more test methods. A test method begins with the specific annotation and contains the code to exercise and verify a single functionality in the component that you want to test. What is the annotation?

A) @RunWith
B) @LargeTest
C) @Rule
D) @Test
سؤال
<strong>  The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Small tests are unit tests that :</strong> A) validate your app's behavior one class at a time. B) validate either interactions between levels of the stack within a module, or interactions between related modules. C) validate user journeys spanning multiple modules of your app. <div style=padding-top: 35px> The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Small tests are unit tests that :

A) validate your app's behavior one class at a time.
B) validate either interactions between levels of the stack within a module, or interactions between related modules.
C) validate user journeys spanning multiple modules of your app.
سؤال
What do you want from Room when you create a DAO method and annotate it with @Update? Example:
@Dao
Interface MyDao {
@Update
Fun updateUsers(vararg users: User)
}

A) Room generates an implementation that inserts all parameters into the database in a single transaction.
B) Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
C) Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
سؤال
To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar. <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run   <div style=padding-top: 35px> Run your test in one of the following ways (select possible): (Choose three.)

A) To run a single test, open the Project window, and then right-click a test and click Run . <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run   <div style=padding-top: 35px>
B) To test all methods in a class, right-click a class or method in the test file and click Run <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run   <div style=padding-top: 35px>
C) To run all tests in a directory, right-click on the directory and select Run tests <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run   <div style=padding-top: 35px>
D) To run all tests in Project, open the Project window, and then right-click a test and click Run <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run   <div style=padding-top: 35px>
سؤال
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Over <strong>When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Over   you can</strong> A) examine the object tree for a variable; expand it in the Variables view. B) evaluate an expression at the current execution point C) advance to the next line in the code (without entering a method) D) advance to the first line inside a method call E) advance to the next line outside the current method F) continue running the app normally <div style=padding-top: 35px> you can

A) examine the object tree for a variable; expand it in the Variables view.
B) evaluate an expression at the current execution point
C) advance to the next line in the code (without entering a method)
D) advance to the first line inside a method call
E) advance to the next line outside the current method
F) continue running the app normally
سؤال
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)
H) APPEND_OR_DESTROY (if no any work exists, the new work will be ignored)
سؤال
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);
}
سؤال
Building your app from the command line, if you have a "demo" product flavor, then you can build the debug version with the command:

A) gradlew assembleDemoDebug
B) gradlew installDemoDebug
C) both variants are correct.
سؤال
Interface for a callback to be invoked when a shared preference is changed. Interface is named:

A) android.content.SyncStatusObserver
B) android.content.SharedPreferences.Editor
C) android.content.SharedPreferences.OnSharedPreferenceChangeListener
D) android.content.SharedPreferences
سؤال
What is the incorrect statement about Data Access Object ( androidx.room.Dao )?

A) Data Access Objects are the main classes where you define your database interactions. They can include a variety of query methods.
B) The class marked with @Dao should either be an interface or an abstract class. At compile time, Room will generate an implementation of this class when it is referenced by a Database. The class marked with @Dao should either be an interface or an abstract class. At compile time, Room will generate an implementation of this class when it is referenced by a Database.
C) An abstract @Dao class can optionally have a constructor that takes a Database as its only parameter. An abstract class can optionally have a constructor that takes a Database as its only parameter.
D) It is recommended to have only one Dao class in your codebase for all tables.
سؤال
What statements about InputStreamReader (java.io.InputStreamReader) are correct? (Choose two.)

A) An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
B) An InputStreamReader is a bridge from character streams to byte streams: It reads characters using a specified charset and encodes them into bytes. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
C) Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte-input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
D) No any invocation of one of an InputStreamReader's read() methods can cause some bytes to be read from the underlying byte-input stream.
سؤال
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
سؤال
SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. To mark in the editor that a preference value should be removed, which will be done in the actual preferences once commit() or apply() is called, what method in should we use?

A) delete(String key)
B) clear()
C) remove(String key)
D) removeAll()
سؤال
What public methods are there in android.widget.Toast.Callback? (Choose two.)

A) onDismissed()
B) onToastHidden()
C) onShown()
D) onToastShown()
E) onToastCancelled()
سؤال
Assume that you have the following situation: The app code calls for R.string.text_a Three relevant resource files are available: - res/values/strings.xml, which includes text_a in the app's default language, in this case English. - res/values-mcc404/strings.xml, which includes text_a in the app's default language, in this case English. - res/values-hi/strings.xml, which includes text_a in Hindi. The app is running on a device that has the following configuration: - The SIM card is connected to a mobile network in India (MCC 404). - The language is set to Hindi (hi). Which is the correct statement below?

A) Android loads text_a from res/values/strings.xml (in English)
B) Android loads text_a from res/values-mcc404/strings.xml (in English)
C) Android loads text_a from res/values-hi/strings.xml (in Hindi)
سؤال
Select correct statements about Hardware Abstraction Layer (HAL). (Choose two.)

A) The HAL provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework.
B) The HAL function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don't need to build that functionality yourself - you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify
C) The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware component, such as the camera or bluetooth module. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component.
D) Using a HAL, not using a Linux kernel, allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.
سؤال
SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. All changes you make in an editor are batched, and not copied back to the original until you call:

A) commit()
B) apply()
C) commit() or apply() or
سؤال
In a class PreferenceFragmentCompat . As a convenience, this fragment implements a click listener for any preference in the current hierarchy. So, in what overridden method we can handle that a preference in the tree rooted at this PreferenceScreen has been clicked?

A) onCreateLayoutManager
B) onCreatePreferences
C) onCreateRecyclerView
D) onPreferenceTreeClick
سؤال
With our Context we can get SharedPreferences with a method, named: getSharedPreferences(String name, int mode) . What value can we transfer in a "mode"parameter?

A) MODE_PRIVATE or MODE_PUBLIC MODE_PRIVATE or MODE_PUBLIC
B) combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE
C) Value is either 0 or a combination of MODE_PRIVATE , MODE_WORLD_READABLE , D MODE_WORLD_WRITEABLE , and MODE_MULTI_PROCESS Value is either 0 or a combination of , , D , and MODE_MULTI_PROCESS
سؤال
If no any folder like res/anim-, res/drawable-, res/layout-, res/raw-, res/xml- exist in the project. Which folders are required in the project anyway? (Choose two.)

A) res/anim/
B) res/drawable/
C) res/layout/
D) res/raw/
E) res/xml/
سؤال
Custom views and directional controller clicks. On most devices, clicking a view using a directional controller sends (to the view currently in focus) a KeyEvent with:

A) KEYCODE_DPAD_CENTER
B) KEYCODE_BUTTON_START
C) KEYCODE_CALL
D) KEYCODE_BUTTON_SELECT
سؤال
In a class extended PreferenceFragmentCompat. What method is used to inflate the given XML resource and add the preference hierarchy to the current preference hierarchy?

A) findPreference
B) getPreferenceManager
C) addPreferencesFromResource
D) setPreferenceScreen
سؤال
In our TeaViewModel class, that extends ViewModel , we have such method: public LiveData getTea() {    return mTea; } An observer in our Activity (type of mViewModel variable in example is ) is set in this way: mViewModel.getTea().observe(this, this::displayTea); What will be a correct displayTea method definition?

A) private void displayTea()
B) private void displayTea(Tea tea)
C) private void displayTea(LiveData)
D) private void displayTea(LiveData)
سؤال
Assume that an app includes a default set of graphics and two other sets of graphics, each optimized for a different device setup: res/drawable/ Contains default graphics. res/drawable-small-land-stylus/ Contains graphics optimized for use with a device that expects input from a stylus and has a QVGA low-density screen in landscape orientation. res/drawable-ja/ Contains graphics optimized for use with Japanese. What happens if the app runs on a device that is configured to use Japanese and, at the same time, the device happens to be one that expects input from a stylus and has a QVGA low-density screen in landscape orientation?

A) Android loads graphics from res/drawable/
B) Android loads graphics from res/drawable-small-land-stylus/
C) Android loads graphics from res/drawable-ja/
سؤال
By adding a RoomDatabase .Callback to the room database builder RoomDatabase.Builder (method addCallback(RoomDatabase.Callback callback) ), we can: (Choose two.)

A) set the database factory
B) handle database first time creation
C) handle database opening
D) disable the main thread query check for Room
سؤال
Select 3 major components of the Room. (Choose three.)

A) @Entity
B) @Query
C) @RawQuery
D) @DAO
E) @WorkerThread
F) @Database
سؤال
Select a correct statement about PagedList.

A) PagedList is content-mutable. This means that new content can be loaded into an instance of PagedList and the loaded items themselves can change once loaded.
B) PagedList is content-immutable. This means that, although new content can be loaded into an instance of PagedList, the loaded items themselves cannot change once loaded.
C) PagedList is content-accidental. This means that new content can be loaded into an instance of PagedList and the loaded items themselves can be changed to accidental values randomly.
سؤال
As an example. Our MutableLiveData object, named mLapseTime , is not connected to a Room database, etc. How can we change the value in ?

A) mLapseTime.postValue("new String")
B) mLapseTime.setValue(1000l)
C) mLapseTime.changeValue(1000l)
سؤال
About queries in DAO classes. Room verifies the return value of the query such that if the name of the field in the returned object doesn't match the corresponding column names in the query response, Room alerts you in one of the following two ways: (Choose two.)

A) It gives a warning if no field names match.
B) It gives a warning if only some field names match.
C) It gives an error if no field names match.
D) It gives an error if only some field names match.
سؤال
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
سؤال
In application theme style, flag windowNoTitle () 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.
سؤال
@Query is the main annotation used in DAO classes. It allows you to perform read/write operations on a database. Each @Query method is verified at compile time, so what happens if there is a problem with the query?

A) a runtime error occurs instead of a compilation failure.
B) a compilation error occurs instead of a runtime failure.
C) both compilation error and runtime failure occurs.
سؤال
What is demonstrated by the code below?
// RawDao.kt @Dao interface RawDao {
   @RawQuery   
fun getUserViaQuery(query: SupportSQLiteQuery?): User?
}
// Usage of RawDao
...
val query =    
 SimpleSQLiteQuery("SELECT * FROM User WHERE id = ? LIMIT 1",       
arrayOf(sortBy))
val user = rawDao.getUserViaQuery(query)
...

A) A method in a Dao annotated class as a raw query method where you can pass the query as a SupportSQLiteQuery . A method in a Dao annotated class as a raw query method where you can pass the query as a SupportSQLiteQuery .
B) A method in a Dao annotated class as a query method.
C) A method in a RoomDatabase class as a query method. A method in a RoomDatabase class as a query method.
سؤال
For example, we have a BufferedReader reader, associated with the json file through InputStreamReader . To get a file data we can do this:

A) var line: String? try {    while (reader.readLine(). also { line = it } != null) {        builder.append(line)    }    val json = JSONObject(builder.toString())    return json } catch (exception: IOException) {    exception.printStackTrace() } catch (exception: JSONException) { }    while (reader.readLine(). also { line = it } != null) {
B) var line: JSONObject ?    while (reader.readJSONObject (). also { line = it } != null) {    while (reader.readJSONObject ().
C) } catch (exception: RuntimeException) { } catch (exception: ArrayIndexOutOfBoundsException) {
سؤال
LiveData.postValue() and LiveData.setValue() methods have some differences. So if you have a following code executed in the main thread: liveData.postValue("a"); liveData.setValue("b"); What will be the correct statement?

A) The value "b" would be set at first and later the main thread would override it with the value "a".
B) The value "a" would be set at first and later the main thread would override it with the value "b".
C) The value "b" would be set at first and would not be overridden with the value "a".
D) The value "a" would be set at first and would not be overridden with the value "b".
سؤال
Each time your test invokes onView() , Espresso waits to perform the corresponding UI action or assertion until the following synchronization conditions are met: (Choose three.)

A) The message queue is empty.
B) The message queue is not empty.
C) There are some instances of AsyncTask currently executing a task.
D) There are no instances of AsyncTask currently executing a task.
E) Some developer-defined idling resources are not idle.
F) All developer-defined idling res
سؤال
A class that you create for managing multiple data sources. In addition to a Room database, this class could manage remote data sources such as a web server. It is about:

A) Activity/Fragment
B) ViewModel
C) Repository
D) Room database
سؤال
To run a debuggable build variant you must use a build variant that includes

A) minifyEnabled false in the build configuration
B) debuggable true or debuggable false in the build configuration
C) debuggable true in the build configuration
سؤال
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
سؤال
In a class PreferenceFragmentCompat . What method is called during onCreate(Bundle) to supply the preferences for this fragment. And where subclasses are expected to call setPreferenceScreen(PreferenceScreen) either directly or via helper methods such as addPreferencesFromResource(int) ?

A) onCreateLayoutManager
B) onCreatePreferences
C) onCreateRecyclerView
D) onCreateView
سؤال
Enable debugging on your device: If you are using the emulator, this is enabled by default. But for a connected device, you need to

A) enable transfer data from the device in usb connection options.
B) enable debugging in the device developer options.
C) enable connection in bluetooth options.
سؤال
In application theme style, flag windowActionBar () indicates:

A) whether the given application component is available to other applications.
B) whether action modes should overlay window content when there is not reserved space for their UI (such as an Action Bar).
C) whether this window's Action Bar should overlay application content.
D) whether this window should have an Action Bar in place of the usual title bar.
سؤال
If you added to your build.gradle file a room.schemaLocation : android {
     defaultConfig {
       javaCompileOptions {
           annotationProcessorOptions {
               arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]           
}       
}   
}
}
Then, you build your app or module. As a result you got a json file, with such path to it: app/schemas/your_app_package/db_package/DbClass/DB_VERSION.json What are the correct statements about this file? (Choose all that apply.)

A) It's a file with Room-exported schema
B) Main JSONObject in this file  usually should contain a number "formatVersion" and a JSONObject "database"
C) The JSONObject "database" in this file  usually should contain such objects, like "entities", "views", "setupQueries", ets.
D) non of the above
سؤال
The Layout Inspector in Android Studio allows you to compare your app layout with design mockups, display a magnified or 3D view of your app, and examine details of its layout at runtime. When this is especially useful?

A) when your layout is built entirely in XML rather than runtime and the layout is behaving expectedly.
B) when your layout is built at runtime rather than entirely in XML and the layout is behaving unexpectedly.
سؤال
What is the placeholder tag used for?

A) To mark text that should not be translated.
B) To raise a translation priority to a higher level
C) To raise a quantity of translations for the string
D) To pick up and move sting translation from a different resource file
سؤال
To build a debug APK, you can open a command line and navigate to the root of your project directory. To initiate a debug build, invoke the assembleDebug task: gradlew assembleDebug This creates an APK named [module_name]-debug.apk in [project_name]/[module_name]/build/outputs/apk/ Select correct statements about generated file. (Choose all that apply.)

A) The file is already signed with the debug key
B) The file is already aligned with zipalign
C) You can immediately install this file on a device.
D) non of the above
سؤال
In application theme style, value statusBarColor () means

A) Color of text (usually same as colorForeground).
B) Shows a thin line of the specified color between the navigation bar and the app content. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the navigation bar must not have been requested to be translucent with R.attr.windowTranslucentNavigation. Corresponds to Window.setNavigationBarDividerColor(int).
C) The color for the status bar. If the color is not opaque, consider setting View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the status bar must not have been requested to be translucent with R.attr.windowTranslucentStatus. Corresponds to Window.setStatusBarColor(int).
D) The color for the navigation bar. If the color is not opaque, consider setting View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the navigation bar must not have been requested to be translucent with R.attr.windowTranslucentNavigation. Corresponds to Window.setNavigationBarColor(int).
سؤال
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
سؤال
"Set the activity content to an explicit view. This view is placed directly into the activity's view hierarchy. It can itself be a complex view hierarchy." This can be done by calling method:

A) findViewById
B) setContentView
C) setActionBar
D) setContentTransitionManager
E) setTheme
سؤال
In Android 8.0, API level 26, some APIs regarding notification behaviors were moved from Notification to NotificationChannel. For example, what should we use instead of NotificationCompat.Builder.setPriority() for Android 8.0 and higher?

A) NotificationChannel.setPriority()
B) NotificationChannel.setImportance()
C) NotificationCompat.Builder.setImportance()
سؤال
Choose the most correct statement.

A) Android is a closed source, Linux-based software stack created for a wide array of devices and form factors.
B) Android is a closed source, Windows-based software stack created for a wide array of devices and form factors.
C) Android is an open source, Linux-based software stack created for a wide array of devices and form factors.
D) Android is an open source software stack created for a highly limited array of devices and form factors.
سؤال
Which build options in the Build menu to choose to delete all intermediate/cached build files.

A) Make Module
B) Generate Signed Bundle / APK
C) Rebuild Project
D) Clean Project
E) Make Project
سؤال
RecyclerView is a subclass of ViewGroup and is a more resource-efficient way to display scrollable lists. Instead of creating a View for each item that may or may not be visible on the screen, RecyclerView:

A) creates a single list item and reuses it for visible content.
B) creates an unlimited number of list items and never reuses them
C) creates a limited number of list items and reuses them for visible content.
D) creates a single list item and never reuses it
سؤال
Working with Custom View. Once you define the custom attributes, you can use them in layout XML files just like built-in attributes. The only difference is that your custom attributes belong to a different namespace. Instead of belonging to the http://schemas.android.com/apk/res/android namespace, they belong to:

A) http://schemas.android.com/apk/res/[your package name]
B) http://schemas.android.com/apk/[your package name]
C) http://schemas.android.com/[your package name]
سؤال
Working with Custom View. To define custom attributes, we can add resources to our project. It is customary to put these resources into a file:

A) res/layout/attrs.xml
B) res/values/attrs.xml
C) res/raw/attrs.xml
D) res/xml/attrs.xml
سؤال
A content label sometimes depends on information only available at runtime, or the meaning of a View might change over time. For example, a Play button might change to a Pause button during music playback. In these cases, to update the content label at the appropriate time, we can use:

A) View#setContentDescription(int contentDescriptionResId)
B) View#setContentLabel(int contentDescriptionResId)
C) View#setContentDescription(CharSequence contentDescription)
D) View#setContentLabel(CharSequence contentDescription)
سؤال
If content in a PagedList updates, the PagedListAdapter object receives:

A) only one item from PagedList that contains the updated information.
B) one or more items from PagedList that contains the updated information.
C) a completely new PagedList that contains the updated information.
سؤال
We have a custom view that extends android.widget.ProgressBar. Our progress bar is not touchable, focusable, etc.: it just shows progress. Style for our custom progress bar extends "Widget.AppCompat.ProgressBar.Horizontal". An item, named "progressDrawable", in our style, is a xml file . What we usually can see as a main single element in this xml file:

A) A State List ( element )
B) A Layer List ( element) with items android:id="@+id/progress" and android:id="@+id/background" inside it.
C) An element with android:id="@+id/progress" identifier
سؤال
An overridden method onCreateOptionsMenu in an Activity returns boolean value. What does this value mean?

A) You must return true for the menu to be displayed; if you return false it will not be shown.
B) You must return false for the menu to be displayed; if you return true it will not be shown.
C) You can return any value: the menu will be displayed anyway.
سؤال
If you are working with a Builder that creates a PeriodicWorkRequest to run periodically once within the flex period of every interval period. What statement is correct?

A) The repeat interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
B) The repeat interval must be lower than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be lower than or equal to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
C) The repeat interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval can be anything in relation to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
D) The repeat interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
سؤال
If you want get a debuggable APK that people can install without adb, in Android Studio you can:

A) Select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).
B) Click the Run button from toolbar
C) Select your debug variant and click Analyze APK.
سؤال
Android uses adapters (from the Adapter class) to connect data with View items in a list. There are many different kinds of adapters available, and you can also write custom adapters. To connect data with View items, the adapter needs to know about the View items. From what is extended the entity that is usually used in an adapter and describes a View item and its position within the RecyclerView?

A) RecyclerView.AdapterDataObserver
B) RecyclerView.ItemDecoration
C) RecyclerView.ViewHolder
D) RecyclerViewAccessibilityDelegate
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/78
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 7: Google Analytics Individual Qualification
1
In our TeaViewModel class, that extends ViewModel , we have such prorerty: val tea: LiveData An observer in our Activity (type of mViewModel variable in example is ) is set in this way: mViewModel!!. tea .observe(this, Observer { tea: Tea? -> displayTea(tea) } ) What will be a correct displayTea method definition?

A) private fun displayTea()
B) private fun displayTea(tea: Tea?)
C) private fun displayTea(tea: LiveData?)
D) private fun displayTea(tea: LiveData?)
private fun displayTea(tea: Tea?)
2
If you want the Database Inspector to automatically update the data it presents as you interact with your running app, check the Live updates checkbox at the top of the inspector window. While live updates are enabled, what happens with the table in the inspector window?

A) It is still editable. You can modify data in a table by double-clicking a cell, typing a new value, and pressing Enter.
B) It becomes read-only and you cannot modify its values.
C) It becomes read-only, but you cannot see its updated values before updating the data by clicking the Refresh table button at the top of the inspector window.
It becomes read-only and you cannot modify its values.
3
What happens when you create a DAO method and annotate it with @Insert?
Example:
@Dao
interface MyDao {     
@Insert(onConflict = OnConflictStrategy.REPLACE)     
Fun insertUsers(vararg users: User)
}

A) Room generates an implementation that inserts all parameters into the database in a single transaction.
B) Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
C) Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
Room generates an implementation that inserts all parameters into the database in a single transaction.
4
The Log class allows you to create log messages that appear in logcat. Generally, you could use the following log methods: (Choose five.)

A) Log.e(String, String) (error)
B) Log.a(String, String) (all outputs)
C) Log.w(String, String) (warning)
D) Log.i(String, String) (information)
E) Log.q(String, String) (questions)
F) Log.d(String, String) (debug)
G) Log.v(String, String) (verbose)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
5
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Into <strong>When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Into   you can</strong> A) examine the object tree for a variable, expand it in the Variables view. If the Variables view is not visible B) evaluate an expression at the current execution point C) advance to the next line in the code (without entering a method) D) advance to the first line inside a method call E) advance to the next line outside the current method F) continue running the app normally you can

A) examine the object tree for a variable, expand it in the Variables view. If the Variables view is not visible
B) evaluate an expression at the current execution point
C) advance to the next line in the code (without entering a method)
D) advance to the first line inside a method call
E) advance to the next line outside the current method
F) continue running the app normally
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
6
With a room database. When performing queries, you'll often want your app's UI to update automatically when the data changes. Can you use a return value of type LiveData in your query method description to achieve this?

A) Yes
B) No
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
7
To automate UI tests with Android Studio, you implement your test code in a separate Android test folder. Folder could be named:

A) app/androidTest/java
B) app/src/androidTest/java
C) app/java/androidTest
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
8
What do you want from Room when you create a DAO method and annotate it with @Delete? Example:
@Dao
Interface MyDao {
@Delete
Fun deleteUsers(vararg users: User)
}

A) Room generates an implementation that inserts all parameters into the database in a single transaction.
B) Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
C) Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
9
Filter logcat messages. If in the filter menu, a filter option "Show only selected application"? means

A) Display the messages produced by the app code only (the default). Logcat filters the log messages using the PID of the active app.
B) Apply no filters. Logcat displays all log messages from the device, regardless of which process you selected.
C) Create or modify a custom filter. For example, you could create a filter to view log messages from two apps at the same time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
10
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Out <strong>When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Out   you can</strong> A) examine the object tree for a variable; expand it in the Variables view. If the Variables view is not visible B) evaluate an expression at the current execution point C) advance to the next line in the code (without entering a method) D) advance to the first line inside a method call E) advance to the next line outside the current method F) continue running the app normally you can

A) examine the object tree for a variable; expand it in the Variables view. If the Variables view is not visible
B) evaluate an expression at the current execution point
C) advance to the next line in the code (without entering a method)
D) advance to the first line inside a method call
E) advance to the next line outside the current method
F) continue running the app normally
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
11
Once your test has obtained a UiObject object, you can call the methods in the UiObject class to perform user interactions on the UI component represented by that object. You can specify such actions as: (Choose four.)

A) click() : Clicks the center of the visible bounds of the UI element.
B) touch() : Touch the center of the visible bounds of the UI element.
C) dragTo() : Drags this object to arbitrary coordinates.
D) moveTo() : Move this object to arbitrary coordinates.
E) setText() : Sets the text in an editable field, after clearing the field's content. Conversely, the clearTextField() method clears the existing text in an editable field. F) swipeUp() : Performs the swipe up action on the UiObject. Similarly, the swipeDown() , swipeLeft() , and swipeRight() methods perform corresponding actions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
12
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) val input = context!!.openRawResource(R.raw.sample_teas)
B) val input = context!!.getRawResource(R.raw.sample_teas)
C) val input = context!!.resources.openRawResource(R.raw.sample_teas)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
13
<strong>  What is illustrated in the picture?</strong> A) Logcat window with filter settings B) Debugging native code using LLDB C) The Variables and Watches panes in the Debugger window D) The Breakpoints window lists all the current breakpoints and includes behavior settings for each E) Adding a watchpoint to a variable in memory What is illustrated in the picture?

A) Logcat window with filter settings
B) Debugging native code using LLDB
C) The Variables and Watches panes in the Debugger window
D) The Breakpoints window lists all the current breakpoints and includes behavior settings for each
E) Adding a watchpoint to a variable in memory
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
14
For example, we have a file in our assets folder app/src/main/assets/sample_teas.json . To get an I nputStream for reading it, from out Context context, we can try do this:

A) val input = context!!.resources.openRawResource(R.raw.sample_teas)
B) val input = context!!.assets.open("sample_teas.json")
C) val input = context!!.resources.assets.open("sample_teas.json")
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
15
If you want to access a specific UI component in an app, use the UiSelector class. This class represents a query for specific elements in the currently displayed UI. What is correct about it? (Choose two.)

A) If more than one matching element is found, the first matching element in the layout hierarchy is returned as the target UiObject.
B) If no matching UI element is found, an IOException is thrown.
C) If more than one matching element is found, the last matching element in the layout hierarchy is returned as the target UiObject.
D) If no matching UI element is found, a UiAutomatorObjectNotFoundException is thrown.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
16
To create a basic JUnit 4 test class, create a class that contains one or more test methods. A test method begins with the specific annotation and contains the code to exercise and verify a single functionality in the component that you want to test. What is the annotation?

A) @RunWith
B) @LargeTest
C) @Rule
D) @Test
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
17
<strong>  The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Small tests are unit tests that :</strong> A) validate your app's behavior one class at a time. B) validate either interactions between levels of the stack within a module, or interactions between related modules. C) validate user journeys spanning multiple modules of your app. The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Small tests are unit tests that :

A) validate your app's behavior one class at a time.
B) validate either interactions between levels of the stack within a module, or interactions between related modules.
C) validate user journeys spanning multiple modules of your app.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
18
What do you want from Room when you create a DAO method and annotate it with @Update? Example:
@Dao
Interface MyDao {
@Update
Fun updateUsers(vararg users: User)
}

A) Room generates an implementation that inserts all parameters into the database in a single transaction.
B) Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
C) Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
19
To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar. <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run   Run your test in one of the following ways (select possible): (Choose three.)

A) To run a single test, open the Project window, and then right-click a test and click Run . <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run
B) To test all methods in a class, right-click a class or method in the test file and click Run <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run
C) To run all tests in a directory, right-click on the directory and select Run tests <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run
D) To run all tests in Project, open the Project window, and then right-click a test and click Run <strong>To run your local unit tests, follow these steps: Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.   Run your test in one of the following ways (select possible): (Choose three.)</strong> A) To run a single test, open the Project window, and then right-click a test and click Run .   B) To test all methods in a class, right-click a class or method in the test file and click Run   C) To run all tests in a directory, right-click on the directory and select Run tests   D) To run all tests in Project, open the Project window, and then right-click a test and click Run
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
20
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Over <strong>When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Over   you can</strong> A) examine the object tree for a variable; expand it in the Variables view. B) evaluate an expression at the current execution point C) advance to the next line in the code (without entering a method) D) advance to the first line inside a method call E) advance to the next line outside the current method F) continue running the app normally you can

A) examine the object tree for a variable; expand it in the Variables view.
B) evaluate an expression at the current execution point
C) advance to the next line in the code (without entering a method)
D) advance to the first line inside a method call
E) advance to the next line outside the current method
F) continue running the app normally
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
21
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)
H) APPEND_OR_DESTROY (if no any work exists, the new work will be ignored)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
22
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);
}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
23
Building your app from the command line, if you have a "demo" product flavor, then you can build the debug version with the command:

A) gradlew assembleDemoDebug
B) gradlew installDemoDebug
C) both variants are correct.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
24
Interface for a callback to be invoked when a shared preference is changed. Interface is named:

A) android.content.SyncStatusObserver
B) android.content.SharedPreferences.Editor
C) android.content.SharedPreferences.OnSharedPreferenceChangeListener
D) android.content.SharedPreferences
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
25
What is the incorrect statement about Data Access Object ( androidx.room.Dao )?

A) Data Access Objects are the main classes where you define your database interactions. They can include a variety of query methods.
B) The class marked with @Dao should either be an interface or an abstract class. At compile time, Room will generate an implementation of this class when it is referenced by a Database. The class marked with @Dao should either be an interface or an abstract class. At compile time, Room will generate an implementation of this class when it is referenced by a Database.
C) An abstract @Dao class can optionally have a constructor that takes a Database as its only parameter. An abstract class can optionally have a constructor that takes a Database as its only parameter.
D) It is recommended to have only one Dao class in your codebase for all tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
26
What statements about InputStreamReader (java.io.InputStreamReader) are correct? (Choose two.)

A) An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
B) An InputStreamReader is a bridge from character streams to byte streams: It reads characters using a specified charset and encodes them into bytes. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
C) Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte-input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
D) No any invocation of one of an InputStreamReader's read() methods can cause some bytes to be read from the underlying byte-input stream.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
27
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
28
SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. To mark in the editor that a preference value should be removed, which will be done in the actual preferences once commit() or apply() is called, what method in should we use?

A) delete(String key)
B) clear()
C) remove(String key)
D) removeAll()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
29
What public methods are there in android.widget.Toast.Callback? (Choose two.)

A) onDismissed()
B) onToastHidden()
C) onShown()
D) onToastShown()
E) onToastCancelled()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
30
Assume that you have the following situation: The app code calls for R.string.text_a Three relevant resource files are available: - res/values/strings.xml, which includes text_a in the app's default language, in this case English. - res/values-mcc404/strings.xml, which includes text_a in the app's default language, in this case English. - res/values-hi/strings.xml, which includes text_a in Hindi. The app is running on a device that has the following configuration: - The SIM card is connected to a mobile network in India (MCC 404). - The language is set to Hindi (hi). Which is the correct statement below?

A) Android loads text_a from res/values/strings.xml (in English)
B) Android loads text_a from res/values-mcc404/strings.xml (in English)
C) Android loads text_a from res/values-hi/strings.xml (in Hindi)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
31
Select correct statements about Hardware Abstraction Layer (HAL). (Choose two.)

A) The HAL provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework.
B) The HAL function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don't need to build that functionality yourself - you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify
C) The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware component, such as the camera or bluetooth module. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component.
D) Using a HAL, not using a Linux kernel, allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
32
SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. All changes you make in an editor are batched, and not copied back to the original until you call:

A) commit()
B) apply()
C) commit() or apply() or
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
33
In a class PreferenceFragmentCompat . As a convenience, this fragment implements a click listener for any preference in the current hierarchy. So, in what overridden method we can handle that a preference in the tree rooted at this PreferenceScreen has been clicked?

A) onCreateLayoutManager
B) onCreatePreferences
C) onCreateRecyclerView
D) onPreferenceTreeClick
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
34
With our Context we can get SharedPreferences with a method, named: getSharedPreferences(String name, int mode) . What value can we transfer in a "mode"parameter?

A) MODE_PRIVATE or MODE_PUBLIC MODE_PRIVATE or MODE_PUBLIC
B) combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE
C) Value is either 0 or a combination of MODE_PRIVATE , MODE_WORLD_READABLE , D MODE_WORLD_WRITEABLE , and MODE_MULTI_PROCESS Value is either 0 or a combination of , , D , and MODE_MULTI_PROCESS
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
35
If no any folder like res/anim-, res/drawable-, res/layout-, res/raw-, res/xml- exist in the project. Which folders are required in the project anyway? (Choose two.)

A) res/anim/
B) res/drawable/
C) res/layout/
D) res/raw/
E) res/xml/
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
36
Custom views and directional controller clicks. On most devices, clicking a view using a directional controller sends (to the view currently in focus) a KeyEvent with:

A) KEYCODE_DPAD_CENTER
B) KEYCODE_BUTTON_START
C) KEYCODE_CALL
D) KEYCODE_BUTTON_SELECT
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
37
In a class extended PreferenceFragmentCompat. What method is used to inflate the given XML resource and add the preference hierarchy to the current preference hierarchy?

A) findPreference
B) getPreferenceManager
C) addPreferencesFromResource
D) setPreferenceScreen
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
38
In our TeaViewModel class, that extends ViewModel , we have such method: public LiveData getTea() {    return mTea; } An observer in our Activity (type of mViewModel variable in example is ) is set in this way: mViewModel.getTea().observe(this, this::displayTea); What will be a correct displayTea method definition?

A) private void displayTea()
B) private void displayTea(Tea tea)
C) private void displayTea(LiveData)
D) private void displayTea(LiveData)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
39
Assume that an app includes a default set of graphics and two other sets of graphics, each optimized for a different device setup: res/drawable/ Contains default graphics. res/drawable-small-land-stylus/ Contains graphics optimized for use with a device that expects input from a stylus and has a QVGA low-density screen in landscape orientation. res/drawable-ja/ Contains graphics optimized for use with Japanese. What happens if the app runs on a device that is configured to use Japanese and, at the same time, the device happens to be one that expects input from a stylus and has a QVGA low-density screen in landscape orientation?

A) Android loads graphics from res/drawable/
B) Android loads graphics from res/drawable-small-land-stylus/
C) Android loads graphics from res/drawable-ja/
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
40
By adding a RoomDatabase .Callback to the room database builder RoomDatabase.Builder (method addCallback(RoomDatabase.Callback callback) ), we can: (Choose two.)

A) set the database factory
B) handle database first time creation
C) handle database opening
D) disable the main thread query check for Room
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
41
Select 3 major components of the Room. (Choose three.)

A) @Entity
B) @Query
C) @RawQuery
D) @DAO
E) @WorkerThread
F) @Database
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
42
Select a correct statement about PagedList.

A) PagedList is content-mutable. This means that new content can be loaded into an instance of PagedList and the loaded items themselves can change once loaded.
B) PagedList is content-immutable. This means that, although new content can be loaded into an instance of PagedList, the loaded items themselves cannot change once loaded.
C) PagedList is content-accidental. This means that new content can be loaded into an instance of PagedList and the loaded items themselves can be changed to accidental values randomly.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
43
As an example. Our MutableLiveData object, named mLapseTime , is not connected to a Room database, etc. How can we change the value in ?

A) mLapseTime.postValue("new String")
B) mLapseTime.setValue(1000l)
C) mLapseTime.changeValue(1000l)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
44
About queries in DAO classes. Room verifies the return value of the query such that if the name of the field in the returned object doesn't match the corresponding column names in the query response, Room alerts you in one of the following two ways: (Choose two.)

A) It gives a warning if no field names match.
B) It gives a warning if only some field names match.
C) It gives an error if no field names match.
D) It gives an error if only some field names match.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
45
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
46
In application theme style, flag windowNoTitle () 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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
47
@Query is the main annotation used in DAO classes. It allows you to perform read/write operations on a database. Each @Query method is verified at compile time, so what happens if there is a problem with the query?

A) a runtime error occurs instead of a compilation failure.
B) a compilation error occurs instead of a runtime failure.
C) both compilation error and runtime failure occurs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
48
What is demonstrated by the code below?
// RawDao.kt @Dao interface RawDao {
   @RawQuery   
fun getUserViaQuery(query: SupportSQLiteQuery?): User?
}
// Usage of RawDao
...
val query =    
 SimpleSQLiteQuery("SELECT * FROM User WHERE id = ? LIMIT 1",       
arrayOf(sortBy))
val user = rawDao.getUserViaQuery(query)
...

A) A method in a Dao annotated class as a raw query method where you can pass the query as a SupportSQLiteQuery . A method in a Dao annotated class as a raw query method where you can pass the query as a SupportSQLiteQuery .
B) A method in a Dao annotated class as a query method.
C) A method in a RoomDatabase class as a query method. A method in a RoomDatabase class as a query method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
49
For example, we have a BufferedReader reader, associated with the json file through InputStreamReader . To get a file data we can do this:

A) var line: String? try {    while (reader.readLine(). also { line = it } != null) {        builder.append(line)    }    val json = JSONObject(builder.toString())    return json } catch (exception: IOException) {    exception.printStackTrace() } catch (exception: JSONException) { }    while (reader.readLine(). also { line = it } != null) {
B) var line: JSONObject ?    while (reader.readJSONObject (). also { line = it } != null) {    while (reader.readJSONObject ().
C) } catch (exception: RuntimeException) { } catch (exception: ArrayIndexOutOfBoundsException) {
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
50
LiveData.postValue() and LiveData.setValue() methods have some differences. So if you have a following code executed in the main thread: liveData.postValue("a"); liveData.setValue("b"); What will be the correct statement?

A) The value "b" would be set at first and later the main thread would override it with the value "a".
B) The value "a" would be set at first and later the main thread would override it with the value "b".
C) The value "b" would be set at first and would not be overridden with the value "a".
D) The value "a" would be set at first and would not be overridden with the value "b".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
51
Each time your test invokes onView() , Espresso waits to perform the corresponding UI action or assertion until the following synchronization conditions are met: (Choose three.)

A) The message queue is empty.
B) The message queue is not empty.
C) There are some instances of AsyncTask currently executing a task.
D) There are no instances of AsyncTask currently executing a task.
E) Some developer-defined idling resources are not idle.
F) All developer-defined idling res
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
52
A class that you create for managing multiple data sources. In addition to a Room database, this class could manage remote data sources such as a web server. It is about:

A) Activity/Fragment
B) ViewModel
C) Repository
D) Room database
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
53
To run a debuggable build variant you must use a build variant that includes

A) minifyEnabled false in the build configuration
B) debuggable true or debuggable false in the build configuration
C) debuggable true in the build configuration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
54
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
55
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
56
In a class PreferenceFragmentCompat . What method is called during onCreate(Bundle) to supply the preferences for this fragment. And where subclasses are expected to call setPreferenceScreen(PreferenceScreen) either directly or via helper methods such as addPreferencesFromResource(int) ?

A) onCreateLayoutManager
B) onCreatePreferences
C) onCreateRecyclerView
D) onCreateView
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
57
Enable debugging on your device: If you are using the emulator, this is enabled by default. But for a connected device, you need to

A) enable transfer data from the device in usb connection options.
B) enable debugging in the device developer options.
C) enable connection in bluetooth options.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
58
In application theme style, flag windowActionBar () indicates:

A) whether the given application component is available to other applications.
B) whether action modes should overlay window content when there is not reserved space for their UI (such as an Action Bar).
C) whether this window's Action Bar should overlay application content.
D) whether this window should have an Action Bar in place of the usual title bar.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
59
If you added to your build.gradle file a room.schemaLocation : android {
     defaultConfig {
       javaCompileOptions {
           annotationProcessorOptions {
               arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]           
}       
}   
}
}
Then, you build your app or module. As a result you got a json file, with such path to it: app/schemas/your_app_package/db_package/DbClass/DB_VERSION.json What are the correct statements about this file? (Choose all that apply.)

A) It's a file with Room-exported schema
B) Main JSONObject in this file  usually should contain a number "formatVersion" and a JSONObject "database"
C) The JSONObject "database" in this file  usually should contain such objects, like "entities", "views", "setupQueries", ets.
D) non of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
60
The Layout Inspector in Android Studio allows you to compare your app layout with design mockups, display a magnified or 3D view of your app, and examine details of its layout at runtime. When this is especially useful?

A) when your layout is built entirely in XML rather than runtime and the layout is behaving expectedly.
B) when your layout is built at runtime rather than entirely in XML and the layout is behaving unexpectedly.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
61
What is the placeholder tag used for?

A) To mark text that should not be translated.
B) To raise a translation priority to a higher level
C) To raise a quantity of translations for the string
D) To pick up and move sting translation from a different resource file
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
62
To build a debug APK, you can open a command line and navigate to the root of your project directory. To initiate a debug build, invoke the assembleDebug task: gradlew assembleDebug This creates an APK named [module_name]-debug.apk in [project_name]/[module_name]/build/outputs/apk/ Select correct statements about generated file. (Choose all that apply.)

A) The file is already signed with the debug key
B) The file is already aligned with zipalign
C) You can immediately install this file on a device.
D) non of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
63
In application theme style, value statusBarColor () means

A) Color of text (usually same as colorForeground).
B) Shows a thin line of the specified color between the navigation bar and the app content. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the navigation bar must not have been requested to be translucent with R.attr.windowTranslucentNavigation. Corresponds to Window.setNavigationBarDividerColor(int).
C) The color for the status bar. If the color is not opaque, consider setting View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the status bar must not have been requested to be translucent with R.attr.windowTranslucentStatus. Corresponds to Window.setStatusBarColor(int).
D) The color for the navigation bar. If the color is not opaque, consider setting View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the navigation bar must not have been requested to be translucent with R.attr.windowTranslucentNavigation. Corresponds to Window.setNavigationBarColor(int).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
64
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
65
"Set the activity content to an explicit view. This view is placed directly into the activity's view hierarchy. It can itself be a complex view hierarchy." This can be done by calling method:

A) findViewById
B) setContentView
C) setActionBar
D) setContentTransitionManager
E) setTheme
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
66
In Android 8.0, API level 26, some APIs regarding notification behaviors were moved from Notification to NotificationChannel. For example, what should we use instead of NotificationCompat.Builder.setPriority() for Android 8.0 and higher?

A) NotificationChannel.setPriority()
B) NotificationChannel.setImportance()
C) NotificationCompat.Builder.setImportance()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
67
Choose the most correct statement.

A) Android is a closed source, Linux-based software stack created for a wide array of devices and form factors.
B) Android is a closed source, Windows-based software stack created for a wide array of devices and form factors.
C) Android is an open source, Linux-based software stack created for a wide array of devices and form factors.
D) Android is an open source software stack created for a highly limited array of devices and form factors.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
68
Which build options in the Build menu to choose to delete all intermediate/cached build files.

A) Make Module
B) Generate Signed Bundle / APK
C) Rebuild Project
D) Clean Project
E) Make Project
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
69
RecyclerView is a subclass of ViewGroup and is a more resource-efficient way to display scrollable lists. Instead of creating a View for each item that may or may not be visible on the screen, RecyclerView:

A) creates a single list item and reuses it for visible content.
B) creates an unlimited number of list items and never reuses them
C) creates a limited number of list items and reuses them for visible content.
D) creates a single list item and never reuses it
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
70
Working with Custom View. Once you define the custom attributes, you can use them in layout XML files just like built-in attributes. The only difference is that your custom attributes belong to a different namespace. Instead of belonging to the http://schemas.android.com/apk/res/android namespace, they belong to:

A) http://schemas.android.com/apk/res/[your package name]
B) http://schemas.android.com/apk/[your package name]
C) http://schemas.android.com/[your package name]
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
71
Working with Custom View. To define custom attributes, we can add resources to our project. It is customary to put these resources into a file:

A) res/layout/attrs.xml
B) res/values/attrs.xml
C) res/raw/attrs.xml
D) res/xml/attrs.xml
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
72
A content label sometimes depends on information only available at runtime, or the meaning of a View might change over time. For example, a Play button might change to a Pause button during music playback. In these cases, to update the content label at the appropriate time, we can use:

A) View#setContentDescription(int contentDescriptionResId)
B) View#setContentLabel(int contentDescriptionResId)
C) View#setContentDescription(CharSequence contentDescription)
D) View#setContentLabel(CharSequence contentDescription)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
73
If content in a PagedList updates, the PagedListAdapter object receives:

A) only one item from PagedList that contains the updated information.
B) one or more items from PagedList that contains the updated information.
C) a completely new PagedList that contains the updated information.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
74
We have a custom view that extends android.widget.ProgressBar. Our progress bar is not touchable, focusable, etc.: it just shows progress. Style for our custom progress bar extends "Widget.AppCompat.ProgressBar.Horizontal". An item, named "progressDrawable", in our style, is a xml file . What we usually can see as a main single element in this xml file:

A) A State List ( element )
B) A Layer List ( element) with items android:id="@+id/progress" and android:id="@+id/background" inside it.
C) An element with android:id="@+id/progress" identifier
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
75
An overridden method onCreateOptionsMenu in an Activity returns boolean value. What does this value mean?

A) You must return true for the menu to be displayed; if you return false it will not be shown.
B) You must return false for the menu to be displayed; if you return true it will not be shown.
C) You can return any value: the menu will be displayed anyway.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
76
If you are working with a Builder that creates a PeriodicWorkRequest to run periodically once within the flex period of every interval period. What statement is correct?

A) The repeat interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
B) The repeat interval must be lower than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be lower than or equal to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
C) The repeat interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval can be anything in relation to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
D) The repeat interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
77
If you want get a debuggable APK that people can install without adb, in Android Studio you can:

A) Select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).
B) Click the Run button from toolbar
C) Select your debug variant and click Analyze APK.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
78
Android uses adapters (from the Adapter class) to connect data with View items in a list. There are many different kinds of adapters available, and you can also write custom adapters. To connect data with View items, the adapter needs to know about the View items. From what is extended the entity that is usually used in an adapter and describes a View item and its position within the RecyclerView?

A) RecyclerView.AdapterDataObserver
B) RecyclerView.ItemDecoration
C) RecyclerView.ViewHolder
D) RecyclerViewAccessibilityDelegate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 78 في هذه المجموعة.