List of usage examples for android.view View hashCode
@HotSpotIntrinsicCandidate public native int hashCode();
From source file:com.hellofyc.base.view.animation.ZoomOutPageTransformer.java
@Override public void transformPage(final View view, final float position) { if (DEBUG)// w ww . java 2 s . c o m FLog.i("view.hasCode:" + view.hashCode() + ", position:" + position); int pageWidth = view.getWidth(); int pageHeight = view.getHeight(); if (position < -1) { ViewCompat.setAlpha(view, 0); } else if (position <= 1) { float scaleFactor = Math.max(MIN_SCALE, 1 - Math.abs(position)); float verticalMargin = pageHeight * (1 - scaleFactor) / 2; float horizontalMargin = pageWidth * (1 - scaleFactor) / 2; if (position < 0) { FLog.i("verticalMargin:" + verticalMargin + ", horizontalMargin:" + horizontalMargin); ViewCompat.setTranslationX(view, horizontalMargin - verticalMargin / 2); } else { ViewCompat.setTranslationX(view, -horizontalMargin + verticalMargin / 2); } ViewCompat.setScaleX(view, scaleFactor); ViewCompat.setScaleY(view, scaleFactor); ViewCompat.setAlpha(view, MIN_ALPHA + (scaleFactor - MIN_SCALE) / (1 - MIN_SCALE) * (1 - MIN_ALPHA)); } else { ViewCompat.setAlpha(view, 0); } }
From source file:com.devilyang.musicstation.swinginadapters.AnimationAdapter.java
private void cancelExistingAnimation(int position, View convertView) { int hashCode = convertView.hashCode(); Animator animator = mAnimators.get(hashCode); if (animator != null) { animator.end();// ww w .j av a 2s. co m mAnimators.remove(hashCode); } }
From source file:com.tmall.wireless.tangram3.structure.BaseCell.java
public void setOnClickListener(View view, int eventType) { view.setOnClickListener(this); innerClickMap.put(view.hashCode(), Integer.valueOf(eventType)); }
From source file:com.tmall.wireless.tangram3.structure.BaseCell.java
public void clearClickListener(View view, int eventType) { view.setOnClickListener(null); innerClickMap.remove(view.hashCode()); }
From source file:com.dalingge.gankio.common.widgets.recyclerview.anim.adapter.helper.ViewAnimator.java
/** * Cancels any existing animations for given View. *///from w ww .ja v a2s . c om public void cancelExistingAnimation(@NonNull final View view) { int hashCode = view.hashCode(); Animator animator = mAnimators.get(hashCode); if (animator != null) { animator.end(); mAnimators.remove(hashCode); } }
From source file:com.xianxiaotao.copyandstudy.xcopy.recycleranim.adapter.helper.ViewAnimator.java
/** * Cancels any existing animations for given View. */// w w w .j a v a 2 s. c om @TargetApi(Build.VERSION_CODES.HONEYCOMB) public void cancelExistingAnimation(@NonNull final View view) { int hashCode = view.hashCode(); Animator animator = mAnimators.get(hashCode); if (animator != null) { animator.end(); mAnimators.remove(hashCode); } }
From source file:com.tmall.wireless.tangram3.structure.BaseCell.java
@Override public void onClick(View v) { if (serviceManager != null) { SimpleClickSupport service = serviceManager.getService(SimpleClickSupport.class); if (service != null) { int eventType = this.pos; if (innerClickMap.containsKey(v.hashCode())) { eventType = innerClickMap.get(v.hashCode()).intValue(); }/*from w ww. j ava2s. c o m*/ service.onClick(v, this, eventType); } } }
From source file:eu.davidea.flexibleadapter.FlexibleAnimatorAdapter.java
/** * Cancels any existing animations for given View. Useful when fling. *//*from www . j a v a 2 s. c o m*/ private void cancelExistingAnimation(@NonNull final View itemView) { int hashCode = itemView.hashCode(); Animator animator = mAnimators.get(hashCode); if (animator != null) animator.end(); }
From source file:com.dalingge.gankio.common.widgets.recyclerview.anim.adapter.helper.ViewAnimator.java
/** * Animates given View.//from w w w . j a v a 2 s .c o m * * @param view the View that should be animated. */ private void animateView(final int position, @NonNull final View view, @NonNull final Animator[] animators) { if (mAnimationStartMillis == -1) { mAnimationStartMillis = SystemClock.uptimeMillis(); } ViewCompat.setAlpha(view, 0); AnimatorSet set = new AnimatorSet(); set.playTogether(animators); set.setStartDelay(calculateAnimationDelay(position)); set.setDuration(mAnimationDurationMillis); set.start(); mAnimators.put(view.hashCode(), set); }
From source file:com.xianxiaotao.copyandstudy.xcopy.recycleranim.adapter.helper.ViewAnimator.java
/** * Animates given View.// w w w. j ava2 s. c o m * * @param view the View that should be animated. */ @TargetApi(Build.VERSION_CODES.HONEYCOMB) private void animateView(final int position, @NonNull final View view, @NonNull final Animator[] animators) { if (mAnimationStartMillis == -1) { mAnimationStartMillis = SystemClock.uptimeMillis(); } ViewCompat.setAlpha(view, 0); AnimatorSet set = new AnimatorSet(); set.playTogether(animators); set.setStartDelay(calculateAnimationDelay(position)); set.setDuration(mAnimationDurationMillis); set.start(); mAnimators.put(view.hashCode(), set); }