Commit 99af8fc1 authored by fallenstardust's avatar fallenstardust

tweak

parent 4195bbfa
...@@ -69,6 +69,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -69,6 +69,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private final TextView attrView; private final TextView attrView;
private final View monsterLayout; private final View monsterLayout;
private final View close; private final View close;
private final View faq;
private final View addMain; private final View addMain;
private final View addSide; private final View addSide;
private final View linkArrow; private final View linkArrow;
...@@ -107,7 +108,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -107,7 +108,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
ll_bar.setVisibility(View.GONE); ll_bar.setVisibility(View.GONE);
imageLoader.bindImage(photoView, msg.arg1, ImageLoader.Type.origin); imageLoader.bindImage(photoView, msg.arg1, ImageLoader.Type.origin);
imageLoader.bindImage(cardImage, msg.arg1, ImageLoader.Type.middle); imageLoader.bindImage(cardImage, msg.arg1, ImageLoader.Type.middle);
if(mListener != null){ if (mListener != null) {
mListener.onImageUpdate(mCardInfo); mListener.onImageUpdate(mCardInfo);
} }
break; break;
...@@ -141,7 +142,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -141,7 +142,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
level = findViewById(R.id.card_level); level = findViewById(R.id.card_level);
linkArrow = findViewById(R.id.detail_link_arrows); linkArrow = findViewById(R.id.detail_link_arrows);
type = findViewById(R.id.card_type); type = findViewById(R.id.card_type);
View faq = findViewById(R.id.btn_faq); faq = findViewById(R.id.btn_faq);
cardAtk = findViewById(R.id.card_atk); cardAtk = findViewById(R.id.card_atk);
cardDef = findViewById(R.id.card_def); cardDef = findViewById(R.id.card_def);
atkdefView = findViewById(R.id.layout_atkdef2); atkdefView = findViewById(R.id.layout_atkdef2);
...@@ -207,7 +208,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -207,7 +208,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
public void doMyFavorites(Card cardInfo) { public void doMyFavorites(Card cardInfo) {
boolean ret = CardFavorites.get().toggle(cardInfo.Code); boolean ret = CardFavorites.get().toggle(cardInfo.Code);
mImageFav.setSelected(ret); mImageFav.setSelected(ret);
if(mCallBack != null){ if (mCallBack != null) {
mCallBack.onFavoriteChange(cardInfo, ret); mCallBack.onFavoriteChange(cardInfo, ret);
} }
} }
...@@ -273,7 +274,12 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -273,7 +274,12 @@ 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)) {
faq.setVisibility(View.INVISIBLE);
} else {
faq.setVisibility(View.VISIBLE);
}
if (mShowAdd) {
if (cardInfo.isType(CardType.Token)) { if (cardInfo.isType(CardType.Token)) {
addSide.setVisibility(View.INVISIBLE); addSide.setVisibility(View.INVISIBLE);
addMain.setVisibility(View.INVISIBLE); addMain.setVisibility(View.INVISIBLE);
...@@ -435,7 +441,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder { ...@@ -435,7 +441,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
File imgFile = new File(AppsSettings.get().getCardImagePath(code)); File imgFile = new File(AppsSettings.get().getCardImagePath(code));
final File tmp = new File(imgFile.getAbsolutePath() + ".tmp"); final File tmp = new File(imgFile.getAbsolutePath() + ".tmp");
if (tmp.exists()) { if (tmp.exists()) {
if(force){ if (force) {
//强制下载,就删除tmp,重新下载 //强制下载,就删除tmp,重新下载
FileUtils.deleteFile(tmp); FileUtils.deleteFile(tmp);
//删除原来卡图 //删除原来卡图
......
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