Minimize the application. In the minimized application manager, the last state of the activity is displayed before it is minimized. How can I change the background that is displayed?
Разметка: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="20dp" android:text="text" android:textColor="#000" /> </LinearLayout> <FrameLayout android:id="@+id/frameID" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000" android:visibility="visible" /> </RelativeLayout> Activity code:
@Override protected void onResume() { super.onResume(); frameLayout.setVisibility(View.GONE); } @Override protected void onStop() { frameLayout.setVisibility(View.VISIBLE); super.onStop(); } I would like that when you turn off the application, there was a dark background. Tried to do it in onStop. But the system apparently makes a screen screen earlier.