Sorry for my English. I have my own ArrayAdapter for list activity . My problem: when I take datas to web service , datas are added ArrayList. Everything is normal up here. Nexus and Android OS 4.0 is listing the data, but other phone and 2.3.3 do not list the data. Everything is normal and I have not received any error.
I have no idea what's problem. Program listing data with Nexus(OS 4.0), but not listing in 2.3.3.
- My main activity class is extend ListActivity
- public static ArrayList freqzo; static MobileArrayAdapter freqz;
- freqzo=new ArrayList(); freqz=new MobileArrayAdapter(this,freqzo);
- this.setListAdapter(freqz); ListView lv = getListView();
- lv.setTextFilterEnabled(true); //And my filling arraylist part: if (store
- instanceof Vector) { Object[] arr = ((Vector) store).toArray(); for
- (int i = 0; i < arr.length; i++) { freqzo.add((String) arr[i].toString()); }
My Mobile Adapter class:
public class MobileArrayAdapter extends ArrayAdapter<String> {
private final Context context;
private final ArrayList<String> values;
public MobileArrayAdapter(Context context, ArrayList<String> values) {
super(context, R.layout.listlayout, values);
this.context = context;
this.values = values;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView = inflater.inflate(R.layout.listlayout, parent, false);
TextView textView = (TextView) rowView.findViewById(R.id.label);
ImageView imageView = (ImageView) rowView.findViewById(R.id.logo);
String s = values.get(position);
Log.d("Liste", "Liste " + values.get(position));
if (s != null && !s.equals("")) {
textView.setText(s);
}
// Change icon based on name
// String s = values[position];
return rowView;
}
}