Android中自定义下拉样式Spinner(1),看懂这些帮你轻松解决就业问题

  • Post author:
  • Post category:其他


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);

<



版权声明:本文为m0_64383081原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。