Использую Dialog для попапа на весь экран.
В попапе изображение с возможностью увеличения (
https://github.com/chrisbanes/PhotoView) и кнопка закрыть.
Не могу убрать status bar для полного увеличения изображения.
Как сделать?
Dialog dialog = new Dialog(holder.itemView.getContext());
dialog.setContentView(R.layout.isu_image_layout);
dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
dialog.getWindow().setLayout(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
dialog.findViewById(R.id.img_close_popup).setOnClickListener(v1 -> {
dialog.cancel();
});
dialog.show();
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/dialog_layout"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.github.chrisbanes.photoview.PhotoView
android:id="@+id/content_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:src="@drawable/test"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/img_close_popup"
android:layout_width="75dp"
android:layout_height="75dp"
android:padding="24dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:src="@drawable/ic_close" />
</androidx.constraintlayout.widget.ConstraintLayout>