kopia lustrzana https://github.com/ryukoposting/Signal-Android
Don't fade in media preview controls if hidden.
rodzic
eb921f3103
commit
fd37613f2f
|
@ -310,7 +310,7 @@ class MediaPreviewV2Fragment : Fragment(R.layout.fragment_media_preview_v2), Med
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun crossfadeViewIn(view: View, duration: Long = 200) {
|
private fun crossfadeViewIn(view: View, duration: Long = 200) {
|
||||||
if (!view.isVisible) {
|
if (!view.isVisible && !fullscreenHelper.isSystemUiVisible) {
|
||||||
val viewPropertyAnimator = view.animate()
|
val viewPropertyAnimator = view.animate()
|
||||||
.alpha(1f)
|
.alpha(1f)
|
||||||
.setDuration(duration)
|
.setDuration(duration)
|
||||||
|
|
|
@ -143,14 +143,18 @@ public final class FullscreenHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleUiVisibility() {
|
public void toggleUiVisibility() {
|
||||||
int systemUiVisibility = activity.getWindow().getDecorView().getSystemUiVisibility();
|
if (isSystemUiVisible()) {
|
||||||
if ((systemUiVisibility & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0) {
|
|
||||||
showSystemUI();
|
showSystemUI();
|
||||||
} else {
|
} else {
|
||||||
hideSystemUI();
|
hideSystemUI();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isSystemUiVisible() {
|
||||||
|
int systemUiVisibility = activity.getWindow().getDecorView().getSystemUiVisibility();
|
||||||
|
return (systemUiVisibility & View.SYSTEM_UI_FLAG_FULLSCREEN) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
public void hideSystemUI() {
|
public void hideSystemUI() {
|
||||||
activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE |
|
activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE |
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||||
|
|
Ładowanie…
Reference in New Issue