forked from organicmaps/organicmaps
[Android] Handle insets on WebView based screens
Signed-off-by: Dzmitry Strekha <mr.choo96@gmail.com>
This commit is contained in:
parent
ff61cebaf7
commit
536fcef692
3 changed files with 8 additions and 1 deletions
|
@ -8,10 +8,12 @@ import android.view.ViewGroup;
|
|||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import androidx.core.view.ViewCompat;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.WebContainerDelegate;
|
||||
import app.organicmaps.base.BaseMwmFragment;
|
||||
import app.organicmaps.util.Constants;
|
||||
import app.organicmaps.util.WindowInsetUtils;
|
||||
|
||||
public class CopyrightFragment extends BaseMwmFragment
|
||||
{
|
||||
|
@ -22,6 +24,8 @@ public class CopyrightFragment extends BaseMwmFragment
|
|||
{
|
||||
View root = inflater.inflate(R.layout.fragment_web_view_with_progress, container, false);
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(root, WindowInsetUtils.PaddingInsetsListener.excludeTop());
|
||||
|
||||
mDelegate = new WebContainerDelegate(root, Constants.Url.COPYRIGHT)
|
||||
{
|
||||
@Override
|
||||
|
|
|
@ -11,12 +11,14 @@ import android.view.ViewGroup;
|
|||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.WebContainerDelegate;
|
||||
import app.organicmaps.base.BaseMwmFragment;
|
||||
import app.organicmaps.util.Constants;
|
||||
import app.organicmaps.util.SharingUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.util.WindowInsetUtils;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
|
||||
|
@ -53,6 +55,8 @@ public class FaqFragment extends BaseMwmFragment
|
|||
{
|
||||
View root = inflater.inflate(R.layout.fragment_prefs_faq, container, false);
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(root, WindowInsetUtils.PaddingInsetsListener.excludeTop());
|
||||
|
||||
new WebContainerDelegate(root, Constants.Url.FAQ)
|
||||
{
|
||||
@Override
|
||||
|
|
|
@ -23,7 +23,6 @@ import app.organicmaps.util.DateUtils;
|
|||
import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.util.SharingUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.util.WindowInsetUtils;
|
||||
import app.organicmaps.util.WindowInsetUtils.ScrollableContentInsetsListener;
|
||||
|
||||
public class HelpFragment extends BaseMwmFragment implements View.OnClickListener
|
||||
|
|
Loading…
Add table
Reference in a new issue