package com.tejia.lijin.app.ui.BrandRebate;
|
|
import android.content.Context;
|
import android.content.Intent;
|
import android.content.SharedPreferences;
|
import android.graphics.Color;
|
import android.graphics.drawable.AnimationDrawable;
|
import android.graphics.drawable.GradientDrawable;
|
import android.os.Bundle;
|
import androidx.viewpager.widget.PagerAdapter;
|
import androidx.viewpager.widget.ViewPager;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
import androidx.appcompat.widget.LinearLayoutCompat;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.RecyclerView;
|
import android.view.LayoutInflater;
|
import android.view.View;
|
import android.view.ViewGroup;
|
import android.widget.ImageView;
|
import android.widget.LinearLayout;
|
import android.widget.TextView;
|
|
import com.app.hubert.guide.util.ScreenUtils;
|
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
import com.google.gson.Gson;
|
import com.google.gson.GsonBuilder;
|
import com.google.gson.reflect.TypeToken;
|
import com.tejia.lijin.app.util.user.UserUtil;
|
import com.viewpagerindicator.LinePageIndicator;
|
import com.wpc.library.okhttp.OkHttpUtils;
|
import com.wpc.library.util.SystemCommon;
|
import com.wpc.library.util.common.DimenUtils;
|
import com.wpc.library.util.common.StringUtils;
|
import com.wpc.library.widget.RatioLayout;
|
import com.tejia.lijin.app.BasicTextHttpResponseHandler;
|
import com.tejia.lijin.app.R;
|
import com.tejia.lijin.app.ShoppingApi;
|
import com.tejia.lijin.app.ShoppingApplication;
|
import com.tejia.lijin.app.entity.HomeBanner;
|
import com.tejia.lijin.app.entity.PushEventData;
|
import com.tejia.lijin.app.entity.TaoBaoGoodsBrief;
|
import com.tejia.lijin.app.ui.BaseActivity;
|
import com.tejia.lijin.app.ui.category.CategoryAdapter2;
|
import com.tejia.lijin.app.ui.invite.ShareBrowserActivity;
|
import com.tejia.lijin.app.ui.jdSpecial.JdSpecialTopAdapter;
|
import com.tejia.lijin.app.util.GlideCircleTransform;
|
import com.tejia.lijin.app.util.ToolUtil;
|
import com.tejia.lijin.app.util.TopStatusSettings;
|
import com.tejia.lijin.app.util.ui.ColorUtil;
|
import com.tejia.lijin.app.util.umengCustomEvent.BrandRebateEvent;
|
|
import org.apache.http.Header;
|
import org.json.JSONArray;
|
import org.json.JSONObject;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
|
|
/**
|
* 品牌店铺信息
|
*/
|
public class BrandInfoActivity extends BaseActivity implements View.OnClickListener {
|
private TextView tv_middle, tv_top_bar_left;
|
private SwipeRefreshLayout activity_braninfo_sr;//下拉刷新
|
private RecyclerView activity_braninfo_rv;
|
private RatioLayout brandinfo_topbanner;//广告banner
|
private ViewPager brandinfo_recommend;//banner viewpage
|
private LinePageIndicator indicator_recommend;//banner指示器
|
private JdSpecialTopAdapter bannerAdapter;
|
private List<HomeBanner> mBanners = new ArrayList<>();
|
|
private LinearLayoutCompat braninfo_Shopone;//店铺一
|
private LinearLayoutCompat braninfo_Shoptwo;//店铺二
|
private LinearLayoutCompat braninfo_Shopthree;//店铺三
|
private TextView braninfo_top_store;//进店
|
private TextView braninfo_top_store2;//进店
|
private TextView braninfo_top_store3;//进店
|
private ImageView braninfo_top_img;//店铺头像
|
private TextView braninfo_top_sellerNick;//店铺名字
|
private TextView braninfo_top_userType;//店鋪類型
|
private ImageView braninfo_top_img2;//店铺头像
|
private TextView braninfo_top_sellerNick2;//店铺名字
|
private TextView braninfo_top_userType2;//店鋪類型
|
private ImageView braninfo_top_img3;//店铺头像
|
private TextView braninfo_top_sellerNick3;//店铺名字
|
private TextView braninfo_top_userType3;//店鋪類型
|
|
private LinearLayout ll_go_scan;//无商品
|
private CategoryAdapter2 adapter;//淘宝商品适配
|
private List<TaoBaoGoodsBrief> mList = new ArrayList<>();
|
private String shopLink = null;//店铺链接
|
private String shopLink2 = null;//店铺链接
|
private String shopLink3 = null;//店铺链接
|
|
private View bottom;
|
private TextView tv_loading;
|
private ImageView iv_loading;
|
private ImageView ll_go_scan2img;//缺省页
|
private TextView ll_go_scan2txt;//缺省页提示
|
private int page = 1;
|
private boolean isLoad = true;
|
private int count = 1;
|
|
private String tag1 = "brand/getShopInfo";
|
|
@Override
|
protected void onCreate(Bundle savedInstanceState) {
|
ToolUtil.setCustomDensity(this, ShoppingApplication.application);
|
super.onCreate(savedInstanceState);
|
setContentView(R.layout.activity_braninfo);
|
TopStatusSettings.setStatusViewAndDeepColor(this);// 计算状态栏高度并设置
|
inint();//初始化控件
|
|
// tv_middle.setText("品牌返利");
|
activity_braninfo_rv.setLayoutManager(new LinearLayoutManager(this));
|
|
View top_view = LayoutInflater.from(this).inflate(R.layout.item_braninfo_top, null);
|
//banner
|
brandinfo_topbanner = top_view.findViewById(R.id.brandinfo_topbanner);
|
brandinfo_recommend = top_view.findViewById(R.id.brandinfo_recommend);
|
indicator_recommend = top_view.findViewById(R.id.brandinfo_indicator_recommend);
|
//店铺布局
|
|
braninfo_Shopone = top_view.findViewById(R.id.braninfo_Shopone);
|
braninfo_Shoptwo = top_view.findViewById(R.id.braninfo_Shoptwo);
|
braninfo_Shopthree = top_view.findViewById(R.id.braninfo_Shopthree);
|
braninfo_top_img = top_view.findViewById(R.id.braninfo_top_img);
|
braninfo_top_sellerNick = top_view.findViewById(R.id.braninfo_top_sellerNick);
|
braninfo_top_userType = top_view.findViewById(R.id.braninfo_top_userType);
|
braninfo_top_store = top_view.findViewById(R.id.braninfo_top_store);
|
braninfo_top_img2 = top_view.findViewById(R.id.braninfo_top_img2);
|
braninfo_top_sellerNick2 = top_view.findViewById(R.id.braninfo_top_sellerNick2);
|
braninfo_top_userType2 = top_view.findViewById(R.id.braninfo_top_userType2);
|
braninfo_top_store2 = top_view.findViewById(R.id.braninfo_top_store2);
|
braninfo_top_img3 = top_view.findViewById(R.id.braninfo_top_img3);
|
braninfo_top_sellerNick3 = top_view.findViewById(R.id.braninfo_top_sellerNick3);
|
braninfo_top_userType3 = top_view.findViewById(R.id.braninfo_top_userType3);
|
braninfo_top_store3 = top_view.findViewById(R.id.braninfo_top_store3);
|
// braninfo_top_good = top_view.findViewById(R.id.braninfo_top_good);
|
braninfo_top_store.setOnClickListener(this);//店铺进店一
|
braninfo_top_store2.setOnClickListener(this);//店铺进店二
|
braninfo_top_store3.setOnClickListener(this);//店铺进店三
|
adapter = new CategoryAdapter2(this, mList, null, "search");
|
activity_braninfo_rv.setAdapter(adapter);
|
// adapter.isHorizontal = true;
|
|
bottom = LayoutInflater.from(this).inflate(R.layout.item_recyclerview_bottom2, null);
|
tv_loading = bottom.findViewById(R.id.tv_loading2);
|
iv_loading = bottom.findViewById(R.id.iv_loading2);
|
ll_go_scan = bottom.findViewById(R.id.ll_go_scan2);
|
ll_go_scan2img = bottom.findViewById(R.id.ll_go_scan2img);
|
ll_go_scan2txt = bottom.findViewById(R.id.ll_go_scan2txt);
|
AnimationDrawable animationDrawable = (AnimationDrawable) getResources().getDrawable(R.drawable.anim_list_loading);
|
iv_loading.setImageDrawable(animationDrawable);
|
animationDrawable.start();
|
bottom.setVisibility(View.GONE);
|
adapter.addHeaderView(top_view);
|
adapter.addFooterView(bottom);
|
getShopInfo(getIntent().getStringExtra("sid"));
|
//banner
|
bannerAdapter = new JdSpecialTopAdapter(mBanners, this);
|
brandinfo_recommend.setAdapter(bannerAdapter);
|
indicator_recommend.setViewPager(brandinfo_recommend);
|
OnClickListener();//註冊单击事件
|
}
|
|
|
/**
|
* 註冊单击事件
|
*/
|
private void OnClickListener() {
|
tv_top_bar_left.setOnClickListener(this);
|
activity_braninfo_rv.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
@Override
|
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
super.onScrollStateChanged(recyclerView, newState);
|
LinearLayoutManager manager = (LinearLayoutManager) recyclerView.getLayoutManager();
|
int first = manager.findFirstVisibleItemPosition();
|
int last = manager.findLastVisibleItemPosition();
|
int total = manager.getItemCount();
|
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
|
// if (mList != null && last == total - 1 && mList.size() < count && isLoad && mList.size() != 0) {
|
if (last == total - 1 && mList.size() < count && isLoad) {
|
page++;
|
isLoad = false;
|
tv_loading.setText(getResources().getString(R.string.loading_more_text));
|
iv_loading.setVisibility(View.VISIBLE);
|
getShopInfo(getIntent().getStringExtra("sid"));
|
}
|
}
|
}
|
});
|
//viewpager 轮播滚动
|
brandinfo_recommend.postDelayed(mAutoScroller, 2000);
|
tv_middle.setText(getIntent().getStringExtra("shopname"));
|
}
|
|
private Runnable mAutoScroller = new Runnable() {
|
|
@Override
|
public void run() {
|
PagerAdapter adapter = brandinfo_recommend.getAdapter();
|
if (adapter != null && adapter.getCount() != 0) {
|
brandinfo_recommend.setCurrentItem((brandinfo_recommend.getCurrentItem() + 1)
|
% adapter.getCount(), true);
|
}
|
brandinfo_recommend.postDelayed(this, 5000);
|
}
|
};
|
|
//防止重复刷新
|
private boolean refresh1 = true;//
|
|
/**
|
* 初始化控件
|
*/
|
private void inint() {
|
tv_middle = findViewById(R.id.tv_top_bar_middle);
|
tv_top_bar_left = findViewById(R.id.tv_top_bar_left);
|
activity_braninfo_sr = findViewById(R.id.activity_braninfo_sr);
|
activity_braninfo_rv = findViewById(R.id.activity_braninfo_rv);
|
if (activity_braninfo_sr != null) {
|
// fragment_brand_fragment_sf.setRefreshing(true);
|
activity_braninfo_sr.setColorSchemeColors(getResources().getColor(R.color.theme));
|
activity_braninfo_sr.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
@Override
|
public void onRefresh() {
|
if (refresh1) {
|
page = 1;
|
getShopInfo(getIntent().getStringExtra("sid"));
|
}
|
}
|
});
|
}
|
}
|
|
@Override
|
public void onClick(View v) {
|
switch (v.getId()) {
|
//j返回
|
case R.id.tv_top_bar_left:
|
finish();
|
break;
|
case R.id.braninfo_top_store://进店
|
if (shopLink != null) {
|
BrandRebateEvent.brandintoshop(this);//品牌-进店
|
Intent intent = new Intent(this, ShareBrowserActivity.class);
|
intent.putExtra("url", shopLink);
|
intent.putExtra("title", braninfo_top_sellerNick.getText().toString());
|
startActivity(intent);
|
PushEventData info = new PushEventData();
|
info.setShopUrl(shopLink);
|
Gson gson = new GsonBuilder().serializeNulls().create();
|
String data = gson.toJson(info);
|
}
|
break;
|
case R.id.braninfo_top_store2://进店
|
if (shopLink2 != null) {
|
BrandRebateEvent.brandintoshop(this);//品牌-进店
|
Intent intent = new Intent(this, ShareBrowserActivity.class);
|
intent.putExtra("url", shopLink2);
|
intent.putExtra("title", braninfo_top_sellerNick2.getText().toString());
|
startActivity(intent);
|
PushEventData info = new PushEventData();
|
info.setShopUrl(shopLink2);
|
Gson gson = new GsonBuilder().serializeNulls().create();
|
String data = gson.toJson(info);
|
}
|
break;
|
case R.id.braninfo_top_store3://进店
|
if (shopLink3 != null) {
|
BrandRebateEvent.brandintoshop(this);//品牌-进店
|
Intent intent = new Intent(this, ShareBrowserActivity.class);
|
intent.putExtra("url", shopLink3);
|
intent.putExtra("title", braninfo_top_sellerNick3.getText().toString());
|
startActivity(intent);
|
PushEventData info = new PushEventData();
|
info.setShopUrl(shopLink3);
|
Gson gson = new GsonBuilder().serializeNulls().create();
|
String data = gson.toJson(info);
|
}
|
break;
|
default:
|
break;
|
}
|
}
|
|
/**
|
* 获取品牌店铺详情
|
*
|
* @param id 店铺ID
|
*/
|
private void getShopInfo(String id) {
|
refresh1 = false;
|
SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE);
|
ShoppingApi.getShopInfo(this, page + "", id, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() {
|
@Override
|
public void onStart() {
|
super.onStart();
|
if (page > 1) {
|
bottom.setVisibility(View.VISIBLE);
|
} else {
|
bottom.setVisibility(View.GONE);
|
}
|
}
|
|
@Override
|
public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception {
|
if (jsonObject.optInt("code") == 0) {
|
JSONArray shop = jsonObject.optJSONObject("data").optJSONArray("shopList");
|
if (page == 1) {
|
setBanner(jsonObject.optJSONObject("data").optJSONArray("picList"));//Banner
|
}
|
if (shop != null && shop.length() > 0) {
|
if (shop.length() >= 1) {//店铺一
|
braninfo_Shopone.setVisibility(View.VISIBLE);
|
JSONObject mshop = (JSONObject) shop.get(0);
|
braninfo_top_sellerNick.setText(mshop.optString("shopName"));//title标题
|
setTopimg(BrandInfoActivity.this, mshop.optString("shopIcon"), braninfo_top_img);
|
String show[] = showImageFace(mshop.optInt("userType"));
|
setShape(4, show[0], show[0], show[1], braninfo_top_userType);
|
setShape(100,ColorUtil.getHexString(getResources().getColor(R.color.theme)), ColorUtil.getHexString(getResources().getColor(R.color.theme)), "进店", braninfo_top_store);
|
shopLink = mshop.getString("shopLink");
|
}
|
if (shop.length() >= 2) {//店铺二
|
braninfo_Shoptwo.setVisibility(View.VISIBLE);
|
JSONObject mshop = (JSONObject) shop.get(1);
|
braninfo_top_sellerNick2.setText(mshop.optString("shopName"));
|
setTopimg(BrandInfoActivity.this, mshop.optString("shopIcon"), braninfo_top_img2);
|
String show[] = showImageFace(mshop.optInt("userType"));
|
setShape(4, show[0], show[0], show[1], braninfo_top_userType2);
|
setShape(100, ColorUtil.getHexString(getResources().getColor(R.color.theme)), ColorUtil.getHexString(getResources().getColor(R.color.theme)), "进店", braninfo_top_store2);
|
shopLink2 = mshop.getString("shopLink");
|
}
|
if (shop.length() == 3) {//店铺三
|
braninfo_Shopthree.setVisibility(View.VISIBLE);
|
JSONObject mshop = (JSONObject) shop.get(2);
|
braninfo_top_sellerNick3.setText(mshop.optString("shopName"));
|
setTopimg(BrandInfoActivity.this, mshop.optString("shopIcon"), braninfo_top_img3);
|
String show[] = showImageFace(mshop.optInt("userType"));
|
setShape(4, show[0], show[0], show[1], braninfo_top_userType3);
|
setShape(100, ColorUtil.getHexString(getResources().getColor(R.color.theme)), ColorUtil.getHexString(getResources().getColor(R.color.theme)), "进店", braninfo_top_store3);
|
shopLink3 = mshop.getString("shopLink");
|
}
|
} else {
|
braninfo_Shopone.setVisibility(View.GONE);
|
braninfo_Shoptwo.setVisibility(View.GONE);
|
braninfo_Shopthree.setVisibility(View.GONE);
|
}
|
|
// Log.e("eee", "onSuccessPerfect: ");
|
// braninfo_top_good.setText("店铺好评率" + shop.optString("goodRatePercentage") + "%");
|
Gson gson = new GsonBuilder().serializeNulls().create();
|
List<TaoBaoGoodsBrief> list = gson.fromJson(jsonObject.optJSONObject("data").
|
optJSONArray("list").toString(), new TypeToken<List<TaoBaoGoodsBrief>>() {
|
}.getType());
|
if (page == 1) {
|
mList.clear();
|
}
|
if (list.size() > 0) {
|
mList.addAll(list);
|
}
|
|
if (mList.size() >= count && mList.size() > 2) {
|
bottom.setVisibility(View.VISIBLE);
|
iv_loading.setVisibility(View.GONE);
|
ll_go_scan.setVisibility(View.GONE);
|
tv_loading.setText(getResources().getString(R.string.list_no_more));
|
} else {
|
if (jsonObject.optJSONObject("data").optJSONArray("picList").toString().equals("[]") &&
|
jsonObject.optJSONObject("data").optJSONArray("shopList").toString().equals("[]") &&
|
jsonObject.optJSONObject("data").optJSONArray("list").toString().equals("[]")) {
|
bottom.setVisibility(View.VISIBLE);
|
ll_go_scan.setVisibility(View.VISIBLE);
|
brandinfo_topbanner.setVisibility(View.GONE);
|
ViewGroup.LayoutParams linearParams = (ViewGroup.LayoutParams) ll_go_scan.getLayoutParams(); //取控件textView当前的布局参数 linearParams.height = 20;// 控件的高强制设成20
|
linearParams.height = (int) (SystemCommon.getScreenHeight(BrandInfoActivity.this) - 350);// 控件的宽强制设成30
|
ll_go_scan.setLayoutParams(linearParams); //使设置好的布局参数应用到控件
|
ll_go_scan2img.setImageDrawable(null);
|
ll_go_scan2img.setBackground(BrandInfoActivity.this.getResources().getDrawable(R.drawable.ic_no_ticket2));
|
ll_go_scan2txt.setText("这个品牌太懒了忘记给大家优惠券了~");
|
ll_go_scan2txt.setTextColor(Color.parseColor("#333333"));
|
ll_go_scan.setBackgroundColor(Color.parseColor("#F3F3F3"));
|
}
|
//返回的数据为空
|
else if (StringUtils.isEmpty(jsonObject.getJSONObject("data").optJSONArray("list").toString())
|
|| jsonObject.getJSONObject("data").optJSONArray("list").toString().equals("[]")) {
|
bottom.setVisibility(View.VISIBLE);
|
ll_go_scan.setVisibility(View.VISIBLE);
|
ViewGroup.LayoutParams linearParams = (ViewGroup.LayoutParams) ll_go_scan.getLayoutParams(); //取控件textView当前的布局参数 linearParams.height = 20;// 控件的高强制设成20
|
linearParams.height = ScreenUtils.dp2px(BrandInfoActivity.this, 380);// 控件的宽强制设成30
|
ll_go_scan.setLayoutParams(linearParams); //使设置好的布局参数应用到控件
|
ll_go_scan2img.setImageDrawable(null);
|
ll_go_scan2img.setBackground(BrandInfoActivity.this.getResources().getDrawable(R.drawable.ic_no_ticket2));
|
ll_go_scan2txt.setText("这个品牌太懒了忘记给大家优惠券了~");
|
ll_go_scan2txt.setTextColor(Color.parseColor("#333333"));
|
ll_go_scan.setBackgroundColor(Color.parseColor("#F3F3F3"));
|
} else if (bottom.getVisibility() == View.VISIBLE) {
|
bottom.setVisibility(View.GONE);
|
}
|
adapter.notifyDataSetChanged();
|
}
|
|
} else {
|
bottom.setVisibility(View.VISIBLE);
|
ll_go_scan.setVisibility(View.VISIBLE);
|
}
|
}
|
|
@Override
|
public void onFinish() {
|
super.onFinish();
|
isLoad = true;
|
refresh1 = true;
|
activity_braninfo_sr.setRefreshing(false);
|
}
|
|
@Override
|
public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) {
|
super.onFailure(statusCode, headers, jsonObject, e);
|
refresh1 = true;
|
activity_braninfo_sr.setRefreshing(false);
|
}
|
});
|
}
|
|
/**
|
* 设置Banner
|
*
|
* @param picList
|
*/
|
private void setBanner(JSONArray picList) {
|
//顶部banner
|
Gson gson = new GsonBuilder().serializeNulls().create();
|
List<HomeBanner> list1 = null;
|
if (picList != null) {
|
list1 = gson.fromJson(picList.toString(), new TypeToken<List<HomeBanner>>() {
|
}.getType());
|
float width = SystemCommon.getScreenWidth(this);
|
indicator_recommend.setLineWidth((width - (DimenUtils.dip2px(this, 30))) / list1.size());
|
indicator_recommend.setGapWidth(0);
|
indicator_recommend.setSelectedColor(this.getResources().getColor(R.color.white));
|
indicator_recommend.setUnselectedColor(this.getResources().getColor(R.color.transport_white3));
|
indicator_recommend.setStrokeWidth(DimenUtils.dip2px(this, 2));
|
}
|
if (list1 == null || list1.size() == 0) {
|
brandinfo_topbanner.setVisibility(View.GONE);
|
} else {
|
if (page == 1) {
|
brandinfo_topbanner.setVisibility(View.VISIBLE);
|
mBanners.clear();
|
mBanners.addAll(list1);
|
bannerAdapter.notifyDataSetChanged();
|
}
|
if (mBanners.size() == 1) {
|
indicator_recommend.setVisibility(View.GONE);
|
}
|
}
|
}
|
|
/**
|
* 设置店铺头像
|
*
|
* @param brandInfoActivity
|
* @param shopIcon
|
* @param braninfo_top_img
|
*/
|
private void setTopimg(Context brandInfoActivity, String shopIcon, ImageView braninfo_top_img) {
|
Glide.with(brandInfoActivity)
|
.load(shopIcon)
|
.transform(new GlideCircleTransform(brandInfoActivity))
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)//保存最终图片
|
.into(braninfo_top_img);
|
}
|
|
/**
|
* 设置 Shaped
|
*
|
* @param radius
|
* @param stroke
|
* @param textcolor
|
* @param text
|
* @param view
|
*/
|
private void setShape(int radius, String stroke, String textcolor, String text, TextView view) {
|
//动态改变shape
|
GradientDrawable shape = new GradientDrawable();
|
shape.setCornerRadius(ScreenUtils.dp2px(braninfo_top_img.getContext(), radius));//4
|
//设置颜色
|
shape.setStroke(ScreenUtils.dp2px(braninfo_top_img.getContext(), 1), Color.parseColor(stroke));//"#ffe5005c"
|
view.setBackground(shape);
|
view.setText(text);//"并夕夕"
|
view.setTextColor(Color.parseColor(textcolor));//"#fff50008"
|
}
|
|
/**
|
* 判断淘宝京东拼多多
|
*
|
* @param shop
|
*/
|
private String[] showImageFace(int shop) {
|
String str[] = new String[2];
|
// 创建一个SpannableString对象,以便插入用ImageSpan对象封装的图像
|
if (shop == 10) {//淘宝
|
// tv.setBackground(getResources().getDrawable(R.drawable.ic_tmall));
|
str[0] = "#FF6A05";
|
str[1] = "淘宝";
|
} else if (shop == 11) {//天猫
|
str[0] = "#FF0036";
|
str[1] = "天猫";
|
} else if (shop == 20 || shop == 21) {//京东
|
str[0] = "#E42219";
|
str[1] = "京东";
|
} else {// (shop == 30)拼多多
|
str[0] = "#F50008";
|
str[1] = "拼多多";
|
}
|
return str;
|
}
|
|
@Override
|
protected void onDestroy() {
|
super.onDestroy();
|
ll_go_scan = null;
|
adapter = null;//淘宝商品适配
|
mList = null;
|
bottom = null;
|
|
shopLink = null;//店铺链接
|
tv_loading = null;
|
iv_loading = null;
|
page = 0;
|
isLoad = false;
|
count = 0;
|
if (brandinfo_recommend != null) {
|
brandinfo_recommend.removeCallbacks(mAutoScroller);
|
}
|
OkHttpUtils.getInstance().cancelTag(tag1);
|
}
|
}
|