这是我的代码...
@Override
public void onBindViewHolder(final CouponDealsAdapter.ViewHolder holder, final int position) {
if (TextUtils.isEmpty(couponDeals.get(position).getStore_name())) {
holder.store_name.setText("Not Available");
} else {
holder.store_name.setText(couponDeals.get(position).getStore_name());
}
现在我要实现这样的逻辑。
if (store_name == "Flipkart") {
Load image from firebase storage .. image url and set image into imageView} using Glide...
I tried something like this.
if (TextUtils.isEmpty(couponDeals.get(position).getStore_image())) {
holder.store_name == "Flipakrt" {
}
}
但是它显示了一个错误。
该怎么做?
我可以将此逻辑应用于switch语句吗?怎样申请?