Fix captions and urls hidden by the navigation bar in ViewRedditGalleryImageorGifFragment.

This commit is contained in:
Docile-Alligator 2022-03-24 14:00:44 +08:00
parent 2bbba42e38
commit c87b724a24
2 changed files with 4 additions and 6 deletions

View File

@ -16,7 +16,6 @@ import android.os.Handler;
import android.text.Html;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
import androidx.annotation.NonNull;
@ -138,11 +137,6 @@ public class ViewRedditGalleryActivity extends AppCompatActivity implements SetA
ButterKnife.bind(this);
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
useBottomAppBar = sharedPreferences.getBoolean(SharedPreferencesUtils.USE_BOTTOM_TOOLBAR_IN_MEDIA_VIEWER, false);
if (!useBottomAppBar) {

View File

@ -215,6 +215,10 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
});
loadImage();
activity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
imageView.setOnClickListener(view -> {
if (isActionBarHidden) {