请问KJAdapter和AdapterHolder的使用方法
Closed this issue · 1 comments
应该会有和xutils一样的使用方法,看了源码没搞明白,正在研究
好 已经解决了。挺方便
package com.yssh.prl.adapter;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import com.yssh.prl.R;
import org.kymjs.kjframe.widget.AdapterHolder;
import org.kymjs.kjframe.widget.KJAdapter;
import java.util.List;
/**
-
Created by liuy211.yssh on 2016/3/24.
-
Function 主功能页面适配器
*/
public class MainActivityMenuAdapter extends KJAdapter {public MainActivityMenuAdapter(GridView gridView,List list){
super(gridView,list, R.layout.activity_main_menu_item);
}@OverRide
public int getCount() {
return 10;
}@OverRide
public Object getItem(int position) {
return null;
}@OverRide
public long getItemId(int position) {
return position;
}@OverRide
public View getView(int position, View convertView, ViewGroup parent) {
AdapterHolder holder = AdapterHolder.get(convertView,parent,R.layout.activity_main_menu_item,position);
convert(holder, getItem(position), isScrolling, position);
holder.setText(R.id.activity_main_menu_item_title,position+"");
return holder.getConvertView();
}}