import java.util.List;
import org.gaochun.R;
import org.gaochun.adapter.SpinerAdapter;
import org.gaochun.adapter.SpinerAdapter.IOnItemSelectListener;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.PopupWindow;
/**
-
自定义SpinerPopWindow类
-
@author gao_chun
*/
public class SpinerPopWindow extends PopupWindow implements OnItemClickListener{
private Context mContext;
private ListView mListView;
private SpinerAdapter mAdapter;
private IOnItemSelectListener mItemSelectListener;
public SpinerPopWindow(Context context)
{
super(context);
mContext = context;
init();
}
public void setItemListener(IOnItemSelectListener listener){
mItemSelectListener = listener;
}
public void setAdatper(SpinerAdapter adapter){
mAdapter = adapter;
mListView.setAdapter(mAdapter);
<