| | |
| | | |
| | | import com.alibaba.baichuan.android.trade.model.AlibcShowParams; |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.xiaomi.mipush.sdk.ErrorCode; |
| | | import com.xiaomi.mipush.sdk.MiPushClient; |
| | |
| | | import com.tejia.lijin.app.ui.BlankBaiChuanActivity31; |
| | | import com.tejia.lijin.app.ui.SplashActivity; |
| | | import com.tejia.lijin.app.ui.main.MainActivity; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | |
| | | import org.json.JSONObject; |
| | |
| | | } else { |
| | | try { |
| | | if (cClass.equals("com.tejia.lijin.app.ui.recommend.GoodsBrowserActivity")) { |
| | | cClass = GoodsDetailActivityTB.class.getName(); |
| | | cClass = GoodsDetailActivity.class.getName(); |
| | | } |
| | | Intent intent = new Intent(context, Class.forName(JumpActivityUtil.filterActivityName(cClass))); |
| | | if (!StringUtils.isEmpty(url1)) |
| | | intent.putExtra("url", url1); |
| | | if (!StringUtils.isEmpty(id)) { |
| | | intent.putExtra("id", id); |
| | | intent.putExtra("goodsId", id); |
| | | } |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | context.startActivity(intent); |
| | | } catch (ClassNotFoundException e) { |
| | |
| | | if (last == total - 1 && mlist.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getHistory(); |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getShopInfo(getIntent().getStringExtra("sid")); |
| | | } |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getGoodsList(); |
| | | } |
| | |
| | | import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.umeng.analytics.MobclickAgent; |
| | |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.callBack.MiDuoTradeCallback; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailBrowerActivity; |
| | | import com.tejia.lijin.app.ui.recommend.SearchActivity; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | |
| | | |
| | | @JavascriptInterface |
| | | public String getUid() { |
| | | return UserUtil.getUid(ShoppingApplication.application)+""; |
| | | return UserUtil.getUid(ShoppingApplication.application) + ""; |
| | | } |
| | | |
| | | @JavascriptInterface |
| | |
| | | |
| | | @JavascriptInterface |
| | | public void jumpGoodsSplash(long id) { |
| | | Intent intent = new Intent(BrowserActivity.this, GoodsDetailActivityTB.class); |
| | | intent.putExtra("id", id + ""); |
| | | Intent intent = new Intent(BrowserActivity.this, GoodsDetailActivity.class); |
| | | intent.putExtra("from", "web"); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | startActivity(intent); |
| | | } |
| | | |
| | |
| | | |
| | | import com.alibaba.baichuan.android.trade.model.AlibcShowParams; |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BuXinConstant; |
| | | import com.tejia.lijin.app.ui.main.MainActivity; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | |
| | | import org.json.JSONException; |
| | |
| | | } else { |
| | | try { |
| | | if (cClass.equals("com.tejia.lijin.app.ui.recommend.GoodsBrowserActivity")) { |
| | | cClass = GoodsDetailActivityTB.class.getName(); |
| | | cClass = GoodsDetailActivity.class.getName(); |
| | | } |
| | | Intent intent = new Intent(context, Class.forName(JumpActivityUtil.filterActivityName(cClass))); |
| | | if (!StringUtils.isEmpty(url1)) |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | setData(page); |
| | | } |
| | | } else { |
| | |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.TaoBaoGoodsBrief; |
| | |
| | | // Intent intent = new Intent(mContext, GoodsDetailBrowerActivity.class); |
| | | if (!StringUtils.isEmpty(type)) |
| | | CategoryCustomEvent.classGoods(mContext, type); |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoodsType()); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | intent.putExtra("from", from); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | public void onClick(View v) { |
| | | if (!StringUtils.isEmpty(type)) |
| | | CategoryCustomEvent.classGoods(mContext, type); |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(mContext, info.getGoodsType()); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | intent.putExtra("from", from); |
| | | mContext.startActivity(intent); |
| | | } |
New file |
| | |
| | | package com.tejia.lijin.app.ui.dialog; |
| | | |
| | | import android.app.Dialog; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.graphics.Color; |
| | | import android.graphics.Typeface; |
| | | import android.text.Spannable; |
| | | import android.text.SpannableString; |
| | | import android.text.style.ForegroundColorSpan; |
| | | import android.text.style.RelativeSizeSpan; |
| | | import android.text.style.StyleSpan; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.WindowManager; |
| | | import android.widget.FrameLayout; |
| | | import android.widget.ImageView; |
| | | import android.widget.TextView; |
| | | |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.CouponInfo; |
| | | import com.tejia.lijin.app.entity.goods.GoodsDetailVO; |
| | | import com.tejia.lijin.app.entity.recommendinfo.ConvertLinkInfo; |
| | | import com.tejia.lijin.app.entity.user.VIPUpgradedNotify; |
| | | import com.tejia.lijin.app.ui.goods.GoodsDetailHongBaoListAdapter; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | /** |
| | | * 转链 |
| | | * Created by weikou2015 on 2017/2/28. |
| | | */ |
| | | |
| | | public class GoodsDetailHongBaoAndCouponSelectDialog extends Dialog { |
| | | |
| | | public GoodsDetailHongBaoAndCouponSelectDialog(Context context) { |
| | | super(context); |
| | | this.setCancelable(false); |
| | | } |
| | | |
| | | public GoodsDetailHongBaoAndCouponSelectDialog(Context context, int theme) { |
| | | super(context, theme); |
| | | this.setCancelable(false); |
| | | } |
| | | |
| | | public static class Builder { |
| | | private List<GoodsDetailVO.GoodsHongBaoListVO> hongBaoList; |
| | | private List<CouponInfo> couponInfoList; |
| | | private Context context; |
| | | private OnItemClickListener itemClickListener; |
| | | |
| | | |
| | | public Builder setHongBaoList(List<GoodsDetailVO.GoodsHongBaoListVO> hongBaoList) { |
| | | this.hongBaoList = hongBaoList; |
| | | return this; |
| | | } |
| | | |
| | | public Builder setCouponList(List<CouponInfo> couponInfoList) { |
| | | this.couponInfoList = couponInfoList; |
| | | return this; |
| | | } |
| | | |
| | | public Builder setItemClickListener(OnItemClickListener itemClickListener) { |
| | | this.itemClickListener = itemClickListener; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public Builder(Context context) { |
| | | this.context = context; |
| | | } |
| | | |
| | | |
| | | public GoodsDetailHongBaoAndCouponSelectDialog create() { |
| | | LayoutInflater inflater = (LayoutInflater) context |
| | | .getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
| | | final GoodsDetailHongBaoAndCouponSelectDialog dialog = new GoodsDetailHongBaoAndCouponSelectDialog(context, R.style.Dialog1); |
| | | dialog.setCanceledOnTouchOutside(true); |
| | | View layout = inflater.inflate(R.layout.dialog_goods_detail_hongbao_and_coupon, null); |
| | | RecyclerView rv = layout.findViewById(R.id.rv_content); |
| | | TextView tv_title = layout.findViewById(R.id.tv_title); |
| | | TextView tv_cancel = layout.findViewById(R.id.tv_cancel); |
| | | |
| | | rv.setLayoutManager(new LinearLayoutManager(context)); |
| | | DividerItemDecoration decoration = new DividerItemDecoration(); |
| | | decoration.setSize(DimenUtils.dip2px(context, 4)); |
| | | rv.addItemDecoration(decoration); |
| | | |
| | | boolean hongBao = true; |
| | | if ((hongBaoList == null || hongBaoList.size() == 0) && couponInfoList != null && couponInfoList.size() > 0) { |
| | | hongBao = false; |
| | | hongBaoList = new ArrayList<>(); |
| | | for (CouponInfo couponInfo : couponInfoList) { |
| | | GoodsDetailVO.GoodsHongBaoListVO vo = new GoodsDetailVO.GoodsHongBaoListVO(); |
| | | vo.setSubMoney("¥" + couponInfo.getAmount()); |
| | | String info = ""; |
| | | if (StringUtils.isNullOrEmpty(couponInfo.getStartFee())) { |
| | | info = "(无门槛领取)"; |
| | | } else { |
| | | info = String.format("(满%s减%s)", couponInfo.getStartFee(), couponInfo.getAmount()); |
| | | } |
| | | vo.setSubMoneyDesc(info); |
| | | hongBaoList.add(vo); |
| | | } |
| | | } |
| | | |
| | | if (hongBao) { |
| | | tv_title.setTextColor(Color.parseColor("#FF2C4A")); |
| | | } else { |
| | | tv_title.setTextColor(Color.parseColor("#FF7800")); |
| | | } |
| | | |
| | | |
| | | rv.setAdapter(new GoodsDetailHongBaoListAdapter(context, hongBaoList, new GoodsDetailHongBaoListAdapter.ListClickListener() { |
| | | |
| | | @Override |
| | | public void onHongBaoClick(int p, GoodsDetailVO.GoodsHongBaoListVO info) { |
| | | itemClickListener.onClick(p); |
| | | } |
| | | |
| | | @Override |
| | | public void onCouponClick(int p) { |
| | | itemClickListener.onClick(p); |
| | | } |
| | | }, |
| | | true, hongBao)); |
| | | |
| | | |
| | | tv_cancel.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (dialog.isShowing()) |
| | | dialog.dismiss(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | dialog.addContentView(layout, new FrameLayout.LayoutParams( |
| | | FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT)); |
| | | |
| | | android.view.WindowManager.LayoutParams params = dialog.getWindow().getAttributes(); |
| | | params.width = android.view.WindowManager.LayoutParams.MATCH_PARENT; |
| | | params.height = WindowManager.LayoutParams.WRAP_CONTENT; |
| | | dialog.getWindow().setAttributes(params); |
| | | dialog.getWindow().setGravity(Gravity.BOTTOM); |
| | | dialog.setCanceledOnTouchOutside(false); |
| | | return dialog; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public static interface OnItemClickListener { |
| | | public void onClick(int p); |
| | | |
| | | } |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getGoodsList(); |
| | | } |
| | |
| | | if (last == total - 1 && mGoldTaskList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | mPresenter.getTaskList(goldtask_recycler.getContext(), mPresenter.getUid(goldtask_recycler.getContext()), page); |
| | | } |
| | |
| | | package com.tejia.lijin.app.ui.goods; |
| | | |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.graphics.Color; |
| | | import android.graphics.drawable.GradientDrawable; |
| | | import android.text.Spannable; |
| | |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.goods.GoodsDetailInfo; |
| | | import com.tejia.lijin.app.entity.goods.GoodsDetailVO; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | |
| | | private Context mContext; |
| | | private List<GoodsDetailVO.GoodsHongBaoListVO> mList; |
| | | private boolean simpleMode; |
| | | private boolean hongBao; |
| | | private ListClickListener listClickListener; |
| | | |
| | | public GoodsDetailHongBaoListAdapter(Context context, List<GoodsDetailVO.GoodsHongBaoListVO> list, boolean simpleMode) { |
| | | public GoodsDetailHongBaoListAdapter(Context context, List<GoodsDetailVO.GoodsHongBaoListVO> list, ListClickListener listClickListener, boolean simpleMode, boolean hongBao) { |
| | | this.mContext = context; |
| | | this.mList = list; |
| | | this.simpleMode = simpleMode; |
| | | this.hongBao = hongBao; |
| | | this.listClickListener = listClickListener; |
| | | } |
| | | |
| | | @NonNull |
| | |
| | | |
| | | @Override |
| | | public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { |
| | | GoodsDetailVO.GoodsHongBaoListVO hongBaoInfo = mList.get(position); |
| | | final int p = position; |
| | | final GoodsDetailVO.GoodsHongBaoListVO hongBaoInfo = mList.get(position); |
| | | final ViewHolder viewHolder = (ViewHolder) holder; |
| | | viewHolder.fl_more.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | |
| | | boolean fanli = hongBaoInfo.getType() == 4; |
| | | |
| | | //初始化View显示 |
| | | setShowMode(viewHolder, fanli, simpleMode); |
| | | //设置红包详情 |
| | | setHongBaoDetailInfo(viewHolder, hongBaoInfo); |
| | | setShowMode(viewHolder, fanli, simpleMode, hongBao); |
| | | if (hongBao) { |
| | | //设置红包详情 |
| | | setHongBaoDetailInfo(viewHolder, hongBaoInfo); |
| | | } else { |
| | | viewHolder.ll_hongbao_detail.setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | | //设置会员信息 |
| | | if (hongBaoInfo.getUserLevel() == null) { |
| | | if (hongBaoInfo.getUserLevel() == null || simpleMode) { |
| | | viewHolder.ll_level_info.setVisibility(View.GONE); |
| | | viewHolder.tv_level_desc.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); |
| | | } else { |
| | | viewHolder.ll_level_info.setVisibility(View.VISIBLE); |
| | | viewHolder.iv_level.setImageResource(R.drawable.icon_rank_2); |
| | | viewHolder.tv_level_desc.setText(hongBaoInfo.getUserLevel().getDesc()); |
| | | if (!StringUtils.isNullOrEmpty(hongBaoInfo.getUserLevel().getLink())) { |
| | | viewHolder.tv_level_desc.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.icon_goods_detail_hongbao_user_level_more, 0); |
| | | } else { |
| | | viewHolder.tv_level_desc.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | hbMoney.setSpan(new RelativeSizeSpan(1.5f), 1, (hongBaoInfo.getSubMoney().indexOf(".") > -1 ? hongBaoInfo.getSubMoney().indexOf(".") : hongBaoInfo.getSubMoney().length()), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | viewHolder.tv_sub_money.setText(hbMoney); |
| | | viewHolder.tv_sub_money.setCompoundDrawablePadding(DimenUtils.dip2px(mContext, 8)); |
| | | if (fanli) { |
| | | viewHolder.tv_sub_money.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_goods_detail_hongbao_fanli, 0, 0, 0); |
| | | if (hongBao) { |
| | | if (fanli) { |
| | | viewHolder.tv_sub_money.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_goods_detail_hongbao_fanli, 0, 0, 0); |
| | | } else { |
| | | viewHolder.tv_sub_money.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_goods_detail_hongbao_hb, 0, 0, 0); |
| | | } |
| | | viewHolder.tv_sub_money_desc.setTextSize(9); |
| | | SpannableString finalMoney = new SpannableString(hongBaoInfo.getFinalMoney()); |
| | | finalMoney.setSpan(new RelativeSizeSpan(1.77f), 1, (hongBaoInfo.getFinalMoney().indexOf(".") > -1 ? hongBaoInfo.getFinalMoney().indexOf(".") : hongBaoInfo.getFinalMoney().length()), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | viewHolder.tv_final_money.setText(finalMoney); |
| | | } else { |
| | | viewHolder.tv_sub_money.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_goods_detail_hongbao_hb, 0, 0, 0); |
| | | viewHolder.tv_sub_money.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_goods_detail_hongbao_coupon, 0, 0, 0); |
| | | viewHolder.tv_sub_money_desc.setTextSize(12); |
| | | viewHolder.tv_final_money.setText(""); |
| | | } |
| | | |
| | | SpannableString finalMoney = new SpannableString(hongBaoInfo.getFinalMoney()); |
| | | finalMoney.setSpan(new RelativeSizeSpan(1.77f), 1, (hongBaoInfo.getFinalMoney().indexOf(".") > -1 ? hongBaoInfo.getFinalMoney().indexOf(".") : hongBaoInfo.getFinalMoney().length()), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | viewHolder.tv_final_money.setText(finalMoney); |
| | | viewHolder.tv_sub_money_desc.setText(hongBaoInfo.getSubMoneyDesc() == null ? "" : hongBaoInfo.getSubMoneyDesc()); |
| | | |
| | | //简介 |
| | | if (StringUtils.isNullOrEmpty(hongBaoInfo.getDesc())) { |
| | |
| | | } |
| | | |
| | | |
| | | viewHolder.tv_level_desc.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (StringUtils.isNullOrEmpty(hongBaoInfo.getUserLevel().getLink())) { |
| | | return; |
| | | } |
| | | mContext.startActivity(new Intent(mContext, ShareBrowserActivity.class).putExtra("url", hongBaoInfo.getUserLevel().getLink())); |
| | | } |
| | | }); |
| | | |
| | | viewHolder.fl_main.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (hongBao) |
| | | listClickListener.onHongBaoClick(p, hongBaoInfo); |
| | | else { |
| | | listClickListener.onCouponClick(p); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | * @param fanli 是否返利 |
| | | * @param simple 是否为简单模式 |
| | | */ |
| | | private void setShowMode(ViewHolder viewHolder, boolean fanli, boolean simple) { |
| | | private void setShowMode(ViewHolder viewHolder, boolean fanli, boolean simple, boolean hongBao) { |
| | | |
| | | GradientDrawable moreBg = new GradientDrawable(); |
| | | moreBg.setCornerRadius(DimenUtils.dip2px(mContext, 5)); |
| | | if (fanli) { |
| | | viewHolder.fl_main.setBackgroundResource(R.drawable.shape_goods_detail_hongbao_bg); |
| | | viewHolder.ll_hongbao_detail.setBackgroundResource(R.drawable.ic_goods_detail_hongbao_detail_fanli); |
| | | moreBg.setColor(Color.parseColor("#35A30E")); |
| | | viewHolder.iv_more.setImageResource(R.drawable.icon_goods_detail_hongbao_fanli_more); |
| | | |
| | | |
| | | if (hongBao) { |
| | | if (fanli) { |
| | | viewHolder.fl_main.setBackgroundResource(R.drawable.shape_goods_detail_hongbao_bg); |
| | | viewHolder.ll_hongbao_detail.setBackgroundResource(R.drawable.ic_goods_detail_hongbao_detail_fanli); |
| | | moreBg.setColor(Color.parseColor("#35A30E")); |
| | | viewHolder.iv_more.setImageResource(R.drawable.icon_goods_detail_hongbao_fanli_more); |
| | | } else { |
| | | viewHolder.fl_main.setBackgroundResource(R.drawable.shape_goods_detail_hongbao_high_level_bg); |
| | | viewHolder.ll_hongbao_detail.setBackgroundResource(R.drawable.ic_goods_detail_hongbao_detail_hb); |
| | | moreBg.setColor(Color.parseColor("#EC1F3F")); |
| | | viewHolder.iv_more.setImageResource(R.drawable.icon_goods_detail_hongbao_hb_more); |
| | | } |
| | | } else { |
| | | viewHolder.fl_main.setBackgroundResource(R.drawable.shape_goods_detail_hongbao_high_level_bg); |
| | | viewHolder.ll_hongbao_detail.setBackgroundResource(R.drawable.ic_goods_detail_hongbao_detail_hb); |
| | | moreBg.setColor(Color.parseColor("#EC1F3F")); |
| | | viewHolder.iv_more.setImageResource(R.drawable.icon_goods_detail_hongbao_hb_more); |
| | | viewHolder.fl_main.setBackgroundResource(R.drawable.shape_goods_detail_coupon_bg); |
| | | } |
| | | |
| | | |
| | | viewHolder.fl_more.setBackground(moreBg); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public interface ListClickListener { |
| | | public void onHongBaoClick(int p, GoodsDetailVO.GoodsHongBaoListVO info); |
| | | |
| | | public void onCouponClick(int p); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import android.net.Uri; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.annotation.Nullable; |
| | | import androidx.annotation.RequiresApi; |
| | | |
| | | import android.util.Base64; |
| | | import android.util.Log; |
| | | import android.view.KeyEvent; |
| | |
| | | import com.alibaba.baichuan.android.trade.model.AlibcShowParams; |
| | | import com.alibaba.baichuan.trade.biz.AlibcConstants; |
| | | import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.JDLinkCutUtil; |
| | |
| | | |
| | | private boolean interceptGoodsDetail; |
| | | |
| | | private String originalUrl=""; |
| | | private String originalUrl = ""; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | |
| | | AndroidBug5497Workaround.assistActivity(this); |
| | | TopStatusSettings.setStatusViewAndDeepColor(this); |
| | | String url = getIntent().getStringExtra("url"); |
| | | originalUrl=url; |
| | | originalUrl = url; |
| | | //是否允许粘贴板推荐 |
| | | String clipboradStr = getIntent().getStringExtra("clipboard"); |
| | | interceptGoodsDetail = getIntent().getBooleanExtra("interceptGoodsDetail", true); |
| | |
| | | webSettings.setPluginState(WebSettings.PluginState.ON); |
| | | webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);//设置缓存模式(根据cache-control决定是否从网络上取数据。) |
| | | //团油特殊设置 |
| | | if(originalUrl!=null&&originalUrl.contains(".czb365.com")) { |
| | | if (originalUrl != null && originalUrl.contains(".czb365.com")) { |
| | | webSettings.setUserAgentString("BLKS+Android"); |
| | | } |
| | | webview.setDrawingCacheEnabled(true); |
| | |
| | | @Override |
| | | public boolean shouldOverrideUrlLoading(WebView view, String url) { |
| | | // Log.e("mResult", "shouldOverrideUrlLoading----" + url); |
| | | if (goodsDetail&&interceptGoodsDetail) { |
| | | if (goodsDetail && interceptGoodsDetail) { |
| | | String taoBaoId = TaobaoLinkCutUtil.linkCutId(url); |
| | | String JDId = null; |
| | | String PDDId = null; |
| | |
| | | return true; |
| | | } |
| | | } |
| | | if (url != null && url.startsWith("yestv://copy")) { |
| | | if (url != null && url.startsWith("yestv://copy")) { |
| | | String murl = url.split("yestv://")[1]; |
| | | String[] params = murl.split("#"); |
| | | byte raw[] = Base64.decode(params[1], Base64.DEFAULT); |
| | |
| | | |
| | | @Override |
| | | public boolean onConsoleMessage(ConsoleMessage consoleMessage) { |
| | | Log.i("ShareBrowserActivity",consoleMessage.message() +" "+consoleMessage.lineNumber()); |
| | | Log.i("ShareBrowserActivity", consoleMessage.message() + " " + consoleMessage.lineNumber()); |
| | | return super.onConsoleMessage(consoleMessage); |
| | | } |
| | | |
| | |
| | | boolean extend = jsonObject.optJSONObject("data").optBoolean("extend"); |
| | | // Log.e("mResult", "extend:" + extend); |
| | | if (extend) {//有推广 |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(getApplicationContext(), goodsType); |
| | | |
| | | Intent intent = new Intent(getApplicationContext(), GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", goodsId); |
| | | intent.putExtra("goodsType", goodsType); |
| | | |
| | | intent.putExtra("id", goodsId); |
| | | intent.putExtra("from", "baichuanweb"); |
| | | startActivity(intent); |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | mPresenter.getGoodsInfo(page + "", mBundle.getString("id"), bottom, tv_loading, "正在加载更多数据"); |
| | | mPresenter.getGoodsInfo(page + "", mBundle.getString("id"), bottom, tv_loading, getResources().getString(R.string.loading_more_text)); |
| | | } |
| | | } else { |
| | | iv_slid_top.setVisibility(View.GONE); |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getContentList(); |
| | | } |
| | | } |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getTrendsList(); |
| | | } |
| | | } |
| | |
| | | import com.nostra13.universalimageloader.core.display.CircleBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.message.UserMessageActivity; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.viewpagerindicator.CirclePageIndicator; |
| | |
| | | import com.tejia.lijin.app.ui.mine.SettingActivity; |
| | | import com.tejia.lijin.app.ui.mine.ShareHistoryActivity31; |
| | | import com.tejia.lijin.app.ui.mine.WelfareCenterActivity; |
| | | 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.ui.recommend.RecommendTopAdapter2; |
| | | import com.tejia.lijin.app.updateApp.UpdateApp; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | String inviteCode = data.optString("invitCode"); |
| | | UserUtil.setInviteCode(getContext(), inviteCode); |
| | | UserUtil.setInviteCode(getContext(), inviteCode); |
| | | vipLink = data.optString("vipLink"); |
| | | moduleState = data.optJSONObject("moduleState"); |
| | | if (mineFunctionsManager != null) |
| | |
| | | String content = data.getStringExtra(Constant.CODED_CONTENT); |
| | | if (content.contains("taobao://")) { |
| | | // Intent intent = new Intent(tv_user_num.getContext(), GoodsDetailBrowerActivity.class); |
| | | Intent intent = new Intent(tv_nickName.getContext(), GoodsDetailActivityTB.class); |
| | | Intent intent = new Intent(tv_nickName.getContext(), GoodsDetailActivity.class); |
| | | String id = content.substring(content.indexOf("//") + 2); |
| | | intent.putExtra("id", id); |
| | | intent.putExtra("from", "scan"); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", com.tejia.lijin.app.util.Constant.GOODS_TYPE_TB); |
| | | startActivity(intent); |
| | | } else if (content.contains("jd://")) { |
| | | // Intent intent = new Intent(tv_user_num.getContext(), GoodsDetailBrowerActivity.class); |
| | | Intent intent = new Intent(tv_nickName.getContext(), GoodsDetailActivityJD.class); |
| | | Intent intent = new Intent(tv_nickName.getContext(), GoodsDetailActivity.class); |
| | | String id = content.substring(content.indexOf("//") + 2); |
| | | intent.putExtra("id", id); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", com.tejia.lijin.app.util.Constant.GOODS_TYPE_JD); |
| | | intent.putExtra("from", "scan"); |
| | | startActivity(intent); |
| | | } else if (content.contains("pdd://")) { |
| | | // Intent intent = new Intent(tv_user_num.getContext(), GoodsDetailBrowerActivity.class); |
| | | Intent intent = new Intent(tv_nickName.getContext(), GoodsDetailActivityPDD.class); |
| | | Intent intent = new Intent(tv_nickName.getContext(), GoodsDetailActivity.class); |
| | | String id = content.substring(content.indexOf("//") + 2); |
| | | intent.putExtra("id", id); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", com.tejia.lijin.app.util.Constant.GOODS_TYPE_PDD); |
| | | intent.putExtra("from", "scan"); |
| | | startActivity(intent); |
| | | } else { |
| | |
| | | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | |
| | | viewHolder.ll_item.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoodsType()); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("url", info.getGoodsId()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | intent.putExtra("from", "collection"); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | import com.bumptech.glide.load.engine.DiskCacheStrategy; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.RedpacketRecord; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | | import com.tejia.lijin.app.util.ImageUtil; |
| | | |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent; |
| | | intent = new Intent(mContext, GoodsDetailActivityTB.class); |
| | | intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("title", data.getTitle()); |
| | | intent.putExtra("id", data.getAuctionId() + ""); |
| | | intent.putExtra("goodsId", data.getAuctionId() + ""); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | intent.putExtra("from", "创建记录"); |
| | | mContext.startActivity(intent); |
| | | // intent.putExtra("url", info.getAuctionUrl()); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | import com.tejia.lijin.app.entity.TicketState; |
| | | import com.tejia.lijin.app.ui.BaseActivity; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.tejia.lijin.app.util.KeFuUtil; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | |
| | | String orderNo = getIntent().getStringExtra("orderNo"); |
| | | String goodsType = getIntent().getStringExtra("goodsType"); |
| | | // String orderNo = "3500537602463267337"; |
| | | ShoppingApi.getFreeSingleTicketRate(FreeSingleTicketStateActivity.this, orderNo,goodsType, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getFreeSingleTicketRate(FreeSingleTicketStateActivity.this, orderNo, goodsType, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = new Intent(FreeSingleTicketStateActivity.this, GoodsDetailActivityTB.class); |
| | | Intent intent = new Intent(FreeSingleTicketStateActivity.this, GoodsDetailActivity.class); |
| | | intent.putExtra("title", oInfo.getTitle()); |
| | | intent.putExtra("id", oInfo.getGoodsId()); |
| | | intent.putExtra("goodsId", oInfo.getGoodsId()); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | startActivity(intent); |
| | | } |
| | | }); |
| | |
| | | tv_copy.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | ClipboardUtil.copy(getApplicationContext(),orderNo); |
| | | ClipboardUtil.copy(getApplicationContext(), orderNo); |
| | | Toast.makeText(FreeSingleTicketStateActivity.this, "复制订单成功", |
| | | Toast.LENGTH_SHORT).show(); |
| | | } |
| | |
| | | break; |
| | | case R.id.iv_top_bar_right: |
| | | // startActivity(new Intent(FreeSingleTicketStateActivity.this, ContactUsActivity.class)); |
| | | KeFuUtil.jumpKeFu(this, "免单状态及奖励金状态"); |
| | | KeFuUtil.jumpKeFu(this, "免单状态及奖励金状态"); |
| | | break; |
| | | case R.id.ll_ticket_rule: { |
| | | Intent intent = new Intent(FreeSingleTicketStateActivity.this, ShareBrowserActivity.class); |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | viewHolder.ll_item.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoodsType()); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | intent.putExtra("from", "scanhistory"); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getMyPlayer(); |
| | | } |
| | | } |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getMyPlayer(); |
| | | } |
| | | } |
| | |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.SystemCommon; |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | UserCustomEvent.userOrderGoodsdetail(mContext); |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(mContext, oInfo.getGoodsType()); |
| | | if (intent == null) |
| | | return; |
| | | |
| | | if (StringUtils.isEmpty(oInfo.getGoodsId())||"0".equalsIgnoreCase(oInfo.getGoodsId())) { |
| | | return; |
| | | } |
| | | |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", oInfo.getGoodsId()); |
| | | intent.putExtra("goodsType", oInfo.getGoodsType()); |
| | | |
| | | intent.putExtra("title", oInfo.getTitle()); |
| | | intent.putExtra("id", oInfo.getGoodsId()); |
| | | intent.putExtra("from", "order"); |
| | |
| | | if (last == total - 1 && mList.size() < count) { |
| | | page++; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getLostOrderList(); |
| | | } |
| | | } |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getOrderList(); |
| | | } |
| | | } |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getTeamList(); |
| | | } |
| | | } |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(getApplicationContext(),oInfo.getGoodsType()); |
| | | Intent intent= new Intent(getApplicationContext(), GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", oInfo.getGoodsId()); |
| | | intent.putExtra("goodsType", oInfo.getGoodsType()); |
| | | intent.putExtra("title", oInfo.getTitle()); |
| | | intent.putExtra("id", oInfo.getGoodsId()); |
| | | startActivity(intent); |
| | | } |
| | | }); |
| | |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.SystemCommon; |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | UserCustomEvent.userOrderGoodsdetail(mContext); |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,oInfo.getGoodsType()); |
| | | |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", oInfo.getGoodsId()); |
| | | intent.putExtra("goodsType", oInfo.getGoodsType()); |
| | | |
| | | intent.putExtra("title", oInfo.getTitle()); |
| | | intent.putExtra("id", oInfo.getGoodsId()); |
| | | intent.putExtra("from", "order"); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText( getResources().getString(R.string.loading_more_text)); |
| | | getOrderList(); |
| | | } |
| | | } |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.SelectionStoreHouse; |
| | |
| | | viewHolder.ll_item.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoodsType()); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | |
| | | mContext.startActivity(intent); |
| | | } |
| | | }); |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.entity.ShareRecordGoods; |
| | |
| | | GoodsDetailListUtil.setGoodsDetail(mContext, info.getGoods(), viewHolder.goodsDetail); |
| | | |
| | | |
| | | |
| | | viewHolder.tv_buy_or_coupon.setText("分享数据"); |
| | | viewHolder.tv_collect_time.setVisibility(View.GONE); |
| | | |
| | |
| | | viewHolder.ll_item.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoods().getGoodsType()); |
| | | |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoods().getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoods().getGoodsType()); |
| | | intent.putExtra("title", info.getGoods().getTitle()); |
| | | intent.putExtra("id", info.getGoods().getGoodsId()); |
| | | mContext.startActivity(intent); |
| | | } |
| | | }); |
| | |
| | | |
| | | public MyHolder(View convertView) { |
| | | super(convertView); |
| | | goodsDetail=new GoodsRightViewHolder(convertView); |
| | | goodsDetail = new GoodsRightViewHolder(convertView); |
| | | ll_item = convertView.findViewById(R.id.ll_item); |
| | | iv_pic = convertView |
| | | .findViewById(R.id.iv_movie_cover); |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | mPresenter.getGoodsInfo(page + "", mBundle.getString("id"), bottom, tv_loading, "正在加载更多数据"); |
| | | mPresenter.getGoodsInfo(page + "", mBundle.getString("id"), bottom, tv_loading, getResources().getString(R.string.loading_more_text)); |
| | | } |
| | | } else { |
| | | iv_slid_top.setVisibility(View.GONE); |
| | |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wpc.library.DeviceUuidFactory; |
| | | import com.wpc.library.util.GetManifestDataUtil; |
| | |
| | | |
| | | @JavascriptInterface |
| | | public void jumpGoodsSplash(long id) { |
| | | Intent intent = new Intent(ChoicenessFreightFreeActivity.this, GoodsDetailActivityTB.class); |
| | | intent.putExtra("id", id + ""); |
| | | Intent intent = new Intent(ChoicenessFreightFreeActivity.this, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", id + ""); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | startActivity(intent); |
| | | } |
| | | |
| | |
| | | intent = new Intent(mContext, ShareExplosionsGoodsDetailActivity.class); |
| | | intent.putExtra("from", "taolijin_buy"); |
| | | } else { |
| | | intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoodsType()); |
| | | intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("from", mFrom); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | } |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.entity.CouponUser; |
| | | import com.tejia.lijin.app.entity.GoodsDetail; |
| | | import com.tejia.lijin.app.entity.PushEventData; |
| | | import com.tejia.lijin.app.entity.TaoBaoGoodsBrief; |
| | | import com.tejia.lijin.app.entity.common.ImageShowEntity; |
| | | import com.tejia.lijin.app.entity.goods.GoodsDetailVO; |
| | | import com.tejia.lijin.app.ui.BaseActivity; |
| | | import com.tejia.lijin.app.ui.dialog.GoodsDetailHongBaoAndCouponSelectDialog; |
| | | import com.tejia.lijin.app.ui.dialog.JumpTaoBaoDialog; |
| | | import com.tejia.lijin.app.ui.goods.GoodsDetailHongBaoListAdapter; |
| | | import com.tejia.lijin.app.ui.goods.GoodsDetailPreEventManager; |
| | |
| | | import com.tejia.lijin.app.ui.mine.LoginSelectActivity; |
| | | import com.tejia.lijin.app.ui.mine.MyFootmarkActivity; |
| | | import com.tejia.lijin.app.ui.trends.BigImageActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.FlowLayout; |
| | | import com.tejia.lijin.app.util.GlideCircleTransform; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | |
| | | import com.tejia.lijin.app.util.Toast_Dialog; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.ui.GoodsDetailUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.GoodsCustomEvent; |
| | | import com.tejia.lijin.app.util.user.LoginAndInviteStatusUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | |
| | | |
| | | public class GoodsDetailActivity extends BaseActivity implements View.OnClickListener { |
| | | |
| | | private static final String TAG = "GoodsDetailActivity"; |
| | | /**************************控件定义开始**************************/ |
| | | private MyScrollView lv_goods_pic; |
| | | private MyScrollView sv_goods; |
| | | |
| | | private LinearLayout ll_content; |
| | | |
| | |
| | | |
| | | //商品店铺信息 |
| | | private LinearLayout ll_shop; |
| | | private ImageView iv_shop_img, iv_shop_type; |
| | | private ImageView iv_shop_img; |
| | | private TextView tv_shop_type; |
| | | private TextView tv_shop_name; |
| | | private TextView tv_shop_des, tv_shop_service, tv_shop_logistics, tv_shop_des_grade, tv_shop_logistics_grade, |
| | | tv_shop_service_grade; |
| | |
| | | private RecyclerView rv_price_info; |
| | | |
| | | //图文详情 |
| | | private FrameLayout fl_goods_detail; |
| | | private ImageView iv_imgtext_status; |
| | | private WebView webView; |
| | | private LinearLayout ll_loading; |
| | |
| | | |
| | | private void initView() { |
| | | ll_content = findViewById(R.id.ll_content); |
| | | lv_goods_pic = findViewById(R.id.lv_goods_pic); |
| | | sv_goods = findViewById(R.id.lv_goods_pic); |
| | | tv_top_title1 = findViewById(R.id.tv_top_title1); |
| | | tv_top_title2 = findViewById(R.id.tv_top_title2); |
| | | tv_top_title3 = findViewById(R.id.tv_top_title3); |
| | |
| | | tv_buy = findViewById(R.id.tv_buy); |
| | | ll_top_title = findViewById(R.id.ll_top_title); |
| | | iv_shop_img = findViewById(R.id.iv_shop_img); |
| | | iv_shop_type = findViewById(R.id.iv_shop_type); |
| | | tv_shop_type = findViewById(R.id.tv_shop_type); |
| | | tv_shop_name = findViewById(R.id.tv_shop_name); |
| | | tv_shop_des = findViewById(R.id.tv_shop_des); |
| | | tv_shop_service = findViewById(R.id.tv_shop_service); |
| | |
| | | v_3 = findViewById(R.id.v_3); |
| | | v_4 = findViewById(R.id.v_4); |
| | | |
| | | fl_face = findViewById(R.id.fl_face); |
| | | |
| | | |
| | | avLoadingIndicatorView = findViewById(R.id.avi); |
| | | ll_guess_like = findViewById(R.id.ll_guess_like); |
| | | iv_imgtext_status = findViewById(R.id.iv_imgtext_status); |
| | | fl_goods_detail = findViewById(R.id.fl_goods_detail); |
| | | ll_loading = findViewById(R.id.ll_loading); |
| | | tv_loading = findViewById(R.id.tv_loading); |
| | | iv_loading = findViewById(R.id.iv_loading); |
| | |
| | | //umeng统计 |
| | | GoodsCustomEvent.goodsDetail(this, from); |
| | | inputTime = System.currentTimeMillis(); |
| | | final String goodsId = getIntent().getExtras().getString("goodsId"); |
| | | final int goodsType = Integer.parseInt(getIntent().getExtras().getString("goodsType")); |
| | | |
| | | String tempGoodsType = ""; |
| | | String tempGoodsId = ""; |
| | | |
| | | |
| | | //获取商品ID |
| | | tempGoodsId = getIntent().getExtras().getString("goodsId"); |
| | | if (StringUtils.isNullOrEmpty(tempGoodsId)) |
| | | tempGoodsId = getIntent().getExtras().getString("id"); |
| | | final String goodsId = tempGoodsId; |
| | | |
| | | |
| | | //获取商品类型 |
| | | tempGoodsType = getIntent().getExtras().getString("goodsType"); |
| | | if (StringUtils.isNullOrEmpty(tempGoodsType)) |
| | | tempGoodsType = getIntent().getExtras().getInt("goodsType", 0) + ""; |
| | | if (tempGoodsType.equalsIgnoreCase("0")) |
| | | tempGoodsType = Constant.GOODS_TYPE_TB + ""; |
| | | |
| | | |
| | | final int goodsType = Integer.parseInt(tempGoodsType); |
| | | |
| | | |
| | | from = getIntent().getExtras().getString("from"); |
| | | |
| | | tv_loading.setText("宝贝详情页加载中..."); |
| | |
| | | avLoadingIndicatorView.setVisibility(View.VISIBLE); |
| | | Animation ani = AnimationUtils.loadAnimation(this, R.anim.touming); //申明一个动画 |
| | | avLoadingIndicatorView.setAnimation(ani);//为图片绑定动画 |
| | | findViewById(R.id.fl_face).setVisibility(View.VISIBLE); |
| | | ll_content.setVisibility(View.GONE); |
| | | fl_face.setVisibility(View.VISIBLE); |
| | | bannerAdapter = new ImageAdapter(mBanners, this); |
| | | vp_goods_detail.setAdapter(bannerAdapter); |
| | | vp_goods_detail.setCurrentItem(0, true); |
| | |
| | | } |
| | | }); |
| | | |
| | | lv_goods_pic.setOnScrollListener(new MyScrollView.OnScrollListener() { |
| | | sv_goods.setOnScrollListener(new MyScrollView.OnScrollListener() { |
| | | @Override |
| | | public void onScroll(int scrollY) { |
| | | int titleHeight = DimenUtils.dip2px(GoodsDetailActivity.this, 48); |
| | | int marginTopHeight = DimenUtils.dip2px(GoodsDetailActivity.this, 8); |
| | | if (scrollY < (vp_goods_detail.getHeight() - titleHeight * 2)) {//头部 |
| | | if (scrollY < fl_goods_detail.getTop()) {//头部 |
| | | setPosition(1); |
| | | } else if (scrollY >= vp_goods_detail.getHeight() - titleHeight * 2 |
| | | && scrollY < (vp_goods_detail.getHeight() + webView.getHeight() - titleHeight) |
| | | && webView.getVisibility() != View.GONE) {//详情图片 |
| | | } else if (scrollY >= (fl_goods_detail.getTop() - titleHeight) |
| | | && scrollY < ll_guess_like.getTop()) {//详情图片 |
| | | setPosition(2); |
| | | } else if (scrollY >= (vp_goods_detail.getHeight() |
| | | + webView.getHeight() - titleHeight + marginTopHeight) && scrollY < (vp_goods_detail.getHeight() |
| | | + webView.getHeight() + ll_guess_like.getHeight() - titleHeight + marginTopHeight) |
| | | && webView.getVisibility() != View.GONE) {//猜你喜欢 |
| | | setPosition(3); |
| | | } else if (scrollY >= (vp_goods_detail.getHeight() + webView.getHeight() |
| | | + ll_guess_like.getHeight() - titleHeight + marginTopHeight)) {//推荐 |
| | | } else if (scrollY >= ll_guess_like.getTop() - titleHeight) {//猜你喜欢 |
| | | setPosition(4); |
| | | } else { |
| | | setPosition(4); |
| | |
| | | from = ""; |
| | | initView(); |
| | | initData(); |
| | | // getAppPageNotification(); |
| | | getAppPageNotification(); |
| | | } |
| | | |
| | | |
| | |
| | | inAnima.setInterpolator(new DecelerateInterpolator()); |
| | | ll_notification.setAnimation(inAnima); |
| | | ll_notification.startAnimation(inAnima); |
| | | // inAnima.start(); |
| | | inAnima.start(); |
| | | } else if (msg.what == 3) {//关闭弹窗 |
| | | if (dialog != null && dialog.isShowing()) |
| | | dialog.dismiss(); |
| | |
| | | |
| | | tv_name.setText(mInfo.getGoods().getTitle()); |
| | | webView.loadUrl(mInfo.getExtra().getDetailUrl()); |
| | | |
| | | tv_sales_num.setText("月销 " + mInfo.getGoods().getSalesCount()); |
| | | tv_sales_num.setText(GoodsDetailUtil.getSalesTypeDesc(mInfo.getGoods().getSalesType()) + " " + mInfo.getGoods().getSalesCount()); |
| | | |
| | | if (mInfo.getGoods().getShopInfo() != null) { |
| | | ll_shop.setVisibility(View.VISIBLE); |
| | |
| | | tv_shop_name.setText(mInfo.getGoods().getShopInfo().getShopName()); |
| | | |
| | | try { |
| | | GoodsDetailUtil.fillShopType(tv_shop_type, mInfo.getGoods().getShopInfo().getUserType()); |
| | | |
| | | iv_shop_type.setImageDrawable(mInfo.getGoods().getShopInfo().getUserType() == 0 ? |
| | | getResources().getDrawable(R.drawable.ic_shop_type_taobao) : |
| | | getResources().getDrawable(R.drawable.ic_shop_type_tmall)); |
| | | tv_shop_des.setText("宝贝描述: " + mInfo.getGoods().getShopInfo().getScoreGoods()); |
| | | tv_shop_service.setText("卖家服务: " + mInfo.getGoods().getShopInfo().getScoreSeller()); |
| | | tv_shop_logistics.setText("物流服务: " + mInfo.getGoods().getShopInfo().getScoreLogistics()); |
| | | tv_shop_des_grade.setText(mInfo.getGoods().getShopInfo().getScoreGoodsD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreGoodsD() == 1 ? "高" : "低"); |
| | | tv_shop_service_grade.setText(mInfo.getGoods().getShopInfo().getScoreSellerD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreSellerD() == 1 ? "高" : "低"); |
| | | tv_shop_logistics_grade.setText(mInfo.getGoods().getShopInfo().getScoreLogisticsD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreLogisticsD() == 1 ? "高" : "低"); |
| | | if (!StringUtils.isNullOrEmpty(mInfo.getGoods().getShopInfo().getScoreGoods())) { |
| | | tv_shop_des.setText("宝贝描述: " + mInfo.getGoods().getShopInfo().getScoreGoods()); |
| | | tv_shop_service.setText("卖家服务: " + mInfo.getGoods().getShopInfo().getScoreSeller()); |
| | | tv_shop_logistics.setText("物流服务: " + mInfo.getGoods().getShopInfo().getScoreLogistics()); |
| | | tv_shop_des_grade.setText(mInfo.getGoods().getShopInfo().getScoreGoodsD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreGoodsD() == 1 ? "高" : "低"); |
| | | tv_shop_service_grade.setText(mInfo.getGoods().getShopInfo().getScoreSellerD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreSellerD() == 1 ? "高" : "低"); |
| | | tv_shop_logistics_grade.setText(mInfo.getGoods().getShopInfo().getScoreLogisticsD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreLogisticsD() == 1 ? "高" : "低"); |
| | | } else { |
| | | tv_shop_des.setVisibility(View.INVISIBLE); |
| | | tv_shop_service.setVisibility(View.INVISIBLE); |
| | | tv_shop_logistics.setVisibility(View.INVISIBLE); |
| | | tv_shop_des_grade.setVisibility(View.INVISIBLE); |
| | | tv_shop_service_grade.setVisibility(View.INVISIBLE); |
| | | tv_shop_logistics_grade.setVisibility(View.INVISIBLE); |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | |
| | | vp_goods_detail.setCurrentItem(0); |
| | | initFanliAndBuyBtn(mInfo.getExtra().isBuyValid(), mInfo.getExtra().isFanliValid()); |
| | | requestState(0); |
| | | sv_goods.scrollTo(0, 0); |
| | | // ll_content.setVisibility(View.VISIBLE); |
| | | // fl_face.setVisibility(View.GONE); |
| | | } else if (jsonObject.optString("code").equalsIgnoreCase("2")) { |
| | | ll_content.setVisibility(View.GONE); |
| | | findViewById(R.id.ll_goods_nothing).setVisibility(View.VISIBLE); |
| | | findViewById(R.id.fl_face).setVisibility(View.VISIBLE); |
| | | fl_face.setVisibility(View.VISIBLE); |
| | | } |
| | | } |
| | | |
| | |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | Log.e("mResult", "goodsdetail---onFinish()"); |
| | | lv_goods_pic.scrollTo(0, 0); |
| | | sv_goods.scrollTo(0, 0); |
| | | avLoadingIndicatorView.hide(); |
| | | findViewById(R.id.fl_face).setVisibility(View.GONE); |
| | | ll_content.setVisibility(View.VISIBLE); |
| | | } |
| | | }); |
| | | } |
| | |
| | | finish(); |
| | | break; |
| | | case R.id.tv_top_title1: |
| | | lv_goods_pic.scrollTo(0, 0); |
| | | sv_goods.scrollTo(0, 0); |
| | | setPosition(1); |
| | | break; |
| | | case R.id.tv_top_title2: |
| | | lv_goods_pic.scrollTo(0, vp_goods_detail.getHeight() - titleHeight * 2); |
| | | case R.id.tv_top_title2://详情 |
| | | sv_goods.scrollTo(0, fl_goods_detail.getTop()); |
| | | setPosition(2); |
| | | break; |
| | | case R.id.tv_top_title3: |
| | | lv_goods_pic.scrollTo(0, vp_goods_detail.getHeight() + webView.getHeight() - titleHeight + marginTopHeight); |
| | | case R.id.tv_top_title3://猜你喜欢 |
| | | sv_goods.scrollTo(0, (int) ll_guess_like.getTop()); |
| | | setPosition(3); |
| | | break; |
| | | case R.id.tv_top_title4: |
| | | lv_goods_pic.scrollTo(0, vp_goods_detail.getHeight() + webView.getHeight() + ll_guess_like.getHeight() - titleHeight + marginTopHeight); |
| | | case R.id.tv_top_title4://推荐 |
| | | Log.i(TAG, (int) ll_guess_like.getTop() + ""); |
| | | sv_goods.scrollTo(0, (int) ll_guess_like.getTop()); |
| | | setPosition(4); |
| | | break; |
| | | |
| | |
| | | |
| | | |
| | | private void goFanli() { |
| | | goodsDetailPreEventManager.startClick(0, new GoodsDetailPreEventManager.IPreEventListener() { |
| | | new GoodsDetailHongBaoAndCouponSelectDialog.Builder(this).setCouponList(mInfo.getGoods().getCouponInfoList()).setItemClickListener(new GoodsDetailHongBaoAndCouponSelectDialog.OnItemClickListener() { |
| | | @Override |
| | | public void onPreSuccess() { |
| | | public void onClick(int p) { |
| | | goodsDetailPreEventManager.startClick(0, new GoodsDetailPreEventManager.IPreEventListener() { |
| | | @Override |
| | | public void onPreSuccess() { |
| | | |
| | | //TODO 返利 |
| | | //TODO 返利 |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }).create().show(); |
| | | //判断是否有多张券情况 |
| | | } |
| | | |
| | | private void goBuy() { |
| | | goodsDetailPreEventManager.startClick(1, new GoodsDetailPreEventManager.IPreEventListener() { |
| | | |
| | | @Override |
| | | public void onPreSuccess() { |
| | | //TODO 购买 |
| | | List<GoodsDetailVO.GoodsHongBaoListVO> hongBaoList = new ArrayList<>(); |
| | | hongBaoList.addAll(mInfo.getGoods().getPriceList()); |
| | | for (int i = 0; i < hongBaoList.size(); i++) { |
| | | if (hongBaoList.get(i).getType() != 2) { |
| | | hongBaoList.remove(i--); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | new GoodsDetailHongBaoAndCouponSelectDialog.Builder(this).setHongBaoList(hongBaoList).setItemClickListener(new GoodsDetailHongBaoAndCouponSelectDialog.OnItemClickListener() { |
| | | @Override |
| | | public void onClick(int p) { |
| | | goodsDetailPreEventManager.startClick(1, new GoodsDetailPreEventManager.IPreEventListener() { |
| | | @Override |
| | | public void onPreSuccess() { |
| | | //TODO 购买 |
| | | } |
| | | }); |
| | | } |
| | | }).create().show(); |
| | | |
| | | } |
| | | |
| | | |
| | | private void setRightsData(List<GoodsDetailVO.GoodsRightsVO> rightsList) { |
| | | if (rightsList == null || rightsList.size() == 0) { |
| | | ll_rights_type.setVisibility(View.GONE); |
| | | return; |
| | | } else { |
| | | ll_rights_type.setVisibility(View.VISIBLE); |
| | | } |
| | |
| | | } |
| | | |
| | | rv_price_info.setLayoutManager(new LinearLayoutManager(rv_price_info.getContext())); |
| | | rv_price_info.setNestedScrollingEnabled(false); |
| | | DividerItemDecoration decoration = new DividerItemDecoration(); |
| | | decoration.setSize(DimenUtils.dip2px(getApplicationContext(), 5)); |
| | | rv_price_info.addItemDecoration(decoration); |
| | | rv_price_info.setAdapter(new GoodsDetailHongBaoListAdapter(getApplicationContext(), goodsInfoVO.getPriceList(), false)); |
| | | rv_price_info.setAdapter(new GoodsDetailHongBaoListAdapter(getApplicationContext(), goodsInfoVO.getPriceList(), new GoodsDetailHongBaoListAdapter.ListClickListener() { |
| | | |
| | | @Override |
| | | public void onHongBaoClick(int p, GoodsDetailVO.GoodsHongBaoListVO info) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onCouponClick(int p) { |
| | | |
| | | } |
| | | }, |
| | | false, true)); |
| | | |
| | | tv_fanli_money_num.setText(goodsInfoVO.getMoneyInfo().getFanliMoney()); |
| | | tv_buy.setText(goodsInfoVO.getMoneyInfo().getHongBaoMoney()); |
| | |
| | | public void onClick(View v) { |
| | | if (!StringUtils.isEmpty(type)) |
| | | CategoryCustomEvent.classGoods(mContext, type); |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(mContext, info.getGoodsType()); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | intent.putExtra("from", from); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getGoodsList(); |
| | | } |
| | |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.FrameLayout; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.TextView; |
| | |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.MainCustomEvent; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | |
| | | import java.util.List; |
| | |
| | | * 推荐圆形专题 |
| | | */ |
| | | public class RecommendCircleSpecialAdapter extends RecyclerView.Adapter { |
| | | |
| | | public final static int SPCAE_DP = 14; |
| | | |
| | | private Activity mContext; |
| | | private List<SpecialOffer2> mList; |
| | |
| | | holder.iv_tag.setVisibility(View.GONE); |
| | | } |
| | | |
| | | int itemWidth = (int) (SystemCommon.getScreenWidth(mContext) / 5); |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
| | | int itemWidth = (int) ((SystemCommon.getScreenWidth(mContext) - DimenUtils.dip2px(mContext, 10) * 2 - DimenUtils.dip2px(mContext, SPCAE_DP) * 3) / 4); |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(itemWidth, |
| | | ViewGroup.LayoutParams.WRAP_CONTENT); |
| | | holder.view.setLayoutParams(params); |
| | | |
| | | |
| | | if (!StringUtils.isNullOrEmpty(info.getBgColor())) { |
| | | holder.view.setBackground(HomeUIUtil.getCircleSpecialBg(mContext, info.getBgColor())); |
| | | holder.fl_content.setBackground(HomeUIUtil.getCircleSpecialBg(mContext, info.getBgColor())); |
| | | } |
| | | |
| | | holder.view.setOnClickListener(new View.OnClickListener() { |
| | |
| | | |
| | | class Holder extends RecyclerView.ViewHolder { |
| | | |
| | | FrameLayout fl_content; |
| | | TextView tv_name; |
| | | ImageView iv_icon; |
| | | ImageView iv_tag; |
| | |
| | | public Holder(View itemView) { |
| | | super(itemView); |
| | | view = itemView; |
| | | fl_content=itemView.findViewById(R.id.fl_content); |
| | | tv_name = itemView.findViewById(R.id.tv_name); |
| | | iv_icon = itemView.findViewById(R.id.iv_icon); |
| | | iv_tag = itemView.findViewById(R.id.iv_tag); |
| | |
| | | */ |
| | | |
| | | public class RecommendFragment extends RetainViewFragment implements View.OnClickListener { |
| | | private static final String TAG = "RecommendFragment"; |
| | | private LinearLayout ll_fragment_activity, ll_special_offer, ll_limit_time_buy, ll_jinbi_exchange_buy; |
| | | private MyGridView gv_limit_time_goods, gv_jinbi_exchange_goods; |
| | | private SwipeRefreshLayout rl_first_page; |
| | |
| | | super.getItemOffsets(outRect, view, parent, state); |
| | | int index = parent.getChildAdapterPosition(view); |
| | | int total = parent.getAdapter().getItemCount(); |
| | | int minWidth = DimenUtils.dipToPixels(6, view.getContext()); |
| | | if (index % 4 == 0) { |
| | | outRect.left = 0; //第一列左边贴边 |
| | | outRect.right = minWidth * 3; |
| | | } else if (index % 4 == 1) { |
| | | outRect.left = minWidth * 1; |
| | | outRect.right = minWidth * 2; |
| | | } else if (index % 4 == 2) { |
| | | outRect.left = minWidth * 2; |
| | | outRect.right = minWidth * 1; |
| | | int space = RecommendCircleSpecialAdapter.SPCAE_DP; |
| | | |
| | | if (index % 2 == 0) { |
| | | outRect.bottom = DimenUtils.dipToPixels(space, view.getContext()); |
| | | Log.i(TAG, circleSpecials.get(index).getName()); |
| | | } else |
| | | outRect.bottom = 0; |
| | | |
| | | |
| | | if ((index == total - 1) || (index == total - 2 && total % 2 == 0)) { |
| | | outRect.right = 0; |
| | | } else { |
| | | outRect.right = 0; //第一列左边贴边 |
| | | outRect.left = minWidth * 3; |
| | | } |
| | | |
| | | int lastRow = total / 4; |
| | | |
| | | if (lastRow != index / 4) { |
| | | outRect.bottom = minWidth * 4; |
| | | outRect.right = DimenUtils.dipToPixels(space, view.getContext()); |
| | | } |
| | | } |
| | | }; |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | guessLikeByDevice(); |
| | | } |
| | |
| | | getAppPageNotification(); |
| | | |
| | | //设置列表可以水平滑动,两行 |
| | | GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 4, GridLayoutManager.VERTICAL, false) { |
| | | @Override |
| | | public boolean canScrollVertically() { |
| | | return false; |
| | | } |
| | | }; |
| | | GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 2, GridLayoutManager.HORIZONTAL, false); |
| | | rv_special_offer.setLayoutManager(layoutManager); |
| | | specialAdapter2 = new RecommendCircleSpecialAdapter(getActivity(), circleSpecials); |
| | | rv_special_offer.setAdapter(specialAdapter2); |
| | |
| | | } else { |
| | | fl_fragment_activity.setVisibility(View.VISIBLE); |
| | | } |
| | | showActivity1(list3, url); |
| | | showBigActivity(list3, url); |
| | | } |
| | | |
| | | } |
| | |
| | | String url = jsonObject.optJSONObject("data") |
| | | .optJSONObject("activityArea").optString("bottomPicture"); |
| | | |
| | | showActivity1(list3, url); |
| | | showBigActivity(list3, url); |
| | | if (list3 == null || list3.size() == 0) { |
| | | fl_fragment_activity.setVisibility(View.GONE); |
| | | } else { |
| | |
| | | }); |
| | | } |
| | | |
| | | /* |
| | | 活动专题3 |
| | | |
| | | /** |
| | | * 大活动专题 |
| | | * |
| | | * @param mList |
| | | * @param bottomPic |
| | | */ |
| | | private void showActivity1(final List<SpecialOffer2> mList, String bottomPic) { |
| | | private void showBigActivity(final List<SpecialOffer2> mList, String bottomPic) { |
| | | if (mList.size() > 0) { |
| | | float screenWidth = SystemCommon.getScreenWidth(vp_banner.getContext()); |
| | | float actTotalHeight = (screenWidth - DimenUtils.dip2px(getContext(), 20)) * 7 / 20; |
| | |
| | | } |
| | | FrameLayout.LayoutParams params0 = new FrameLayout.LayoutParams((int) (screenWidth - |
| | | DimenUtils.dip2px(getContext(), 20)), (int) actTotalHeight); |
| | | params0.leftMargin = DimenUtils.dip2px(getContext(), 10); |
| | | params0.rightMargin = DimenUtils.dip2px(getContext(), 10); |
| | | params0.leftMargin = DimenUtils.dip2px(getContext(), 0); |
| | | params0.rightMargin = DimenUtils.dip2px(getContext(), 0); |
| | | params0.topMargin = DimenUtils.dip2px(getContext(), 15); |
| | | params0.bottomMargin = DimenUtils.dip2px(getContext(), 10); |
| | | ll_fragment_activity.setLayoutParams(params0); |
| | |
| | | |
| | | iv_activity_bg.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams |
| | | .MATCH_PARENT, (int) actTotalHeight + DimenUtils.dip2px(getContext(), 25))); |
| | | Glide.with(getContext()).load(bottomPic).into(iv_activity_bg); |
| | | // Glide.with(getContext()).load(bottomPic).into(iv_activity_bg); |
| | | |
| | | for (int i = 0; i < mList.size(); i++) { |
| | | if (i == 0) { |
| | |
| | | (int) (screenWidth - DimenUtils.dip2px(getContext(), 20)) * 7 / 20); |
| | | params.gravity = Gravity.TOP; |
| | | iv.setLayoutParams(params); |
| | | iv.setScaleType(ImageView.ScaleType.CENTER_CROP); |
| | | iv.setScaleType(ImageView.ScaleType.FIT_XY); |
| | | |
| | | Glide.with(getContext()).load(info.getPicture()).into(iv); |
| | | iv.setOnClickListener(new View.OnClickListener() { |
| | |
| | | viewHolder.view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(mContext, info.getGoodsType()); |
| | | Intent intent =new Intent(mContext,GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | mContext.startActivity(intent); |
| | | } |
| | | }); |
| | |
| | | import android.widget.LinearLayout; |
| | | import android.widget.TextView; |
| | | |
| | | import com.bumptech.glide.Glide; |
| | | import com.bumptech.glide.request.RequestOptions; |
| | | import com.tejia.lijin.app.util.goods.GoodsDetailListUtil; |
| | | import com.tejia.lijin.app.util.ui.GoodsDetailUtil; |
| | | import com.tejia.lijin.app.util.ui.GoodsRightViewHolder; |
| | | import com.wpc.library.widget.RatioLayout; |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | |
| | | convertView = LayoutInflater.from(mContext).inflate( |
| | | R.layout.item_recommend_gv, null); |
| | | viewHolder = new ViewHolder(); |
| | | viewHolder.ratioLayout = convertView |
| | | .findViewById(R.id.item_recommend_gv_ral); |
| | | viewHolder.goodsDetail = new GoodsRightViewHolder(convertView); |
| | | viewHolder.iv_pic = convertView |
| | | .findViewById(R.id.iv_movie_cover); |
| | | viewHolder.tv_name = convertView |
| | | .findViewById(R.id.tv_movie_title); |
| | | |
| | | viewHolder.tv_price = convertView.findViewById(R.id.tv_price); |
| | | viewHolder.tv_coupon_price = convertView.findViewById(R.id.tv_coupon_price1); |
| | | viewHolder.ll_coupon_bg1 = convertView.findViewById(R.id.ll_coupon_bg1); |
| | | viewHolder.ll_coupon = convertView.findViewById(R.id.ll_coupon); |
| | | viewHolder.ll_recommend_gv = convertView.findViewById(R.id.ll_recommend_gv); |
| | | viewHolder.tv_favourable = convertView.findViewById(R.id.tv_favourable); |
| | | viewHolder.tv_normal_price = convertView.findViewById(R.id.tv_normal_price); |
| | | viewHolder.tv_sale_num = convertView.findViewById(R.id.tv_sale_num); |
| | | |
| | | viewHolder.ll_discount = convertView.findViewById(R.id.ll_discount); |
| | | viewHolder.tv_discount = convertView.findViewById(R.id.tv_discount); |
| | | .findViewById(R.id.iv_pic); |
| | | convertView.setTag(viewHolder); |
| | | } else { |
| | | viewHolder = (ViewHolder) convertView.getTag(); |
| | | } |
| | | viewHolder.ll_recommend_gv.setVisibility(View.VISIBLE); |
| | | viewHolder.ratioLayout.setRatio(1.0f); |
| | | |
| | | final TaoBaoGoodsBrief info = wList.get(position); |
| | | if (info == null) { |
| | | return convertView; |
| | | } |
| | | int shopType = info.getShopType(); |
| | | ImageUtil.showImageFace(mContext, info.getTitle(), shopType, viewHolder.tv_name); |
| | | // 图片 |
| | | // Glide.with(mContext).load(info.getPictUrl()).placeholder(R.drawable.ic_goods_default).bitmapTransform(new RoundedCornersTransformation(mContext, |
| | | // DimenUtils.dip2px(mContext, 5), 0, RoundedCornersTransformation.CornerType.TOP)).into(viewHolder.iv_pic); |
| | | ImageLoader.getInstance().displayImage(info.getPicUrl(), viewHolder.iv_pic, options); |
| | | |
| | | viewHolder.tv_normal_price.setText("¥" + info.getZkPrice()); |
| | | viewHolder.tv_normal_price.setPaintFlags(viewHolder.tv_normal_price.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); |
| | | |
| | | // viewHolder.tv_normal_price.setPaintFlags(viewHolder.tv_normal_price.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); |
| | | |
| | | viewHolder.tv_price.setTextColor(mContext.getResources().getColor(R.color.theme)); |
| | | |
| | | if (info.getMoneyInfo() != null) { |
| | | viewHolder.tv_favourable.setText( (info.getMoneyInfo().getMoneyType() == 1 ?"返 ":"奖 ") + info.getMoneyInfo().getFanliMoney()); |
| | | } |
| | | String disCount; |
| | | if (info.isHasCoupon()) { |
| | | disCount = "¥ " + info.getCouponPrice(); |
| | | viewHolder.ll_coupon_bg1.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_coupon_price.setText("¥ " + info.getCouponInfo().getAmount()); |
| | | } else { |
| | | if (info.getGoodsType() == Constant.GOODS_TYPE_VIP) { |
| | | disCount = "¥ " + info.getCouponPrice(); |
| | | } else |
| | | disCount = "¥ " + info.getZkPrice(); |
| | | viewHolder.ll_coupon_bg1.setVisibility(View.GONE); |
| | | } |
| | | Spannable span = new SpannableString(disCount); |
| | | span.setSpan(new RelativeSizeSpan(1.4f), 1, disCount.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | span.setSpan(new StyleSpan(Typeface.BOLD), 1, disCount.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | viewHolder.tv_price.setText(span); |
| | | |
| | | viewHolder.tv_sale_num.setTextColor((info.getSalesType() == 1 || info.getSalesType() == 4) ? |
| | | mContext.getResources().getColor(R.color.gray5) : info.getSalesType() == 2 ? |
| | | mContext.getResources().getColor(R.color.goods_sale_num_text_color_orange) : |
| | | mContext.getResources().getColor(R.color.goods_sale_num_text_color_blue)); |
| | | if (info.getGoodsType() != Constant.GOODS_TYPE_VIP) { |
| | | viewHolder.tv_sale_num.setText(info.getSalesType() == 1 ? "月销 " + info.getSalesCount() : |
| | | info.getSalesType() == 2 ? "2小时销量 " + info.getSalesCount() : info.getSalesType() == 3 ? |
| | | "今日销量 " + info.getSalesCount() : "总销量 " + info.getSalesCount()); |
| | | viewHolder.ll_discount.setVisibility(View.GONE); |
| | | } else { |
| | | viewHolder.tv_sale_num.setText(""); |
| | | viewHolder.ll_discount.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_discount.setText(info.getDiscount()); |
| | | } |
| | | |
| | | viewHolder.ll_recommend_gv.setOnClickListener(new View.OnClickListener() { |
| | | GoodsDetailListUtil.setGoodsDetail(mContext, info, viewHolder.goodsDetail); |
| | | Glide.with(mContext).load(info.getPicUrl()).apply(new RequestOptions().centerCrop()).into(viewHolder.iv_pic); |
| | | convertView.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | // Intent intent = new Intent(mContext, GoodsDetailBrowerActivity.class); |
| | | if (from == "相关推荐") { |
| | | GoodsCustomEvent.goodsDetailRecommend(mContext); |
| | | } else { |
| | | GoodsCustomEvent.goodsDetailGuess(mContext); |
| | | } |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoodsType()); |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | mContext.startActivity(intent); |
| | | } |
| | | }); |
| | | |
| | | viewHolder.tv_favourable.setVisibility(View.GONE); |
| | | return convertView; |
| | | } |
| | | |
| | | class ViewHolder { |
| | | TextView tv_name; |
| | | TextView tv_price; |
| | | TextView tv_normal_price; |
| | | TextView tv_coupon_price; |
| | | LinearLayout ll_coupon_bg1; |
| | | LinearLayout ll_recommend_gv; |
| | | LinearLayout ll_coupon; |
| | | TextView tv_favourable;//红包,券后价 |
| | | TextView tv_sale_num; |
| | | ImageView iv_pic; |
| | | RatioLayout ratioLayout; |
| | | TextView tv_discount; |
| | | LinearLayout ll_discount; |
| | | GoodsRightViewHolder goodsDetail; |
| | | |
| | | } |
| | | } |
| | |
| | | // Intent intent = new Intent(mContext, GoodsDetailBrowerActivity.class); |
| | | if (!StringUtils.isEmpty(type)) |
| | | CategoryCustomEvent.classGoods(mContext, type); |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoodsType()); |
| | | Intent intent =new Intent(mContext,GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | intent.putExtra("title", finalInfo.getTitle()); |
| | | intent.putExtra("id", finalInfo.getGoodsId()); |
| | | intent.putExtra("from", from); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | import android.graphics.drawable.AnimationDrawable; |
| | | import android.os.Bundle; |
| | | import android.provider.Settings; |
| | | |
| | | import androidx.annotation.Nullable; |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | import androidx.recyclerview.widget.GridLayoutManager; |
| | | import androidx.appcompat.widget.LinearLayoutCompat; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.util.Log; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | |
| | | private LinearLayout ll_no_net, ll_no_data, ll_request_failture, |
| | | ll_price, ll_confirm, ll_filter, ll_has_coupon; |
| | | private ImageView iv_slid_top, iv_price, iv_price_vip, |
| | | iv_loading, iv_filter, iv_has_coupon,iv_footermark; |
| | | iv_loading, iv_filter, iv_has_coupon, iv_footermark; |
| | | View bottom; |
| | | LinearLayout ll_price_input; |
| | | //唯品会价格筛选 |
| | |
| | | if ((!isLoad) && last == total - 1 && wList.size() < count) { |
| | | page++; |
| | | isLoad = true; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | setData(page); |
| | | } |
| | |
| | | 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("url", jsonshop.getCouponInfo().getLink()); |
| | | intent.putExtra("id", jsonshop.getGoodsId()); |
| | | intent.putExtra("from", "brand"); |
| | | startActivity(intent); |
| | | } |
| | |
| | | item_brandshoplis_img2.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent; |
| | | Intent intent = new Intent(getContext(), GoodsDetailActivity.class); |
| | | if (jsonshop2.getGoodsType() == 1) { |
| | | intent = new Intent(getContext(), GoodsDetailActivityTB.class); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | } else if (jsonshop2.getGoodsType() == 2) { |
| | | intent = new Intent(getContext(), GoodsDetailActivityJD.class); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_JD); |
| | | } else { |
| | | intent = new Intent(getContext(), GoodsDetailActivityTB.class); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_PDD); |
| | | } |
| | | intent.putExtra("title", jsonshop2.getTitle()); |
| | | // intent.putExtra("url", jsonshop2.getCouponInfo().getLink()); |
| | | intent.putExtra("id", jsonshop2.getGoodsId()); |
| | | intent.putExtra("goodsId", jsonshop2.getGoodsId()); |
| | | intent.putExtra("from", "brand"); |
| | | startActivity(intent); |
| | | } |
| | |
| | | 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("url", jsonshop3.getCouponInfo().getLink()); |
| | | intent.putExtra("id", jsonshop3.getGoodsId()); |
| | | intent.putExtra("from", "brand"); |
| | | startActivity(intent); |
| | | } |
| | |
| | | if ((!isLoad) && last == total - 1 && mList.size() < count) { |
| | | page++; |
| | | isLoad = true; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getData(page); |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getGoodsList(); |
| | | } |
| | |
| | | String[] params = murl.split("#"); |
| | | if (params[0].equalsIgnoreCase("getgoodsdetail")) { |
| | | // Intent intent = new Intent(SpecialBrowserActivity.this, GoodsDetailBrowerActivity.class); |
| | | Intent intent = new Intent(SpecialBrowserActivity.this, GoodsDetailActivityTB.class); |
| | | intent.putExtra("id", params[1]); |
| | | Intent intent = new Intent(SpecialBrowserActivity.this, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", params[1]); |
| | | intent.putExtra("url", params[2]); |
| | | intent.putExtra("title", params[3]); |
| | | startActivity(intent); |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getGoodsList(); |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getGoodsList(); |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | getGoodsList(); |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | mPresenter.getGoodsInfo(page + "", mBundle.getString("id"), bottom, tv_loading, "正在加载更多数据"); |
| | | mPresenter.getGoodsInfo(page + "", mBundle.getString("id"), bottom, tv_loading, getResources().getString(R.string.loading_more_text)); |
| | | } |
| | | } else { |
| | | iv_slid_top.setVisibility(View.GONE); |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.databinding.AdapterSpikegoodslistBinding; |
| | |
| | | binding.llHorizontalItem.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent= GoodsDetailJumpUtil.getGoodsDetailIntent(mContext,info.getGoodsType()); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | intent.putExtra("from", mFrom); |
| | | intent.putExtra("title", info.getTitle()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | mContext.startActivity(intent); |
| | | } |
| | | }); |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getCollegeList(); |
| | | } |
| | | } |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.viewpagerindicator.CirclePageIndicator; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | |
| | | SendCircleImageGoods imageGoods = imageList.get(position).getGoods(); |
| | | int goodsType = imageGoods.getGoodsType(); |
| | | //跳转商品详情 |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(mContext, imageGoods.getGoodsType()); |
| | | intent.putExtra("id", imageGoods.getGoodsId() + ""); |
| | | Intent intent= new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId",imageGoods.getGoodsId()); |
| | | intent.putExtra("goodsType", goodsType); |
| | | intent.putExtra("from", "faquan"); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | //跳转商品详情 |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(mContext, info.getGoodsType()); |
| | | intent.putExtra("id", info.getGoodsId()); |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoodsType()); |
| | | intent.putExtra("from", "faquan"); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getContentList(); |
| | | } |
| | | } |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getTrendsList(); |
| | | } |
| | | } |
| | |
| | | if (last == total - 1 && mList.size() < count && isLoad) { |
| | | page++; |
| | | isLoad = false; |
| | | mPresenter.getGoodsInfo(page + "", mBundle.getString("id"), bottom, tv_loading, "正在加载更多数据"); |
| | | mPresenter.getGoodsInfo(page + "", mBundle.getString("id"), bottom, tv_loading, getResources().getString(R.string.loading_more_text)); |
| | | } |
| | | } else { |
| | | iv_slid_top.setVisibility(View.GONE); |
| | |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wpc.library.DeviceUuidFactory; |
| | | import com.wpc.library.util.GetManifestDataUtil; |
| | |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.util.security.MD5Utils; |
| | | import com.tejia.lijin.app.BuXinConstant; |
| | | 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.ui.recommend.GoodsDetailBrowerActivity; |
| | | import com.tejia.lijin.app.ui.recommend.SearchActivity; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | |
| | | return; |
| | | } else { |
| | | if (pageClassName.equals("com.tejia.lijin.app.ui.recommend.GoodsBrowserActivity")) { |
| | | pageClassName = GoodsDetailActivityTB.class.getName(); |
| | | pageClassName = GoodsDetailActivity.class.getName(); |
| | | } |
| | | intent = new Intent(mContext, Class.forName(JumpActivityUtil.filterActivityName(pageClassName))); |
| | | } |
| | |
| | | /*********移进来的方法****/ |
| | | @JavascriptInterface |
| | | public void jumpGoodsSplashWithFrom(long id, String from) { |
| | | Intent intent = new Intent(mContext, GoodsDetailActivityTB.class); |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("id", id + ""); |
| | | intent.putExtra("from", from); |
| | | mContext.startActivity(intent); |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void jumpGoodsDetail(String id, int goodsType) { |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", goodsType); |
| | | mContext.startActivity(intent); |
| | | } |
| | | |
| | | @JavascriptInterface |
| | | public void jumpGoodsSplash(long id) { |
| | | Intent intent = new Intent(mContext, GoodsDetailActivityTB.class); |
| | | intent.putExtra("id", id + ""); |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | mContext.startActivity(intent); |
| | | } |
| | | |
| | | @JavascriptInterface |
| | | public void jumpPDDGoodsDetailWithFrom(long id, String from) { |
| | | Intent intent = new Intent(mContext, GoodsDetailActivityPDD.class); |
| | | intent.putExtra("id", id + ""); |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_PDD); |
| | | intent.putExtra("from", from); |
| | | mContext.startActivity(intent); |
| | | } |
| | | |
| | | @JavascriptInterface |
| | | public void jumpJDGoodsDetailWithFrom(long id, String from) { |
| | | Intent intent = new Intent(mContext, GoodsDetailActivityJD.class); |
| | | intent.putExtra("id", id + ""); |
| | | Intent intent = new Intent(mContext, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_JD); |
| | | intent.putExtra("from", from); |
| | | mContext.startActivity(intent); |
| | | } |
| | |
| | | |
| | | @JavascriptInterface |
| | | public void jumpWXXCX(String userName, String path) { |
| | | WXUtil.jumpWXXCX(mContext,userName, path); |
| | | WXUtil.jumpWXXCX(mContext, userName, path); |
| | | } |
| | | |
| | | /** |
| | |
| | | TextView tv_label = new TextView(mContext); |
| | | tv_label.setSingleLine(true); |
| | | GradientDrawable gradientDrawable = new GradientDrawable(); |
| | | gradientDrawable.setCornerRadius(DimenUtils.dip2px(mContext, 3)); |
| | | gradientDrawable.setStroke(DimenUtils.dip2px(mContext, 0.5f), |
| | | gradientDrawable.setCornerRadius(DimenUtils.dip2px(mContext, 10)); |
| | | gradientDrawable.setStroke(DimenUtils.dip2px(mContext, 1), |
| | | Color.parseColor(list.get(i).getColor())); |
| | | gradientDrawable.setColor(mContext.getResources().getColor(R.color.white)); |
| | | tv_label.setBackground(gradientDrawable); |
| | |
| | | import android.net.Uri; |
| | | import android.os.Build; |
| | | import android.provider.Settings; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.google.android.material.appbar.AppBarLayout; |
| | | |
| | | import androidx.core.app.NotificationManagerCompat; |
| | | |
| | | import android.util.DisplayMetrics; |
| | | import android.view.Display; |
| | | import android.view.View; |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.assist.QueueProcessingType; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.umeng.commonsdk.UMConfigure; |
| | | import com.vivo.push.PushClient; |
| | | import com.wpc.library.util.common.StringUtils; |
| | |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.ui.main.MainActivity; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.ui.recommend.SearchResultActivity; |
| | | import com.tejia.lijin.app.ui.recommend.ShareGoodsImageActivity31; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.MainCustomEvent; |
| | |
| | | } else { |
| | | try { |
| | | if (cClass.equals("com.tejia.lijin.app.ui.recommend.GoodsBrowserActivity")) { |
| | | cClass = GoodsDetailActivityTB.class.getName(); |
| | | cClass = GoodsDetailActivity.class.getName(); |
| | | } |
| | | Intent intent = new Intent(context, Class.forName(JumpActivityUtil.filterActivityName(cClass))); |
| | | if (!StringUtils.isEmpty(url1)) |
| | | intent.putExtra("url", url1); |
| | | if (!StringUtils.isEmpty(id)) { |
| | | intent.putExtra("id", id); |
| | | intent.putExtra("goodsId", id); |
| | | intent.putExtra("goodsType", Constant.GOODS_TYPE_TB); |
| | | } |
| | | |
| | | |
| | | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | context.startActivity(intent); |
| | | } catch (ClassNotFoundException e) { |
| | |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.text.TextUtils; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | import android.webkit.WebChromeClient; |
| | | import android.webkit.WebViewClient; |
| | | import android.widget.Toast; |
| | | |
| | | import com.alibaba.baichuan.android.trade.AlibcTradeSDK; |
| | | import com.alibaba.baichuan.android.trade.model.AlibcShowParams; |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.alibaba.baichuan.android.trade.page.AlibcDetailPage; |
| | | import com.alibaba.baichuan.trade.biz.AlibcConstants; |
| | | import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType; |
| | | import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.entity.TbPidInfo; |
| | | import com.tejia.lijin.app.entity.common.GoodsConvertLinkJumpLink; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityJD; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityPDD; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivitySuning; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityVIP; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.GoodsBuyJumpUtil; |
| | | import com.tejia.lijin.app.util.baichuan.AlibcTradeUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | |
| | | import org.apache.http.Header; |
| | |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityJD; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityPDD; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivitySuning; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityTB; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivityVIP; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | |
| | | public class GoodsDetailJumpUtil { |
| | | |
| | | public static Intent getGoodsDetailIntent(Context context, int goodsType) { |
| | | Intent intent = null; |
| | | switch (goodsType) { |
| | | case Constant.GOODS_TYPE_JD: |
| | | intent = new Intent(context, GoodsDetailActivityJD.class); |
| | | break; |
| | | case Constant.GOODS_TYPE_PDD: |
| | | intent = new Intent(context, GoodsDetailActivityPDD.class); |
| | | break; |
| | | case Constant.GOODS_TYPE_VIP: |
| | | intent = new Intent(context, GoodsDetailActivityVIP.class); |
| | | break; |
| | | case Constant.GOODS_TYPE_SUNING: |
| | | intent = new Intent(context, GoodsDetailActivitySuning.class); |
| | | break; |
| | | default: |
| | | intent = new Intent(context, GoodsDetailActivityTB.class); |
| | | } |
| | | return intent; |
| | | } |
| | | } |
| | |
| | | |
| | | public static void setGoodsDetail(Context mContext, TaoBaoGoodsBrief info, GoodsRightViewHolder viewHolder) { |
| | | |
| | | if (viewHolder.ll_labels.getChildCount() > 0) { |
| | | viewHolder.ll_labels.removeAllViews(); |
| | | } |
| | | if (info.getLabels() != null && |
| | | info.getLabels().size() > 0) { |
| | | viewHolder.ll_labels.setVisibility(View.VISIBLE); |
| | | SetLabels.addLabel(mContext, viewHolder.ll_labels, |
| | | info.getLabels()); |
| | | } else { |
| | | viewHolder.ll_labels.setVisibility(View.GONE); |
| | | if (viewHolder.ll_labels != null) { |
| | | if (viewHolder.ll_labels.getChildCount() > 0) { |
| | | viewHolder.ll_labels.removeAllViews(); |
| | | } |
| | | if (info.getLabels() != null && |
| | | info.getLabels().size() > 0) { |
| | | viewHolder.ll_labels.setVisibility(View.VISIBLE); |
| | | SetLabels.addLabel(mContext, viewHolder.ll_labels, |
| | | info.getLabels()); |
| | | } else { |
| | | viewHolder.ll_labels.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | |
| | | ImageUtil.showImageFace(mContext, info.getTitle(), info.getShopType(), viewHolder.tv_name); |
| | |
| | | } |
| | | |
| | | // info.setShopInfo(null); |
| | | if (info.getShopInfo() != null) { |
| | | viewHolder.tv_shop_name.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_shop_name.setText(info.getShopInfo().getShopName()); |
| | | } else { |
| | | viewHolder.tv_shop_name.setVisibility(View.GONE); |
| | | if (viewHolder.tv_shop_name != null) { |
| | | if (info.getShopInfo() != null) { |
| | | viewHolder.tv_shop_name.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_shop_name.setText(info.getShopInfo().getShopName()); |
| | | } else { |
| | | viewHolder.tv_shop_name.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | |
| | | //返利 |
| | |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.security.MD5Utils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | @Override |
| | | public void onClick(DialogInterface dialog, int which) { |
| | | MainCustomEvent.rmdTbgoodsRecommendResultClick(activity, "商品"); |
| | | Intent intent = GoodsDetailJumpUtil.getGoodsDetailIntent(activity, info.getGoods().getGoodsType()); |
| | | Intent intent = new Intent(activity, GoodsDetailActivity.class); |
| | | intent.putExtra("goodsId", info.getGoods().getGoodsId()); |
| | | intent.putExtra("goodsType", info.getGoods().getGoodsType()); |
| | | intent.putExtra("title", info.getGoods().getTitle()); |
| | | intent.putExtra("id", info.getGoods().getGoodsId()); |
| | | intent.putExtra("from", "猜你喜欢"); |
| | | activity.startActivity(intent); |
| | | dialog.dismiss(); |
| | |
| | | final String key = "clipboardRecommend-" + MD5Utils.getMD532(description); |
| | | if (!DuplicateEventFilterUtil.allowEvent(key, 2000)) |
| | | return; |
| | | if(dialog!=null&&dialog.isShowing()) |
| | | if (dialog != null && dialog.isShowing()) |
| | | return; |
| | | ShoppingApi.getNewGoodsInfo(context, description,UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getNewGoodsInfo(context, description, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | //防止重复弹框 |
| | |
| | | } else if (type.equalsIgnoreCase("20")) { |
| | | data = jsonObject.optJSONObject("data").optJSONObject("data"); |
| | | ConvertLinkInfo convertLinkInfo = new Gson().fromJson(data.toString(), ConvertLinkInfo.class); |
| | | dialog= new ConvertLinkDialog.Builder(context).setConvertLinkInfo(convertLinkInfo).create(); |
| | | dialog = new ConvertLinkDialog.Builder(context).setConvertLinkInfo(convertLinkInfo).create(); |
| | | dialog.show(); |
| | | } |
| | | } else if (jsonObject.optInt("code") == 1001) {// 用户未登录提示 |
| | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.graphics.Color; |
| | | import android.graphics.drawable.Drawable; |
| | | import android.graphics.drawable.GradientDrawable; |
| | | import android.view.View; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public static String getSalesTypeDesc(int salesType) { |
| | | switch (salesType) { |
| | | case 1: |
| | | return "月销"; |
| | | case 2: |
| | | return "2小时销"; |
| | | case 3: |
| | | return "今日销"; |
| | | case 4: |
| | | return "总销"; |
| | | |
| | | } |
| | | return "销量"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据商品用户类型获取店铺类型图标 |
| | | * |
| | | * @return |
| | | */ |
| | | private static GradientDrawable getUserTypeDrawable(Context context, int color) { |
| | | GradientDrawable gd = new GradientDrawable(); |
| | | gd.setColor(Color.TRANSPARENT); |
| | | gd.setCornerRadius(100); |
| | | gd.setStroke(DimenUtils.dip2px(context, 1), color); |
| | | return gd; |
| | | } |
| | | |
| | | |
| | | public static String getShopTypeName(int userType) { |
| | | switch (userType) { |
| | | case 10: |
| | | return "淘宝"; |
| | | case 11: |
| | | return "天猫"; |
| | | case 20: |
| | | return "京东"; |
| | | case 30: |
| | | return "拼多多"; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | public static void fillShopType(TextView tv_shop_type, int userType) { |
| | | int color = Color.parseColor("#FF2C4A"); |
| | | GradientDrawable bg = getUserTypeDrawable(tv_shop_type.getContext(), color); |
| | | tv_shop_type.setBackground(bg); |
| | | tv_shop_type.setText(getShopTypeName(userType)); |
| | | tv_shop_type.setTextColor(color); |
| | | tv_shop_type.setTextSize(10); |
| | | tv_shop_type.setPadding(DimenUtils.dip2px(tv_shop_type.getContext(), 5), 2, |
| | | DimenUtils.dip2px(tv_shop_type.getContext(), 5), 3); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <solid android:color="#ffffffff" /> |
| | | <stroke |
| | | android:width="1dp" |
| | | android:color="#59dedede" /> |
| | | <corners |
| | | android:bottomLeftRadius="0dp" |
| | | android:bottomRightRadius="0dp" |
| | | android:topLeftRadius="32dp" |
| | | android:topRightRadius="32dp" /> |
| | | <padding |
| | | android:bottom="20dp" |
| | | android:left="20dp" |
| | | android:right="20dp" |
| | | android:top="13dp"></padding> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <solid android:color="#ffffffff" /> |
| | | <stroke |
| | | android:width="1dp" |
| | | android:color="#59a7a7a7" /> |
| | | <corners |
| | | android:bottomLeftRadius="16dp" |
| | | android:bottomRightRadius="16dp" |
| | | android:topLeftRadius="16dp" |
| | | android:topRightRadius="16dp" /> |
| | | |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <solid android:color="#ffffac00" /> |
| | | <corners |
| | | android:bottomLeftRadius="8dp" |
| | | android:bottomRightRadius="8dp" |
| | | android:topLeftRadius="8dp" |
| | | android:topRightRadius="8dp" /> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:shape="rectangle"> |
| | | <solid android:color="@color/white" /> |
| | | <corners |
| | | android:bottomLeftRadius="8dp" |
| | | android:bottomRightRadius="8dp" |
| | | android:topLeftRadius="8dp" |
| | | android:topRightRadius="8dp" /> |
| | | </shape> |
| | |
| | | android:id="@+id/ll_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | android:orientation="vertical" |
| | | android:visibility="gone"> |
| | | |
| | | |
| | | <FrameLayout |
| | |
| | | android:background="@drawable/shape_goods_detail_item_bg" |
| | | android:orientation="vertical"> |
| | | |
| | | <FrameLayout |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_labels" |
| | | android:layout_width="wrap_content" |
| | | android:layout_width="0dp" |
| | | android:orientation="horizontal" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="left|center_vertical" |
| | | android:orientation="vertical"> |
| | | android:layout_weight="1"> |
| | | |
| | | </LinearLayout> |
| | | |
| | |
| | | android:textColor="#ff888888" |
| | | android:textSize="13sp" /> |
| | | |
| | | </FrameLayout> |
| | | </LinearLayout> |
| | | |
| | | |
| | | <TextView |
| | |
| | | android:focusableInTouchMode="true"> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:nestedScrollingEnabled="false" |
| | | android:id="@+id/rv_price_info" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"></androidx.recyclerview.widget.RecyclerView> |
| | | android:layout_height="wrap_content" |
| | | android:nestedScrollingEnabled="false"></androidx.recyclerview.widget.RecyclerView> |
| | | |
| | | </RelativeLayout> |
| | | |
| | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="1dp" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_shop_type" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | </TextView> |
| | | |
| | | </LinearLayout> |
| | | |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:background="@color/register_gray" |
| | | android:orientation="vertical"> |
| | | |
| | |
| | | android:id="@+id/gv_guess_like" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="4dp" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="4dp" |
| | | android:layout_marginRight="4dp" |
| | | android:layout_marginRight="10dp" |
| | | android:background="@color/register_gray" |
| | | android:columnWidth="3dp" |
| | | android:horizontalSpacing="4dp" |
| | | android:horizontalSpacing="5.5dp" |
| | | android:numColumns="2" |
| | | android:verticalSpacing="4dp"></com.wpc.library.widget.MyGridView> |
| | | android:verticalSpacing="9dp"></com.wpc.library.widget.MyGridView> |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | |
| | | <FrameLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1"> |
| | | android:layout_weight="1" |
| | | android:visibility="invisible"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_top_bar_right" |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="30dp" |
| | | android:layout_marginTop="57dp" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | android:orientation="horizontal"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_notification" |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | android:visibility="gone"> |
| | | android:visibility="visible"> |
| | | |
| | | <include layout="@layout/item_no_net" /> |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/shape_dialog_goods_detail_hongbao_and_coupon_bg" |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="请选择领取" |
| | | android:textColor="#ffff2c4a" |
| | | android:textSize="15sp" /> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rv_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginBottom="15dp"> |
| | | |
| | | </androidx.recyclerview.widget.RecyclerView> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_cancel" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="32dp" |
| | | android:background="@drawable/shape_dialog_goods_detail_hongbao_and_coupon_btn" |
| | | android:gravity="center" |
| | | android:text="取消" |
| | | android:textColor="#ff939393" |
| | | android:textSize="15sp" /> |
| | | |
| | | |
| | | </LinearLayout> |
| | |
| | | android:id="@+id/tv_sub_money" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="19dp" |
| | | android:text="¥8.88" |
| | | android:textColor="#ffffffff" |
| | | android:textSize="12sp" /> |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="top|center_horizontal" |
| | | android:layout_marginTop="3dp" |
| | | android:layout_marginTop="1dp" |
| | | android:text="注:本次为比价返利,1个小时后购买可提高100%" |
| | | android:textColor="#ffffffff" |
| | | android:textSize="8sp" /> |
| | |
| | | android:layout_marginLeft="3.5dp" |
| | | android:layout_marginRight="3.5dp" |
| | | android:layout_marginBottom="3.5dp" |
| | | android:paddingLeft="20dp" |
| | | android:paddingRight="20dp" |
| | | android:visibility="gone"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="20dp" |
| | | android:layout_weight="1"> |
| | | |
| | | <LinearLayout |
| | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginRight="20dp" |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="5dp" |
| | | android:drawablePadding="2.5dp" |
| | | android:text="升级为铂金会员红包可提高100%" |
| | | android:textColor="#ffffffff" |
| | | android:textSize="8sp" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="wrap_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | |
| | | <LinearLayout |
| | | <FrameLayout |
| | | android:id="@+id/fl_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_margin="3dp" |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="5dp"> |
| | | |
| | | |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | app:ratio="0.8254"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_icon" |
| | | |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_alignParentStart="true" |
| | | android:layout_alignParentLeft="true" |
| | | android:layout_alignParentTop="true" |
| | | android:scaleType="centerCrop" /> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | app:ratio="0.8254"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_icon" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_alignParentStart="true" |
| | | android:layout_alignParentLeft="true" |
| | | android:layout_alignParentTop="true" |
| | | android:scaleType="centerCrop" /> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:text="1元购" |
| | | android:lines="1" |
| | | android:ellipsize="end" |
| | | android:textColor="#ffffffff" |
| | | android:textSize="12sp" /> |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:layout_marginBottom="3dp" |
| | | android:ellipsize="end" |
| | | android:lines="1" |
| | | android:text="1元购" |
| | | android:textColor="#ffffffff" |
| | | android:textSize="12sp" /> |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_tag" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="20dp" |
| | | android:layout_gravity="right|top" |
| | | android:layout_marginTop="-3dp" |
| | | android:layout_marginRight="-5dp"></ImageView> |
| | | android:layout_marginTop="0dp" |
| | | android:layout_marginRight="0dp"></ImageView> |
| | | |
| | | |
| | | </FrameLayout> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/shape_goods_list_gv_bg" |
| | | android:orientation="vertical"> |
| | | |
| | | <!-- <View |
| | | android:id="@+id/v_top1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="10dp" |
| | | android:visibility="gone" /> |
| | | --> |
| | | <LinearLayout |
| | | android:id="@+id/ll_recommend_gv" |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/shape_addzfb_hint2" |
| | | android:orientation="vertical" |
| | | android:visibility="gone"> |
| | | app:ratio="1"> |
| | | |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:id="@+id/item_recommend_gv_ral" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:layout_marginBottom="5dp" |
| | | android:background="@drawable/shape_addzfb_hint2"> |
| | | <com.tejia.lijin.app.ui.subview.RadiusCardView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | app:rcv_topLeftRadiu="8dp" |
| | | app:rcv_topRightRadiu="8dp"> |
| | | |
| | | <!-- app:ratio="" 0.7 1.33 --> |
| | | |
| | | <FrameLayout |
| | | <ImageView |
| | | android:id="@+id/iv_pic" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@drawable/shape_img_bg" /> |
| | | </ImageView> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_movie_cover" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:scaleType="centerCrop" /> |
| | | </com.tejia.lijin.app.ui.subview.RadiusCardView> |
| | | |
| | | </FrameLayout> |
| | | </com.wpc.library.widget.RatioLayout> |
| | | |
| | | </com.wpc.library.widget.RatioLayout> |
| | | |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:padding="7dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="8dp" |
| | | android:layout_marginRight="8dp" |
| | | android:layout_marginBottom="8dp" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_movie_title" |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginBottom="5dp" |
| | | android:ellipsize="end" |
| | | android:lineSpacingMultiplier="1.2" |
| | | android:lines="2" |
| | | android:textColor="@color/text_black_1" |
| | | android:maxLines="2" |
| | | android:text="牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款123123牛仔外套女ins潮春秋装韩版宽松百搭春季2019新款123123" |
| | | android:textColor="#ff333333" |
| | | android:textSize="12sp" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_shop" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="bottom" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"> |
| | | android:layout_marginTop="8dp" |
| | | android:gravity="center_vertical"> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_shop_name" |
| | | android:id="@+id/tv_hongbao_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:ellipsize="end" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | android:background="@drawable/shape_item_goods_hongbao_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_hongbao" |
| | | android:drawablePadding="3dp" |
| | | android:text="-¥10" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_sale_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="月销 8968" |
| | | android:textColor="#ffaaaaaa" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_labels" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="2dp" |
| | | android:orientation="horizontal" |
| | | android:visibility="gone"></LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="2dp" |
| | | android:layout_marginTop="6dp" |
| | | android:layout_marginRight="2dp" |
| | | android:orientation="horizontal"> |
| | | android:layout_marginTop="5dp" |
| | | android:gravity="center_vertical"> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_coupon_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/shape_item_goods_coupon_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_coupon" |
| | | android:drawablePadding="3dp" |
| | | android:gravity="center_vertical" |
| | | android:text="-¥100" |
| | | android:textColor="#ffffac00" |
| | | android:textSize="12sp"></TextView> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:ellipsize="end" |
| | | android:lines="1" |
| | | android:textColor="@color/main_text_color" |
| | | android:textSize="13sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_normal_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="8dp" |
| | | android:ellipsize="end" |
| | | android:lines="1" |
| | | android:textColor="@color/gray5" |
| | | android:text="¥128.9" |
| | | android:textColor="#ffa1a0a0" |
| | | android:textSize="12sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_sale_num" |
| | | android:id="@+id/tv_fanli_amount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="left" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | android:layout_marginTop="5dp" |
| | | android:background="@drawable/shape_item_goods_fanli_bg" |
| | | android:drawableLeft="@drawable/icon_item_goods_fanli" |
| | | android:drawablePadding="3dp" |
| | | android:text="-¥10" |
| | | android:textColor="#ff55be00" |
| | | android:textSize="12sp" |
| | | android:visibility="visible" /> |
| | | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="right|bottom" |
| | | android:layout_marginBottom="-4dp" |
| | | android:gravity="right|bottom" |
| | | android:orientation="vertical" |
| | | android:padding="0dp"> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_coupon" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="2dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="2dp" |
| | | android:orientation="horizontal"> |
| | | <include layout="@layout/item_coupon_common"></include> |
| | | <LinearLayout |
| | | android:id="@+id/ll_discount" |
| | | android:layout_width="wrap_content" |
| | | android:visibility="gone" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginRight="8dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_discount" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="18dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:background="@drawable/shape_goods_discount" |
| | | android:gravity="center" |
| | | android:paddingLeft="8dp" |
| | | android:paddingRight="8dp" |
| | | android:text="2.5折" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" /> |
| | | </LinearLayout> |
| | | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_favourable" |
| | | android:id="@+id/tv_actual_price1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="20dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:background="@drawable/shape_goods_list_price_fan" |
| | | android:ellipsize="end" |
| | | android:gravity="center_vertical" |
| | | android:lines="1" |
| | | android:paddingLeft="4dp" |
| | | android:paddingRight="4dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" /> |
| | | android:layout_height="wrap_content" |
| | | android:padding="0dp" |
| | | android:text="¥28" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="23sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_actual_price2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:padding="0dp" |
| | | android:text="" |
| | | android:textColor="#ffff2b4b" |
| | | android:textSize="13sp" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | |
| | | android:minHeight="4dp" |
| | | android:progressDrawable="@drawable/bg_fast_scroll_bar_track" |
| | | android:thumb="@drawable/bg_fast_scroll_bar_thumb" |
| | | android:visibility="gone" /> |
| | | android:visibility="visible" /> |
| | | </LinearLayout> |
| | | |
| | | |
| | |
| | | android:layout_marginTop="1dp" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:text="正在加载更多数据" |
| | | android:text="@string/loading_more_text" |
| | | android:textSize="12sp"></TextView> |
| | | </LinearLayout> |
| | | |
| | |
| | | android:layout_marginTop="1dp" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:text="正在加载更多数据" |
| | | android:text="@string/loading_more_text" |
| | | android:textSize="12sp" /> |
| | | </LinearLayout> |
| | | |
| | |
| | | android:layout_marginTop="1dp" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:text="正在加载更多数据" |
| | | android:text="@string/loading_more_text" |
| | | android:textSize="12sp"></TextView> |
| | | </LinearLayout> |
| | | |
| | |
| | | <string name="official_fuli">特价官方福利</string> |
| | | |
| | | |
| | | |
| | | <string name="loading_more_text">正在加载数据</string> |
| | | |
| | | |
| | | |