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 Jan 29, 2021. It is now read-only.
When applying the drawable state; ?android:attr...selectableitembackground ; the item highlights but once the drag starts it disappears. There is a hack to solve this using an view-overlay, but that becomes too intensive on memory. Seems too much effort just to get an overlay when the item is clicked
The text was updated successfully, but these errors were encountered:
This happens cuz the library takes a snapshot of the item (which does not include the touch-overlay)
Solution:
xml:
Edit this method in DynamicGridView
/**
* Creates the hover cell with the appropriate bitmap and of appropriate
* size. The hover cell's BitmapDrawable is drawn on top of the bitmap every
* single time an invalidate call is made.
*/
private BitmapDrawable getAndAddHoverView(View v) {
int w = v.getWidth();
int h = v.getHeight();
int top = v.getTop();
int left = v.getLeft();
Bitmap b = getBitmapFromView(v);
BitmapDrawable drawable = new BitmapDrawable(getResources(), b);
mHoverCellOriginalBounds = new Rect(left, top, left + w, top + h);
mHoverCellCurrentBounds = new Rect(mHoverCellOriginalBounds);
drawable.setBounds(mHoverCellCurrentBounds);
//Choose the color according to your theme
drawable.setColorFilter(Color.parseColor("#994dace3"), PorterDuff.Mode.SRC_OVER);
return drawable;
}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When applying the drawable state; ?android:attr...selectableitembackground ; the item highlights but once the drag starts it disappears. There is a hack to solve this using an view-overlay, but that becomes too intensive on memory. Seems too much effort just to get an overlay when the item is clicked
The text was updated successfully, but these errors were encountered: