Java Code Examples for com.hippo.yorozuya.ViewUtils#removeFromParent()
The following examples show how to use
com.hippo.yorozuya.ViewUtils#removeFromParent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DownloadsScene.java From MHViewer with Apache License 2.0 | 6 votes |
@Override public void onDestroyView() { super.onDestroyView(); if (null != mShowcaseView) { ViewUtils.removeFromParent(mShowcaseView); mShowcaseView = null; } if (null != mRecyclerView) { mRecyclerView.stopScroll(); mRecyclerView = null; } if (null != mFabLayout) { removeAboveSnackView(mFabLayout); mFabLayout = null; } mRecyclerView = null; mViewTransition = null; mAdapter = null; mLayoutManager = null; }
Example 2
Source File: DownloadsScene.java From EhViewer with Apache License 2.0 | 6 votes |
@Override public void onDestroyView() { super.onDestroyView(); if (null != mShowcaseView) { ViewUtils.removeFromParent(mShowcaseView); mShowcaseView = null; } if (null != mRecyclerView) { mRecyclerView.stopScroll(); mRecyclerView = null; } if (null != mFabLayout) { removeAboveSnackView(mFabLayout); mFabLayout = null; } mRecyclerView = null; mViewTransition = null; mAdapter = null; mLayoutManager = null; }
Example 3
Source File: GalleryListScene.java From MHViewer with Apache License 2.0 | 5 votes |
@Override public void onDestroyView() { super.onDestroyView(); if (null != mShowcaseView) { ViewUtils.removeFromParent(mShowcaseView); mShowcaseView = null; } if (null != mSearchBarMover) { mSearchBarMover.cancelAnimation(); mSearchBarMover = null; } if (null != mHelper) { mHelper.destroy(); if (1 == mHelper.getShownViewIndex()) { mHasFirstRefresh = false; } } if (null != mRecyclerView) { mRecyclerView.stopScroll(); mRecyclerView = null; } if (null != mFabLayout) { removeAboveSnackView(mFabLayout); mFabLayout = null; } mAdapter = null; mSearchLayout = null; mSearchBar = null; mSearchFab = null; mViewTransition = null; mLeftDrawable = null; mRightDrawable = null; mActionFabDrawable = null; }
Example 4
Source File: FavoritesScene.java From MHViewer with Apache License 2.0 | 5 votes |
@Override public void onDestroyView() { super.onDestroyView(); if (null != mShowcaseView) { ViewUtils.removeFromParent(mShowcaseView); mShowcaseView = null; } if (null != mHelper) { mHelper.destroy(); if (1 == mHelper.getShownViewIndex()) { mHasFirstRefresh = false; } } if (null != mRecyclerView) { mRecyclerView.stopScroll(); mRecyclerView = null; } if (null != mFabLayout) { removeAboveSnackView(mFabLayout); mFabLayout = null; } mAdapter = null; mSearchBar = null; mSearchBarMover = null; mLeftDrawable = null; mOldFavCat = null; mOldKeyword = null; }
Example 5
Source File: GalleryGuideView.java From MHViewer with Apache License 2.0 | 5 votes |
@Override public void onClick(View v) { switch (mStep) { case 0: mStep++; bind(); break; default: case 1: Settings.putGuideGallery(false); ViewUtils.removeFromParent(this); break; } }
Example 6
Source File: GalleryListScene.java From EhViewer with Apache License 2.0 | 5 votes |
@Override public void onDestroyView() { super.onDestroyView(); if (null != mShowcaseView) { ViewUtils.removeFromParent(mShowcaseView); mShowcaseView = null; } if (null != mSearchBarMover) { mSearchBarMover.cancelAnimation(); mSearchBarMover = null; } if (null != mHelper) { mHelper.destroy(); if (1 == mHelper.getShownViewIndex()) { mHasFirstRefresh = false; } } if (null != mRecyclerView) { mRecyclerView.stopScroll(); mRecyclerView = null; } if (null != mFabLayout) { removeAboveSnackView(mFabLayout); mFabLayout = null; } mAdapter = null; mSearchLayout = null; mSearchBar = null; mSearchFab = null; mViewTransition = null; mLeftDrawable = null; mRightDrawable = null; mActionFabDrawable = null; }
Example 7
Source File: FavoritesScene.java From EhViewer with Apache License 2.0 | 5 votes |
@Override public void onDestroyView() { super.onDestroyView(); if (null != mShowcaseView) { ViewUtils.removeFromParent(mShowcaseView); mShowcaseView = null; } if (null != mHelper) { mHelper.destroy(); if (1 == mHelper.getShownViewIndex()) { mHasFirstRefresh = false; } } if (null != mRecyclerView) { mRecyclerView.stopScroll(); mRecyclerView = null; } if (null != mFabLayout) { removeAboveSnackView(mFabLayout); mFabLayout = null; } mAdapter = null; mSearchBar = null; mSearchBarMover = null; mLeftDrawable = null; mOldFavCat = null; mOldKeyword = null; }
Example 8
Source File: GalleryGuideView.java From EhViewer with Apache License 2.0 | 5 votes |
@Override public void onClick(View v) { switch (mStep) { case 0: mStep++; bind(); break; default: case 1: Settings.putGuideGallery(false); ViewUtils.removeFromParent(this); break; } }
Example 9
Source File: SearchLayout.java From MHViewer with Apache License 2.0 | 4 votes |
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view; if (viewType == ITEM_TYPE_ACTION) { ViewUtils.removeFromParent(mActionView); mActionView.setLayoutParams(new RecyclerView.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); int resId; switch (mSearchMode) { default: case SEARCH_MODE_NORMAL: resId = R.string.image_search; break; case SEARCH_MODE_IMAGE: resId = R.string.keyword_search; break; } mAction.setText(resId); view = mActionView; } else { view = mInflater.inflate(R.layout.search_category, parent, false); TextView title = (TextView) view.findViewById(R.id.category_title); FrameLayout content = (FrameLayout) view.findViewById(R.id.category_content); switch (viewType) { case ITEM_TYPE_NORMAL: title.setText(R.string.search_normal); ViewUtils.removeFromParent(mNormalView); content.addView(mNormalView); break; case ITEM_TYPE_NORMAL_ADVANCE: title.setText(R.string.search_advance); ViewUtils.removeFromParent(mAdvanceView); content.addView(mAdvanceView); break; case ITEM_TYPE_IMAGE: title.setText(R.string.search_image); ViewUtils.removeFromParent(mImageView); content.addView(mImageView); break; } } return new SimpleHolder(view); }
Example 10
Source File: SearchLayout.java From EhViewer with Apache License 2.0 | 4 votes |
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view; if (viewType == ITEM_TYPE_ACTION) { ViewUtils.removeFromParent(mActionView); mActionView.setLayoutParams(new RecyclerView.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); int resId; switch (mSearchMode) { default: case SEARCH_MODE_NORMAL: resId = R.string.image_search; break; case SEARCH_MODE_IMAGE: resId = R.string.keyword_search; break; } mAction.setText(resId); view = mActionView; } else { view = mInflater.inflate(R.layout.search_category, parent, false); TextView title = (TextView) view.findViewById(R.id.category_title); FrameLayout content = (FrameLayout) view.findViewById(R.id.category_content); switch (viewType) { case ITEM_TYPE_NORMAL: title.setText(R.string.search_normal); ViewUtils.removeFromParent(mNormalView); content.addView(mNormalView); break; case ITEM_TYPE_NORMAL_ADVANCE: title.setText(R.string.search_advance); ViewUtils.removeFromParent(mAdvanceView); content.addView(mAdvanceView); break; case ITEM_TYPE_IMAGE: title.setText(R.string.search_image); ViewUtils.removeFromParent(mImageView); content.addView(mImageView); break; } } return new SimpleHolder(view); }