Commit 6871b826 authored by qq247321453's avatar qq247321453

token隐藏add

parent bf6d801c
...@@ -92,6 +92,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -92,6 +92,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private Button btn_redownload; private Button btn_redownload;
private Button btn_share; private Button btn_share;
private boolean isDownloadCardImage = true; private boolean isDownloadCardImage = true;
private boolean mShowAdd = false;
@SuppressLint("HandlerLeak") @SuppressLint("HandlerLeak")
Handler handler = new Handler() { Handler handler = new Handler() {
...@@ -216,6 +217,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -216,6 +217,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
} }
public void showAdd() { public void showAdd() {
mShowAdd = true;
addSide.setVisibility(View.VISIBLE); addSide.setVisibility(View.VISIBLE);
addMain.setVisibility(View.VISIBLE); addMain.setVisibility(View.VISIBLE);
} }
...@@ -267,7 +269,15 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -267,7 +269,15 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
name.setText(cardInfo.Name); name.setText(cardInfo.Name);
desc.setText(cardInfo.Desc); desc.setText(cardInfo.Desc);
cardCode.setText(String.format("%08d", cardInfo.getCode())); cardCode.setText(String.format("%08d", cardInfo.getCode()));
if(mShowAdd) {
if (cardInfo.isType(CardType.Token)) {
addSide.setVisibility(View.INVISIBLE);
addMain.setVisibility(View.INVISIBLE);
} else {
addSide.setVisibility(View.VISIBLE);
addMain.setVisibility(View.VISIBLE);
}
}
//按是否存在于收藏夹切换显示图标 //按是否存在于收藏夹切换显示图标
mImageFav.setSelected(CardFavorites.get().hasCard(cardInfo.Code)); mImageFav.setSelected(CardFavorites.get().hasCard(cardInfo.Code));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment