@Override public void initViews() { mTxtLogIn = (TextView) findViewById(R.id.txt_login); mTxtSoundType = (TextView) findViewById(R.id.txt_sound_type); String key = CommUtils.getMusicItemKey(this); mTxtSoundType.setText(GlobalSetting.CONTENT_MAP.get(key)); }
@Override public View getView(int position, View convertView, ViewGroup parent) { final AlbumItem info = mAlbumList.get(position); int type = getItemViewType(position); switch (type) { case TYPE_BANNER: { // BannerViewHolder holder; // if (convertView == null) { // holder = new BannerViewHolder(); // convertView = // LayoutInflater.from(mContext).inflate(R.layout.listitem_banner, null); // holder.banner = (AutoScrollBanner) // convertView.findViewById(R.id.bv_auto); // convertView.setTag(holder); // } else { // holder = (BannerViewHolder) convertView.getTag(); // } // holder.banner.show(getAlbumItems(info)); convertView = LayoutInflater.from(mContext).inflate(R.layout.listitem_banner, null); ((BannerLayer) convertView).refresh(null); break; } case TYPE_ALBUM: { AlbumViewHolder holder; if (convertView == null) { holder = new AlbumViewHolder(); convertView = LayoutInflater.from(mContext).inflate(R.layout.listitem_album, null); holder.image = (ImageView) convertView.findViewById(R.id.nt_image); holder.title = (TextView) convertView.findViewById(R.id.txt_title); convertView.setTag(holder); } else { holder = (AlbumViewHolder) convertView.getTag(); } holder.title.setText(info.getTitle()); CommUtils.loadImage(holder.image, info.getCover()); break; } default: break; } return convertView; }