Fix IllegalStateException on Toolbar while activity recreation

Signed-off-by: Unpublished <unpublished@gmx.net>
This commit is contained in:
Unpublished 2019-05-20 12:33:20 +02:00
parent 0bb4e72e95
commit c16622dd94

View file

@ -228,11 +228,12 @@ public class FileDisplayActivity extends FileActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
Log_OC.v(TAG, "onCreate() start");
super.onCreate(savedInstanceState); // this calls onAccountChanged() when ownCloud Account is valid
// Set the default theme to replace the launch screen theme.
setTheme(R.style.Theme_ownCloud_Toolbar_Drawer);
super.onCreate(savedInstanceState); // this calls onAccountChanged() when ownCloud Account is valid
/// Load of saved instance state
if (savedInstanceState != null) {
mWaitingToPreview = savedInstanceState.getParcelable(FileDisplayActivity.KEY_WAITING_TO_PREVIEW);