I have two fragment for my current application, In
FragmentA
I have a search view in Toolbar and on clicking on the search view , I have to show another fragment,FragmentB
on top of fragmentA
using my framelayout,with transparent view so that the contents in FragmentA
can be seen as blurred. The newly opened fragment with transparent background has to show some content in the recycler view . How can we achieve the transparency and the recycler view inside the layout.
Layout code:
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<LinearLayout
android:id="@+id/dot_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/drawer_layout"
android:elevation="50dp"
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/tools"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/palate_survey_bg"
app:ignore="NamespaceTypo"
local:popupTheme="@style/ThemeOverlay.AppCompat.Light"
local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<androidx.appcompat.widget.SearchView
android:id="@+id/Advance_search"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/filter_search_bar_bg_lyt"
app:iconifiedByDefault="false"
app:queryHint="Search">
</androidx.appcompat.widget.SearchView>
</androidx.appcompat.widget.Toolbar >
<FrameLayout
android:id="@+id/search_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar">
</FrameLayout>
</LinearLayout>
</androidx.drawerlayout.widget.DrawerLayout