Android Open Source - AndroidViewAnimations Effect Adapter

From Project

Back to project page AndroidViewAnimations.


The source code is released under:

MIT License

If you think the Android project AndroidViewAnimations listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.daimajia.androidanimations;
//from  www . j a  va  2s .c  om
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.daimajia.androidanimations.library.Techniques;

public class EffectAdapter extends BaseAdapter {

    private Context mContext;

    public EffectAdapter(Context context){
        mContext = context;

    public int getCount() {
        return Techniques.values().length;

    public Object getItem(int position) {
        return Techniques.values()[position].getAnimator();

    public long getItemId(int position) {
        return position;

    public View getView(final int position, View convertView, ViewGroup parent) {
        View v = LayoutInflater.from(mContext).inflate(R.layout.item,null,false);
        TextView t = (TextView)v.findViewById(;
        Object o = getItem(position);
        int start = o.getClass().getName().lastIndexOf(".") + 1;
        String name = o.getClass().getName().substring(start);
        return v;

Java Source Code List