Sapient Company Programming

Which of the following is true about 'Killable After property" of Activity Lifecycle's callback methods?
A. onDestroy is Killable
B. An activity is killable from the time onPause() returns to the time onResume() is called
C. onStop method is killable
D. onResume is not killable while onPause is killable

1) A, B and C
2) A, B and D
3) A, C and D
4) B, C and D

Read Solution (Total 1)

Sapient Other Question

What will be the output of the following code?

AnimatorSet bouncer = new AnimatorSet();
bouncer.play(bounceAnim).before(squashAnim1);
bouncer.play(squashAnim1).with(squashAnim2);
bouncer.play(squashAnim1).with(stretchAnim1);
bouncer.play(squashAnim1).with(stretchAnim2);
ValueAnimator fadeAnim = ObjectAnimator.ofFloat(newBall, "alpha", 1f, 0f);
fadeAnim.setDuration(250);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.play(bouncer).before(fadeAnim);
animatorSet.start();

1) runs successfully
2) compile time error
3) runtime error
4) none of the above
Which of the following methods is/are called only once throughout the Android Activity Lifecycle?

1) onDestroy and onStop
2) onDestroy and onStart
3) onStart and onStop
4) onDestroy and onCreate