| | |
| | | |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | |
| | | import androidx.recyclerview.widget.GridLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | |
| | | import com.bumptech.glide.Glide; |
| | | import com.bumptech.glide.load.engine.DiskCacheStrategy; |
| | | import com.bumptech.glide.request.RequestOptions; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.BranShopInfo; |
| | | import com.tejia.lijin.app.entity.TaoBaoGoodsBrief; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityJD; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityPDD; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.util.GlideCircleTransform; |
| | | import com.tejia.lijin.app.util.glide.GlideRoundCenterCropTransform; |
| | | import com.tejia.lijin.app.util.glide.GlideRoundedCornersTransform; |
| | |
| | | Glide.with(viewHolder.item_brandshoplis_bg.getContext()) |
| | | .load(BrandFragment.navBgPicture) |
| | | .placeholder(R.drawable.shape_addzfb_top_hint) |
| | | .apply(new RequestOptions().optionalTransform(new GlideRoundedCornersTransform(viewHolder.item_brandshoplis_bg.getContext(),7.0f, GlideRoundedCornersTransform.CornerType.TOP))) |
| | | .apply(new RequestOptions().optionalTransform(new GlideRoundedCornersTransform(viewHolder.item_brandshoplis_bg.getContext(), 7.0f, GlideRoundedCornersTransform.CornerType.TOP))) |
| | | .into(viewHolder.item_brandshoplis_bg); |
| | | |
| | | |
| | |
| | | return; |
| | | //------------------------- |
| | | RequestOptions myOptions = new RequestOptions() |
| | | .transform(new GlideRoundCenterCropTransform(mContext,5)); |
| | | .transform(new GlideRoundCenterCropTransform(mContext, 5)); |
| | | |
| | | //店铺商品 |
| | | if (info.getListGoods().size() > 0 && info.getListGoods().get(0) != null) {//第一個商品 |
| | |
| | | viewHolder.item_brandshoplis_img.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,jsonshop.getGoodsType()); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", jsonshop.getGoodsId()); |
| | | intent.putExtra("goodsType", jsonshop.getGoodsType()); |
| | | intent.putExtra("title", jsonshop.getTitle()); |
| | | intent.putExtra("id", jsonshop.getGoodsId()); |
| | | intent.putExtra("from", "brand"); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | viewHolder.item_brandshoplis_img2.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent; |
| | | if (jsonshop2.getGoodsType() == 1) { |
| | | intent = new Intent(mContext, GoodsDetailActivityTB.class); |
| | | } else if (jsonshop2.getGoodsType() == 2) { |
| | | intent = new Intent(mContext, GoodsDetailActivityJD.class); |
| | | } else { |
| | | intent = new Intent(mContext, GoodsDetailActivityPDD.class); |
| | | } |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("title", jsonshop2.getTitle()); |
| | | intent.putExtra("id", jsonshop2.getGoodsId()); |
| | | intent.putExtra("goodsId", jsonshop2.getGoodsId()); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | |
| | | intent.putExtra("from", "brand"); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | viewHolder.item_brandshoplis_img3.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,jsonshop3.getGoodsType()); |
| | | Intent intent =new Intent(mContext,GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", jsonshop3.getGoodsId()); |
| | | intent.putExtra("goodsType", jsonshop3.getGoodsType()); |
| | | intent.putExtra("title", jsonshop3.getTitle()); |
| | | intent.putExtra("id", jsonshop3.getGoodsId()); |
| | | intent.putExtra("from", "brand"); |
| | | mContext.startActivity(intent); |
| | | } |