Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaterialSearchView on Navigation Drawer Activity #225

Open
githeyj opened this issue Dec 11, 2018 · 2 comments
Open

MaterialSearchView on Navigation Drawer Activity #225

githeyj opened this issue Dec 11, 2018 · 2 comments

Comments

@githeyj
Copy link

githeyj commented Dec 11, 2018

I tried this library on a navigation drawer activity. It blocks the fragment to be loaded on initiating the activity.

@anandtripathi5
Copy link

I am facing the same issue

@nikhiltari25
Copy link

If you don't want search option for all fragments then you can add below code in your fragment.xml file,

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context="com.mypackagename.FirstFragment">
    <FrameLayout
        android:id="@+id/frameLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/toolbar_container">
        <ExpandableListView
            android:id="@+id/elv_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </FrameLayout>
    <FrameLayout
        android:id="@+id/toolbar_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"/>

        <com.miguelcatalan.materialsearchview.MaterialSearchView
            android:id="@+id/search_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>
    </FrameLayout>
</RelativeLayout>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants