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
private void displayScrollableUpOnView() {
final Rect rect = new Rect();
view.getGlobalVisibleRect(rect);
final int height = rect.height();
final ImageView hand = new ImageView(view.getContext());
hand.setImageResource(R.drawable.ic_hand_finger_on_up_arrow);
ViewGroup.MarginLayoutParams layoutParams = new ViewGroup.MarginLayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
hand.setLayoutParams(layoutParams);
hand.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
int x = (int) (rect.centerX() - hand.getWidth() / 2f);
int y = (int) (rect.centerY() - hand.getHeight() / 2f) - getStatusBarOffset();
ViewCompat.setTranslationY(hand, y - 25);
ViewCompat.setTranslationX(hand, x);
i also make animated item to non animated .
code
private void displayScrollableUpOnView() {
final Rect rect = new Rect();
view.getGlobalVisibleRect(rect);
final int height = rect.height();
//
// if (settings.animated)
// ViewCompat.animate(hand) // - height * 0.8f - getStatusBarOffset()
// .translationY(rect.top-50)
// .setStartDelay(settings.delay != null ? settings.delay : 1500)
// .setDuration(settings.duration != null ? settings.duration : 3000)
// .setInterpolator(new DecelerateInterpolator());
The text was updated successfully, but these errors were encountered: