arimorty / floatingsearchview

A search view that implements a floating search bar also known as persistent search
https://github.com/arimorty/floatingsearchview/blob/master/README.md
Apache License 2.0
3.54k stars 668 forks source link

icons not working #112

Closed ericntd closed 8 years ago

ericntd commented 8 years ago

First of all, your README, demos and the library are awesome. Thanks for your work :)

The icons I need are missing:

I'm having problem with the left icon though. It's seems always noLeftAction. I've tried showHamburger, showSearch and showHome with no success.

Of course, I'm not seeing any error in the log. I'm using Android Support library 23.4.0 and your library 2.0.2.

My fragment XML:

<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/tools"
    xmlns:recyclerviewfastscroller="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
        android:id="@+id/recycler"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingTop="60dp"
        android:clipToPadding="false"
        app:fastScrollAutoHide="true"
        app:fastScrollAutoHideDelay="1500"
        app:fastScrollPopupBgColor="@color/colorAccent"
        app:fastScrollPopupTextColor="@android:color/primary_text_dark"
        app:fastScrollThumbColor="@color/colorAccent"/>

    <com.arlib.floatingsearchview.FloatingSearchView
        android:id="@+id/floating_search_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:floatingSearch_searchBarMarginLeft="5dp"
        app:floatingSearch_searchBarMarginTop="5dp"
        app:floatingSearch_searchBarMarginRight="5dp"
        app:floatingSearch_searchHint="Search..."
        app:floatingSearch_suggestionsListAnimDuration="250"
        app:floatingSearch_showSearchKey="true"
        app:floatingSearch_leftActionMode="showHamburger"
        app:floatingSearch_close_search_on_keyboard_dismiss="true"/>

</RelativeLayout>

My build information:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 23
    }
}
dependencies {
     compile 'com.github.arimorty:floatingsearchview:2.0.2'
}
arimorty commented 8 years ago

Hi @ericn37 ,

Your code should work. The issue must be in other parts of your code. Try to run the sample app, the posted code isn't different than the sample. Perhaps try digging deeper into your code, or post more info for us to be able to help you.

ericntd commented 8 years ago

The sample app is working. Is there something required for the icons to show?

How about these screenshots? screen shot 2016-08-15 at 10 34 31 am screen shot 2016-08-15 at 10 34 53 am

ericntd commented 8 years ago

Correcting xmlns:app="http://schemas.android.com/tools" show the seach icon now, however, the "history"/ recent icon for the suggestions are still not showing

ericntd commented 8 years ago

I've realised that I need to call setOnBindSuggestionCallback and render the icon