Guest User

Untitled

a guest
Jun 23rd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.98 KB | None | 0 0
  1. @Override
  2.                 public View getView(int position, View convertView, ViewGroup parent) {
  3.  
  4.                         MenuList item = menuItemList.get(position); // getItem(position);
  5.                         View view = convertView;
  6.             ImageView imgBg=null;
  7.                          if (view == null) {
  8.                                 view = inflater.inflate(resourceid, null);
  9.                                 view.getBackground().setAlpha(15);
  10.                                 synchronized (view) {
  11.                                          imgBg = (ImageView) view
  12.                                                 .findViewById(R.id.ivCotnentItem);
  13.                                          // view.setLayoutParams(mParam);
  14.                                          view.setPadding(5, 0, 5, 0);
  15.  
  16. if (!textColor.equals(""))
  17.                                tvCaption.setTextColor(Color.parseColor("#" + textColor));
  18.                             // tvCaption.setTypeface(tfItemFont);
  19.                             tvCaption.setTextSize(20);
  20.                                 // tvCaption.setPadding(0, 0, 0, 5);
  21.                                 // Log.v("tvCaption" + tvCaption.getText(), "log1");
  22.                                 }
  23.                            }
  24.                            if (position >= imageList.size()) {
  25.                                         imageList.add(Utils.getImageFromApplicationFolder(
  26.                                                         thisContext, item.bgImage, null));
  27.                             }
  28.                             imgBg.setImageDrawable(imageList.get(position));
  29.                             imgBg.setLayoutParams(mParamImage);
  30.                             TextView tvCaption = (TextView) view
  31.                                                 .findViewById(R.id.tvCaption);
  32.                             tvCaption.setText(item.caption);
  33.                            
  34.                                 return view;
  35.                         }
  36.                 }
Add Comment
Please, Sign In to add comment