Fix SearchBar animations

This commit is contained in:
seven332 committed 2018-10-18 14:44:47 +08:00
1 parent 84ed520c1c
commit bc4d20d0a4
5 files changed
+10 -26

No files matched your search

@@ -279,7 +279,7 @@ public class FavoritesScene extends BaseScene implements
mSearchBar.setHelper(this);
mSearchBar.setAllowEmptySearch(false);
updateSearchBar();
mSearchBarMover = new SearchBarMover(this, ViewUtils.$$(view, R.id.search_bar_card), mRecyclerView);
mSearchBarMover = new SearchBarMover(this, mSearchBar, mRecyclerView);
mFabLayout.setExpanded(false, false);
mFabLayout.setAutoCancel(false);
@@ -452,7 +452,7 @@ public final class GalleryListScene extends BaseScene
mSearchFab.setOnClickListener(this);
mSearchBarMover = new SearchBarMover(this, ViewUtils.$$(view, R.id.search_bar_card), mRecyclerView, mSearchLayout);
mSearchBarMover = new SearchBarMover(this, mSearchBar, mRecyclerView, mSearchLayout);
// Update list url builder
onUpdateUrlBuilder();
@@ -26,6 +26,7 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.v7.widget.CardView;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@@ -38,23 +39,20 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import com.hippo.ehviewer.R;
import com.hippo.view.ViewTransition;
import com.hippo.yorozuya.AnimationUtils;
import com.hippo.yorozuya.MathUtils;
import com.hippo.yorozuya.SimpleAnimatorListener;
import com.hippo.yorozuya.ViewUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class SearchBar extends FrameLayout implements View.OnClickListener,
public class SearchBar extends CardView implements View.OnClickListener,
TextView.OnEditorActionListener, TextWatcher,
SearchEditText.SearchEditTextListener {
+3 -10
View File
@@ -27,21 +27,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<android.support.v7.widget.CardView
android:id="@+id/search_bar_card"
<com.hippo.ehviewer.widget.SearchBar
android:id="@+id/search_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/gallery_search_bar_margin_h"
android:layout_marginRight="@dimen/gallery_search_bar_margin_h"
android:layout_marginTop="@dimen/gallery_search_bar_margin_v"
style="@style/CardView.Normal">
<com.hippo.ehviewer.widget.SearchBar
android:id="@+id/search_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.v7.widget.CardView>
style="@style/CardView.Normal"/>
<com.hippo.widget.FabLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
+3 -10
View File
@@ -32,21 +32,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<android.support.v7.widget.CardView
android:id="@+id/search_bar_card"
<com.hippo.ehviewer.widget.SearchBar
android:id="@+id/search_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/gallery_search_bar_margin_h"
android:layout_marginRight="@dimen/gallery_search_bar_margin_h"
android:layout_marginTop="@dimen/gallery_search_bar_margin_v"
style="@style/CardView.Normal">
<com.hippo.ehviewer.widget.SearchBar
android:id="@+id/search_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.v7.widget.CardView>
style="@style/CardView.Normal"/>
<com.hippo.widget.FabLayout
xmlns:app="http://schemas.android.com/apk/res-auto"