renaudcerrato / FloatingSearchView

Yet another floating search view implementation, also known as persistent search.
Apache License 2.0
1.33k stars 161 forks source link

Hamburger toggle misbehaviour #9

Closed tuanna-hsp closed 8 years ago

tuanna-hsp commented 8 years ago

The toggle does not finish animation or not doing animation at all (when i build release with minify enable). It happened when i build project on some PC but not some others. screenshot_2016-03-08-17-30-41-260

tuanna-hsp commented 8 years ago

I noticed that when i run the app, sometimes the monitor reports error logs with DrawableWrapper of some sorts.

renaudcerrato commented 8 years ago

I need more informations, paste the some errors reports at least. Does it works with minify disabled?

tuanna-hsp commented 8 years ago

In summary:

As for the logs, i will attach when i catch them again :)

renaudcerrato commented 8 years ago

Did you tried to build the sample app? Does it works?

tuanna-hsp commented 8 years ago

I have not but i will try.

tuanna-hsp commented 8 years ago

This is the log capture

ernestkamara commented 8 years ago

Hello @tuanna-hsp, Are you using wrapping the FloatingSearchView in an AppBarLayout or a custom Layout in your app above? Thanks.

tuanna-hsp commented 8 years ago

Yes, im using it with an AppBarLayout On Mar 11, 2016 20:18, "Ernest S. Kamara" notifications@github.com wrote:

Hello @tuanna-hsp https://github.com/tuanna-hsp, Are you using wrapping the FloatingSearchView in an AppBarLayout or a custom Layout in your app above? Thanks.

— Reply to this email directly or view it on GitHub https://github.com/renaudcerrato/FloatingSearchView/issues/9#issuecomment-195359205 .

ernestkamara commented 8 years ago

Can you please share your layout file with me?

tuanna-hsp commented 8 years ago

Problem is that if im using my friend laptop to build, its fine :) fragment_home.zip

tuanna-hsp commented 8 years ago

By the way, im upload some recent crash reports of our app. capture capture2

ernestkamara commented 8 years ago

So you do not recommend using this library?

renaudcerrato commented 8 years ago

@tuanna-hsp : sounds like a build problem on your side. PLEASE try to build the sample using gradle command line.

tuanna-hsp commented 8 years ago

It seems good enough, but as up now maybe the author need some fix up. Im planning to use another one first util next library version.

renaudcerrato commented 8 years ago

@ernestkamara : please open an issue regarding your crash report(s).

tuanna-hsp commented 8 years ago

@renaudcerrato I built release using commandline, with obfuscating, and the toggle animation is gone completely. Is there any proguard rule? screenshot_2016-03-11-20-51-50-418

ernestkamara commented 8 years ago

Sounds more like ProGuard issue @tuanna-hsp.

renaudcerrato commented 8 years ago

Agree. ᐧ

renaudcerrato commented 8 years ago

@tuanna-hsp : yes, they're rules but they should already be included in the default android proguard: animations works using ObjectAnimators, so you should NOT remove set/get methods! Please disable proguard to confirm.

tuanna-hsp commented 8 years ago

I can't disable Proguard because this is the release version of our app. And i think im not removing anything. proguard-rules.zip

renaudcerrato commented 8 years ago

@tuanna-hsp : I'm just asking to disable Proguard temporarily for your tests. Proguard WILL remove any "apparently" unused methods as a default. See http://stackoverflow.com/questions/11640977/how-to-use-android-propertyvaluesholder-with-proguard

tuanna-hsp commented 8 years ago
tuanna-hsp commented 8 years ago

And you should provide users with Proguard rule concerning the working of your library, because you know your library than us. I will try to investigate the problem when i have time :x

renaudcerrato commented 8 years ago

If you're using my ToggleDrawable, the rules should already be included in your build.

Something is probably going wrong in your build env?

tuanna-hsp commented 8 years ago

Ok, i will check again sometime :)

danielto commented 8 years ago

Hi, I have the same problem. When using "minifyEnabled true" there is no animation for the DrawerArrowDrawable.

I am setting the drawer icon like this: searchView.setIcon(new DrawerArrowDrawable(this));

After adding this rule to proguard, the animation works when focusing FloatingSearchView: -keep public class android.support.v7.graphics.** { *; }

But still does not work when navigation drawer is opening. But as the same behavior is in Google Play app, I suppose it it OK.

renaudcerrato commented 8 years ago

@danndi :

-keepclassmembers class * extends com.mypopsy.drawable.ToggleDrawable {
    void setProgress(float);
    float getProgress();
}