Commit 247adf4e authored by feihuaduo's avatar feihuaduo

修复卡组文件打开列表没有ygomobile的问题

parent c5ec8e32
......@@ -86,6 +86,7 @@
<data android:scheme="file"/>
<data android:host="*"/>
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.ydk"/>
</intent-filter>
<intent-filter>
......@@ -94,8 +95,10 @@
<data android:scheme="content"/>
<data android:host="*"/>
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.ydk"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
......
......@@ -10,6 +10,7 @@ import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import java.io.File;
import java.util.ArrayList;
......@@ -537,6 +538,7 @@ public class DeckAdapater extends RecyclerView.Adapter<DeckViewHolder> implement
holder.setItemType(item.getType());
if (item.getType() == DeckItemType.MainLabel || item.getType() == DeckItemType.SideLabel
|| item.getType() == DeckItemType.ExtraLabel) {
//分隔栏
if (item.getType() == DeckItemType.MainLabel) {
holder.setText(getMainString());
} else if (item.getType() == DeckItemType.SideLabel) {
......@@ -558,13 +560,25 @@ public class DeckAdapater extends RecyclerView.Adapter<DeckViewHolder> implement
// Log.i("kk", "w=" + mWidth + ",h=" + mHeight);
}
// holder.cardImage.setLayoutParams(new RelativeLayout.LayoutParams(holder.cardImage.getMeasuredWidth(), mHeight));
//显示卡片
holder.showImage();
holder.setSize(mHeight);
if (item.getType() == DeckItemType.Space) {
//占位但是不显示卡图
holder.setCardType(0);
holder.showEmpty();
} else {
Card cardInfo = item.getCardInfo();
// holder.cardImage.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// if(cardInfo!=null)
// Toast.makeText(context,"不为空点击"+cardInfo.Name,Toast.LENGTH_SHORT).show();
// else
// Toast.makeText(context,"空点击"+position,Toast.LENGTH_SHORT).show();
// }
// });
if (cardInfo != null) {
holder.setCardType(cardInfo.Type);
if (mImageTop == null) {
......
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