clean fix

This commit is contained in:
Thomas 2023-01-15 12:06:38 +01:00
parent eaecabe7b7
commit 1768a85cbd
4 changed files with 64 additions and 14 deletions

View File

@ -22,12 +22,10 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.graphics.Point;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@ -93,9 +91,6 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
};
private boolean fullscreen;
private Handler handler;
private int minTouch, maxTouch;
private float startX;
private float startY;
private ActivityMediaPagerBinding binding;
private FragmentMedia mCurrentFragment;
private Status status;
@ -211,13 +206,6 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
}
});
setFullscreen(true);
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int screenHeight = size.y;
minTouch = (int) (screenHeight * 0.1);
maxTouch = (int) (screenHeight * 0.9);
}

View File

@ -336,9 +336,13 @@ public class FragmentMedia extends Fragment {
private void enableSliding(boolean enable) {
if (enable && !swipeEnabled) {
swipeEnabled = true;
slidrInterface.unlock();
if (slidrInterface != null) {
slidrInterface.unlock();
}
} else if (!enable && swipeEnabled) {
slidrInterface.lock();
if (slidrInterface != null) {
slidrInterface.lock();
}
swipeEnabled = false;
}
}

View File

@ -84,6 +84,22 @@
</style>
<style name="Transparent" parent="AppThemeBar">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentTransitions">true</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="o_mr1">shortEdges
</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
<style name="AppThemeAlertDialog" parent="Theme.Material3.Dark.Dialog.Alert">
<item name="linkColor">@color/md_theme_dark_primary</item>
<item name="colorPrimary">@color/md_theme_dark_primary</item>
@ -196,6 +212,15 @@
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentTransitions">true</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="o_mr1">shortEdges
</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
<style name="SolarizedAlertDialog" parent="Theme.Material3.Dark.Dialog.Alert">
@ -304,6 +329,14 @@
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentTransitions">true</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="o_mr1">shortEdges
</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
<style name="BlackAlertDialog" parent="Theme.Material3.Dark.Dialog.Alert">
@ -410,6 +443,15 @@
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentTransitions">true</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="o_mr1">shortEdges
</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
<style name="DraculaAlertDialog" parent="Theme.Material3.Dark.Dialog.Alert">

View File

@ -90,6 +90,14 @@
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentTransitions">true</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="o_mr1">shortEdges
</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
<style name="AppThemeAlertDialog" parent="Theme.Material3.Light.Dialog.Alert">
@ -167,6 +175,14 @@
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentTransitions">true</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="o_mr1">shortEdges
</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
<style name="SolarizedAlertDialog" parent="Theme.Material3.Light.Dialog.Alert">