package com.example.test;
import java.util.ArrayList;
import java.util.List;
import android.os.Bundle;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;
//该代码可以实现,listview的第六个item与其它的item不一样的效果
public class MainActivity extends Activity {
ListView listView;
int len;
List<String> strings;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
listView = (ListView) findViewById(R.id.listview);
// listView.addHeaderView(view);
// listView.addFooterView(view);
// 定义数据源
strings = new ArrayList<String>();
for (int i = 0; i < 20; i++) {
strings