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

problem.. when i use the library in layout ?? #87

Closed
arceleno opened this issue Feb 19, 2017 · 6 comments
Closed

problem.. when i use the library in layout ?? #87

arceleno opened this issue Feb 19, 2017 · 6 comments

Comments

@arceleno
Copy link

arceleno commented Feb 19, 2017

Rendering Problems The following classes could not be instantiated:

br.com.mauker.materialsearchview.MaterialSearchView (Open Class, Show Exception, Clear Cache)
 Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE  
Exception Details java.lang.NullPointerException   
at br.com.mauker.materialsearchview.MaterialSearchView.isVoiceAvailable(MaterialSearchView.java:899)   at 
br.com.mauker.materialsearchview.MaterialSearchView.displayVoiceButton(MaterialSearchView.java:434)   at
br.com.mauker.materialsearchview.MaterialSearchView.init(MaterialSearchView.java:260)   at
 br.com.mauker.materialsearchview.MaterialSearchView.<init>(MaterialSearchView.java:205)   at 
br.com.mauker.materialsearchview.MaterialSearchView.<init>(MaterialSearchView.java:193)   at 
java.lang.reflect.Constructor.newInstance(Constructor.java:423)   at 
android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)   at 
android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at 
android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at 
android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)   at 
android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at 
android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at 
android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)   at 
android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at 
android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at 
android.view.LayoutInflater.inflate(LayoutInflater.java:504)   at 
android.view.LayoutInflater.inflate(LayoutInflater.java:385)
@arceleno arceleno changed the title problem.. when i use the library in xml layout ?? problem.. when i use the library in layout ?? Feb 19, 2017
@Mauker1
Copy link
Owner

Mauker1 commented Feb 22, 2017

Could you please post your XML?

@arceleno
Copy link
Author

arceleno commented Mar 2, 2017

@Mauker1 sry for late :))

this my XML

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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.example.ahmed.recommendersystem.SearchActivity"
    android:id="@+id/search">





    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">


        <android.support.v7.widget.Toolbar
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:id="@+id/toolbar2"
            android:background="@color/black"
            android:elevation="8dp"
            app:popupTheme="@style/AppTheme.PopupOverlay"
            >

        </android.support.v7.widget.Toolbar>



    </android.support.design.widget.AppBarLayout>




    <include layout="@layout/fragment_search_activity"/>


    <br.com.mauker.materialsearchview.MaterialSearchView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/search_view"
        style="@style/MaterialSearchViewStyle"/>



</android.support.design.widget.CoordinatorLayout>

@hshahdoost
Copy link

I am experiencing the same problem in my project

@Mauker1
Copy link
Owner

Mauker1 commented Mar 18, 2017

Does the library run? Or the problem is only on the preview?

@arceleno
Copy link
Author

@Mauker1 yes library run ^^
the problem in preview in android studio
and i wana to ask something
library work fine in api 17 ? or make problems ?
cause i'm testing it in api 17 make problem in suggestion list library ... contents in xml show in suggestion list library
.. but in api 21 work fine :( and that's problem not appear

@Mauker1
Copy link
Owner

Mauker1 commented Apr 5, 2017

I will have to dig further into that.

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