Sapient Company Programming

The following syntax is used to implement loader class in Android getLoaderManager().initLoader(0,null,this);

Which of the following is correct about parameters taken by initLoader method?

1) first parameter: Unique Id
second parameter: A Bundle
third parameter: Callback class

2) first parameter: Unique Id
second parameter: CallBack class
third parameter: A bundle

3) first parameter: Callback class
second parameter: Unique id
third parameter: A bundle

4) None of the given options

Read Solution (Total 1)

Sapient Other Question

Alice is writing a listview and she wants the content of each textview to fit pertectly in all types of Android Devices.
What approch should Alice take to achieve this?

A. Alice should use wrap_content for width and height of textview.
B. Alice should use dp values for width and height of textview.
C. If textview has a background image. Alice should make sure that it is a nine-patch image.

1) Only A
2) Only B
3) Only C
4) A and C
Answer the statements which are correct about Handler class

A. A handler object registers itself with the thread in which it is created.
B. The data which can be posted via the Handler class cannot be an instance of the Message or the Runnable class.
C. A Handler is particulary useful if you want to post data multiple times to the main thread

1) A and B
2) B and C
3) C and A
4) All of the given options