編輯:關於android開發
public class ViewHolder{ Button fenzu_btn_1; Button fenzu_btn_2; Button fenzu_btn_3; } public class ViewHolder1{ TextView tvTitle; TextView tvLetter; } /** * 當ListView數據發生變化時,調用此方法來更新ListView * @param list http://www.cnblogs.com/roucheng/p/csslogin.html */ public void updateListView(List<SortModel> list){ this.list = list; notifyDataSetChanged(); } public int getCount() { return this.list.size(); } public Object getItem(int position) { return list.get(position); } @Override public int getItemViewType(int position) { // TODO Auto-generated method stub int p = position; if (p == 0) return 0; else return 1; } @Override public int getViewTypeCount() { return 2; } public View getView(final int position, View view, ViewGroup arg2) { int type = getItemViewType(position); if (view == null) { inflater = LayoutInflater.from(mContext); if(type==1){ view = inflater.inflate(R.layout.item,arg2, false); viewHolder1 = new ViewHolder1(); viewHolder1.tvTitle= (TextView) view.findViewById(R.id.title); viewHolder1.tvLetter= (TextView) view.findViewById(R.id.catalog); view.setTag(viewHolder1); }else{ //http://www.cnblogs.com/roucheng/p/csslogin.html view = inflater.inflate(R.layout.items2,arg2, false); fenzu_btn_1=(LinearLayout)view.findViewById(R.id.fenzu_btn_1); view.setTag(viewHolder); } } else { switch (type) { case 1: viewHolder1 = (ViewHolder1) view.getTag(); break; case 0: viewHolder = (ViewHolder) view.getTag(); break; } } return view; }
更多特效:http://www.cnblogs.com/roucheng/p/texiao.html
tcpdump的移植和使用方法簡介用簡單的話來定義tcpdump,就是:dump the traffic on a network,根據使用者的定義對網絡上的數據包進行截
安卓開源項目周報0117,安卓開源項目0117由OpenDigg 出品的安卓開源項目周報第六期來啦。我們的安卓開源周報集合了OpenDigg一周來新收錄的優質的
Android特效專輯(十二)——如何仿支付寶咻一咻功能實現波紋擴散特效 Android特效專輯(十二)——仿支付寶咻一咻功能實現波紋擴散特效
Android自定義dialog中的EditText無法彈出鍵盤的解決 最近我獨立開發的項目《全醫會》已經在內測當中了,很快將會上架到各大應用市場。之前開發的幾個項目都因