Slide back the usage of the class library SwipeBackLayout to solve the problem of returning to the black screen, and seeing the desktop, class library swipebacklayout
SwipeBackLayout is a good class library that enables Android to implement a right-sliding return effect similar to that of the iOS system. However, many users may find that they are using the official Demo, A black screen may appear or the UI of the previous Activity may not be displayed only when the desktop background is displayed.
Https://github.com/Issacw0ng/SwipeBackLayout
The solution is as follows:
Do not enable the slide return function on the homepage, and use the topic shown in AppBaseThemeMain on the homepage. Use the AppBaseTheme topic when you need to slide the returned Activity, the attribute set by these two themes is whether to make the window transparent. The Activity on the homepage cannot make the window transparent. You need to set this attribute when you need to slide the returned Activity.
<Style name = "AppBaseTheme" parent = "@ android: style/Theme. holo. light "> <item name =" android: Movie wistranslucent "> true </item> </style>
<Style name = "AppBaseThemeMain" parent = "@ android: style/Theme. holo. light "> <item name =" android: Movie wistranslucent "> false </item> </style>