Ejemplo n.º 1
0
    @Override
    public void bindView(View view, Context context, Cursor c) {
      if (view == null) {
        view = CommonAndroid.initView(context, R.layout.service_list_item, null);
      }

      if (positionSelection == c.getPosition()) {
        view.setBackgroundResource(R.color.servicelist_first); // R.color.servicelist_first
      } else {
        view.setBackgroundResource(android.R.color.transparent);
      }

      ImageView img = CommonAndroid.getView(view, R.id.img);
      TextView text_1 = CommonAndroid.getView(view, R.id.text_1);
      TextView text_2 = CommonAndroid.getView(view, R.id.text_2);

      CommonAndroid.setText(text_1, c, ServiceList.title);
      CommonAndroid.setText(text_2, c, ServiceList.subtitle);

      ImageLoaderUtils.getInstance(context)
          .displayImageHome(CommonAndroid.getString(c, ServiceList.thumbnail), img);
    }
Ejemplo n.º 2
0
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      View view = convertView;
      if (view == null) {
        view = CommonAndroid.initView(mContext, R.layout.service_list_item_z, null);
      }

      ico_indi_gray = (ImageView) view.findViewById(R.id.ico_indi_gray);
      if (positionSelection == position) {
        view.setBackgroundResource(R.color.servicelist_first);
        ico_indi_gray.setImageDrawable(myIcon_select);
      } else {
        view.setBackgroundResource(android.R.color.transparent);
        ico_indi_gray.setImageDrawable(myIcon_unselect);
      }

      ImageView img = CommonAndroid.getView(view, R.id.img);
      TextView text_1 = CommonAndroid.getView(view, R.id.text_1);
      text_1.setText(listData.get(position).getTitle());
      ImageLoaderUtils.getInstance(parent.getContext())
          .displayImageHome(listData.get(position).getThumbnail(), img);
      return view;
    }
Ejemplo n.º 3
0
 @Override
 public View newView(Context arg0, Cursor arg1, ViewGroup arg2) {
   return CommonAndroid.initView(arg0, R.layout.service_list_item, null);
 }