标签:arraylist view extend author convert example tin xtend null
import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.example.myapplication.R; import java.util.ArrayList; /** * @author:created By ZhangHao * 时间:2019/4/26 15 * 邮箱:188660586@qq.com */ public class site_choseAdapter extends ArrayAdapter { public site_choseAdapter(Context context, int resource, ArrayList<String> arrlist) { super(context, resource,arrlist); } @Override public View getView(int position, View convertView, ViewGroup parent) { String site = (String)getItem(position); View view = LayoutInflater.from(getContext()).inflate(R.layout.item_site_chose, null); TextView tv_site = (TextView)view.findViewById(R.id.tv_site); tv_site.setText(site); return view; } }
标签:arraylist view extend author convert example tin xtend null
原文地址:https://www.cnblogs.com/chenyuchun/p/11066787.html