Hans Fouche Hans Fouche - 3 months ago 16
Android Question

Invisible text is still visible in the overview

Please assist,

I have hidden text in the onPause() however when clicking the square (overview) button as per the image below the text still appears as visible.
I do not want the user to view the text as it could be a way of cheating.

Thanks

My code:

@Override
public void onResume() {
super.onResume();

sumTextView.setVisibility(View.VISIBLE);
}


@Override
public void onPause() {

sumTextView.setVisibility(View.INVISIBLE);
super.onPause();
}


When overview button pressed

Answer

if you make set visibilty INVISIBLE for On resume then text will be invisible

OR

Try only this by commenting onResume section and use this @Override public void onPause() {

    sumTextView.setVisibility(View.INVISIBLE);
    super.onPause();
}

if you had both overriding methods then it will vanish for only a point of time