diff --git a/android/app/src/main/java/app/organicmaps/downloader/DownloaderFragment.java b/android/app/src/main/java/app/organicmaps/downloader/DownloaderFragment.java index f1114a9fc8..8fa3119ca8 100644 --- a/android/app/src/main/java/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/app/src/main/java/app/organicmaps/downloader/DownloaderFragment.java @@ -1,6 +1,7 @@ package app.organicmaps.downloader; import android.content.Intent; +import android.os.Build; import android.os.Bundle; import android.view.View; import android.view.WindowManager; @@ -19,6 +20,7 @@ import app.organicmaps.search.SearchEngine; import app.organicmaps.widget.PlaceholderView; import app.organicmaps.util.bottomsheet.MenuBottomSheetFragment; import app.organicmaps.util.bottomsheet.MenuBottomSheetItem; +import com.google.android.material.floatingactionbutton.FloatingActionButton; import java.util.ArrayList; import java.util.List; @@ -38,6 +40,8 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment= Build.VERSION_CODES.M) + { + getRecyclerView().setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> { + if (scrollY > oldScrollY) + mFab.hide(); + else + mFab.show(); + }); + } mSubscriberSlot = MapManager.nativeSubscribe(new MapManager.StorageCallback() { @Override diff --git a/android/app/src/main/res/layout/fragment_downloader.xml b/android/app/src/main/res/layout/fragment_downloader.xml index 1ba2c6c5e8..b62de1d71d 100644 --- a/android/app/src/main/res/layout/fragment_downloader.xml +++ b/android/app/src/main/res/layout/fragment_downloader.xml @@ -1,5 +1,5 @@ - - -