mirror of
https://codeberg.org/tom79/Fedilab
synced 2024-12-11 18:55:51 +01:00
Fix a crash
This commit is contained in:
parent
1768a85cbd
commit
80f6fb2382
@ -28,6 +28,7 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
@ -115,10 +116,7 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
|||||||
|
|
||||||
if (attachments == null || attachments.size() == 0)
|
if (attachments == null || attachments.size() == 0)
|
||||||
finish();
|
finish();
|
||||||
if (getSupportActionBar() != null) {
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
|
||||||
}
|
|
||||||
setTitle("");
|
setTitle("");
|
||||||
|
|
||||||
ScreenSlidePagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
|
ScreenSlidePagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
|
||||||
@ -208,6 +206,15 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
|||||||
setFullscreen(true);
|
setFullscreen(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean dispatchTouchEvent(MotionEvent event) {
|
||||||
|
try {
|
||||||
|
return super.dispatchTouchEvent(event);
|
||||||
|
} catch (IllegalArgumentException ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void toogleFullScreen() {
|
public void toogleFullScreen() {
|
||||||
fullscreen = !fullscreen;
|
fullscreen = !fullscreen;
|
||||||
|
Loading…
Reference in New Issue
Block a user