将google地图放入listview的每个项目

时间:2014-12-12 03:26:15

标签: android google-maps

这个问题预先准备了几天。我想把谷歌地图放到列表视图中。

@Override
        public View getView(final int position, View convertView, ViewGroup parent) {
            ViewHolder viewHolder = null;
            if(convertView == null){
                viewHolder = new ViewHolder();
                convertView = mlayoutInflater.inflate(R.layout.mapcontent, null);
                viewHolder.textView = (TextView) convertView.findViewById(R.id.text);
                mapView = (MapView) convertView.findViewById(R.id.map);
                mapView.onCreate(savedInstanceState);
                if (aMap == null) {
                    aMap = mapView.getMap();
                }

0 个答案:

没有答案