You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.
public void undoView() {
RecyclerView.ViewHolder viewHolder = mAdapter.onCreateViewHolder(this, 0);
mAdapter.onBindViewHolder(viewHolder, getCurrentPosition() - 1);
View topView = viewHolder.itemView;
topView.setTag(R.id.new_view, true);
if (!mDisableHwAcceleration) {
topView.setLayerType(LAYER_TYPE_HARDWARE, null);
}
if (mViewRotation > 0) {
topView.setRotation(mRandom.nextInt(mViewRotation) - (mViewRotation / 2));
}
int width = getWidth() - (getPaddingLeft() + getPaddingRight());
int height = getHeight() - (getPaddingTop() + getPaddingBottom());
LayoutParams params = topView.getLayoutParams();
if (params == null) {
params = new LayoutParams(
FrameLayout.LayoutParams.WRAP_CONTENT,
FrameLayout.LayoutParams.WRAP_CONTENT);
}
int measureSpecWidth = MeasureSpec.AT_MOST;
int measureSpecHeight = MeasureSpec.AT_MOST;
if (params.width == LayoutParams.MATCH_PARENT) {
measureSpecWidth = MeasureSpec.EXACTLY;
}
if (params.height == LayoutParams.MATCH_PARENT) {
measureSpecHeight = MeasureSpec.EXACTLY;
}
topView.measure(measureSpecWidth | width, measureSpecHeight | height);
addViewInLayout(topView, getChildCount(), params, true);
}
But i can't solve one problem: If I make undo button under SwipeStack (by Z) with FrameLayout - click on him works but undoView() not works. If i make undo button below/top/left/right of SwipeStack with LinearLayout - undoView() works fine. Why?
The text was updated successfully, but these errors were encountered:
Hi. I create undoView method in library
But i can't solve one problem: If I make undo button under
SwipeStack
(by Z) withFrameLayout
- click on him works butundoView()
not works. If i make undo button below/top/left/right ofSwipeStack
withLinearLayout
-undoView()
works fine. Why?The text was updated successfully, but these errors were encountered: