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 667 forks source link

Daynight theme support #238

Open JasonHezz opened 7 years ago

JasonHezz commented 7 years ago

Switch to night mode ,floatingsearchview nothing changed and reopen app ,the floatingsearchview auto switch to night mode here are some screenshot

normal state: image

switch to night mode state: image

reopen app: image

JasonHezz commented 7 years ago

The new version still had the same issue , spend some time to investigate.According to Chris Banes AppCompat v23.2 — DayNight, the resources for day/night switching should not be restored by floatingsearchview. That's why switch to night mode state , the BackgroundColor still is white.

 @Override
  public void onRestoreInstanceState(Parcelable state) {
    .....
   // setBackgroundColor(savedState.backgroundColor);
  }

it works for me.