Back to project page AndroidImageSlider.
The source code is released under:
MIT License
If you think the Android project AndroidImageSlider listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.daimajia.slider.demo; /* w ww . j av a2 s. 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.slider.library.SliderLayout; /** * Created by daimajia on 14-5-29. */ public class TransformerAdapter extends BaseAdapter{ private Context mContext; public TransformerAdapter(Context context) { mContext = context; } @Override public int getCount() { return SliderLayout.Transformer.values().length; } @Override public Object getItem(int position) { return SliderLayout.Transformer.values()[position].toString(); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { TextView t = (TextView)LayoutInflater.from(mContext).inflate(R.layout.item,null); t.setText(getItem(position).toString()); return t; } }