ListView item scroll animation (“UIKit Dynamics” -like)

This implementation works quite good. There is some flickering though, probably because of altered indices when the adapter add new views to top or bottom..That could be possibly solved by watching for changes in the tree and shifting the indices on the fly.. public class ElasticListView extends GridView implements AbsListView.OnScrollListener, View.OnTouchListener { private static int … Read more

Android ImageView Animation

Use a RotateAnimation, setting the pivot point to the centre of your image. RotateAnimation anim = new RotateAnimation(0f, 350f, 15f, 15f); anim.setInterpolator(new LinearInterpolator()); anim.setRepeatCount(Animation.INFINITE); anim.setDuration(700); // Start animating the image final ImageView splash = (ImageView) findViewById(R.id.splash); splash.startAnimation(anim); // Later.. stop the animation splash.setAnimation(null);

How to make Beautiful & Stylish apps like Timely

They did a presentation in which they explain how they calculate the view colors, the problems they had with that and a few other useful tips. The video for the presentation is available on their YouTube channel The number morphing is fairly simple and explained in this article and you can find the complete View … Read more

Android – Expandable TextView with Animation

You can check my blog post on ExpandableTexTView: The idea is, initially the TextView will show a small portion of a long text and when it is clicked, it will show the rest of the text. So here is the code that how I solved it. package com.rokonoid.widget; import android.content.Context; import android.content.res.TypedArray; import android.text.SpannableStringBuilder; import … Read more

Android – Change left margin using animation

Use Animation class, not ObjectAnimator. final int newLeftMargin = <some value>; Animation a = new Animation() { @Override protected void applyTransformation(float interpolatedTime, Transformation t) { LayoutParams params = yourView.getLayoutParams(); params.leftMargin = (int)(newLeftMargin * interpolatedTime); yourView.setLayoutParams(params); } }; a.setDuration(500); // in ms yourView.startAnimation(a); Please note that you should use correct LayoutParams class i.e. if your view … Read more

animateLayoutChanges does not work well with nested layout?

The animateLayoutChanges property makes use of LayoutTransitions, which animate both the layout’s children and, from Android 4.0 onward, ancestors in the layout hierarchy all the way to the top of the tree. In Honeycomb, only the layout’s children will be animated. See this Android Developers Blog post for details. Unfortunately, it seems that there’s currently … Read more

android animation is not finished in onAnimationEnd

Here is the actual bug related to this issue http://code.google.com/p/android-misc-widgets/issues/detail?id=8 This basically states that the onAnimationEnd method doesn’t really work well when an AnimationListener is attached to an Animation The workaround is to listen for the animation events in the view to which you were applying the animation to For example if initially you were … Read more

Cannot start this animator on a detached view! reveal effect

This is how I solved it, I added a onLayoutChange listener to the view in onCreateView callback, so whenever it is attached to the view and ready to draw, it makes the reveal @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment final View view = inflater.inflate(R.layout.fragment_map_list, … Read more

Android property animation: how to increase view height?

ValueAnimator anim = ValueAnimator.ofInt(viewToIncreaseHeight.getMeasuredHeight(), -100); anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator valueAnimator) { int val = (Integer) valueAnimator.getAnimatedValue(); ViewGroup.LayoutParams layoutParams = viewToIncreaseHeight.getLayoutParams(); layoutParams.height = val; viewToIncreaseHeight.setLayoutParams(layoutParams); } }); anim.setDuration(DURATION); anim.start();

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)