When I used ListView to display the data, I customized an adapter (extends Arrayadapter) and then overridden the GetView method, and now there's a problem, which is that the GetView () method is called repeatedly, like I have two data in my _data, But log.i ("show", House.tostring ()) was executed 4 or more times, may I ask you this is God horse situation?
The method code is as follows:
This is a custom adapter:
Package com.hb.puppet.utils;
Import java.util.List;
Import Com.hb.puppet.activity.MetaData;
Import COM.HB.PUPPET.ACTIVITY.R;
Import Com.hb.puppet.entity.House;
Import Android.content.Context;
Import android.graphics.drawable.Drawable;
Import Android.view.LayoutInflater;
Import Android.view.View;
Import Android.view.View.OnClickListener;
Import Android.view.ViewGroup;
Import Android.widget.ArrayAdapter;
Import Android.widget.Button;
Import Android.widget.ImageView;
Import Android.widget.ListView;
Import Android.widget.TextView; public class Customcollectadapter extends arrayadapter