Мне необходимо, чтобы noConnectionView отображался, но никак не мешал нажимать на кнопки из buttonToggleGroup, как это сделать? <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:theme="@style/ThemeOverlay.Achievements"
    tools:background="@drawable/bg_achievements">

    <FrameLayout
        android:id="@+id/toolbar_blur_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:foreground="@color/achievements_toolbar_tint"
        tools:layout_height="?attr/actionBarSize" />

    <LinearLayout
        android:id="@+id/content_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:layout_marginTop="?attr/actionBarSize">

        <ru.maxi.mobile.uikit.components.toggleGroup.ButtonToggleGroup
            android:id="@+id/tabs_button_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="@dimen/std_margin"
            android:layout_marginTop="@dimen/std_margin"
            android:layout_marginBottom="@dimen/std_half_margin"
            tools:checkedButton="@id/received_tab">

            <Button
                android:id="@+id/in_progress_tab"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/achievements_in_progress_tab_title" />

            <Button
                android:id="@+id/received_tab"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/achievements_received_tab_title" />

        </ru.maxi.mobile.uikit.components.toggleGroup.ButtonToggleGroup>

        <androidx.viewpager2.widget.ViewPager2
            android:id="@+id/tabs_container"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />

    </LinearLayout>

    <ru.maxi.mobile.uikit.components.noConnectionView.NoConnectionView
        android:id="@+id/no_connection_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:theme="@style/ThemeOverlay.Achievements.NoConnectionView"
        android:visibility="visible" />

    <ru.maxi.mobile.uikit.components.loaderWithBackground.LoaderWithBackground
        android:id="@+id/loader_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:theme="@style/ThemeOverlay.Achievements.LoaderWithBackground" />

</FrameLayout>package ru.maxi.mobile.feature.achievements.ui.main

import android.os.Bundle
import android.view.View
import androidx.annotation.IdRes
import androidx.core.content.ContextCompat
import androidx.core.view.updateLayoutParams
import androidx.fragment.app.viewModels
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import androidx.viewpager2.widget.ViewPager2
import by.kirich1409.viewbindingdelegate.viewBinding
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch
import ru.maxi.mobile.R
import ru.maxi.mobile.base.ui.MvvmBaseFragment
import ru.maxi.mobile.common.utils.android.setAllParentsClipChildren
import ru.maxi.mobile.databinding.FragmentAchievementsMainBinding
import ru.maxi.mobile.feature.achievements.AchievementsScreens
import ru.maxi.mobile.feature.achievements.ui.main.model.AchievementsMainViewState
import ru.maxi.mobile.feature.achievements.ui.main.model.AchievementsTabPage
import ru.maxi.mobile.uikit.utils.lifecycleAwareLazy
import ru.maxi.mobile.uikit.R as UIKitR

/**
 * [Fragment] контейнера экранов достижений
 */
@AndroidEntryPoint
class AchievementsMainFragment : MvvmBaseFragment(R.layout.fragment_achievements_main) {

    private val viewBinding by viewBinding(FragmentAchievementsMainBinding::bind)

    private val viewModel by viewModels<AchievementsMainViewModel>()

    private val pageAdapter by lifecycleAwareLazy {
        AchievementsTabAdapter(this)
    }

    private val pageChangeListener = object : ViewPager2.OnPageChangeCallback() {
        override fun onPageSelected(position: Int) {
            AchievementsScreens.AchievementsTab.entries
                .getOrNull(position)
                ?.let(viewModel::updateCurrentTab)
        }
    }

    private val pageList: MutableList<AchievementsTabPage> = mutableListOf(
        AchievementsTabPage(AchievementsScreens.AchievementsInProgressScreen()),
        AchievementsTabPage(AchievementsScreens.AchievementsReceivedScreen()),
    )

    override val analyticsName: String? = null

    private var isFirstOpen = true

    private val backgroundObserver by lifecycleAwareLazy {
        BackgroundObserver(
            bgSource = BackgroundSource.FromDrawable(R.drawable.bg_achievements),
            toolbarBlurView = viewBinding.toolbarBlurView,
        )
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        actionBarManager.setTitle(R.string.achievements_screen_title)
        actionBarManager.showBackButton()

        with(viewBinding) {
            val topSystemViewsHeight = actionBarManager.getHeight(withSystemBarsInset = true)

            toolbarBlurView.updateLayoutParams { height = topSystemViewsHeight }
            toolbarBlurView.translationY = -topSystemViewsHeight.toFloat()
        }

        with(viewBinding) {
            tabsContainer.registerOnPageChangeCallback(pageChangeListener)
            tabsContainer.adapter = pageAdapter
            pageAdapter.pages = pageList
            tabsButtonContainer.setOnButtonCheckedListener { buttonId ->
                AchievementsScreens.AchievementsTab.entries
                    .find { it.buttonId == buttonId }
                    ?.let(viewModel::updateCurrentTab)
            }
        }
        with(viewLifecycleOwner) {
            backgroundObserver.attachTo(this)
            lifecycleScope.launch {
                repeatOnLifecycle(Lifecycle.State.STARTED) {
                    launch { viewModel.viewState.collect(::onViewStateChange) }
                }
            }
        }
    }

    override fun onDestroyView() {
        super.onDestroyView()
        viewBinding.tabsContainer.unregisterOnPageChangeCallback(pageChangeListener)
    }

    override fun onResume() {
        viewBinding.root.setAllParentsClipChildren(false)
        super.onResume()
    }

    override fun onPause() {
        super.onPause()
        viewBinding.root.setAllParentsClipChildren(true)
    }

    private fun onViewStateChange(state: AchievementsMainViewState) {
        with(viewBinding) {
            tabsButtonContainer.check(state.currentTab.buttonId)
            tabsContainer.setCurrentItem(state.currentTab.ordinal, !isFirstOpen)
        }
        isFirstOpen = false
    }
}

@get:IdRes
private val AchievementsScreens.AchievementsTab.buttonId: Int
    get() = when (this) {
        AchievementsScreens.AchievementsTab.IN_PROGRESS_TAB -> R.id.in_progress_tab
        AchievementsScreens.AchievementsTab.RECEIVED_TAB -> R.id.received_tab
    }