Commit 8007897c authored by fallenstardust's avatar fallenstardust

recycleerview 懒加载卡包展示列表

parent a374a73c
......@@ -77,7 +77,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
//item是deckFile类型
this.deckFile = (DeckFile) item;
holder.deckName.setText(item.getName());
if (!deckFile.getTypeName().equals(YGOUtil.s(R.string.category_pack))) {
//if (!deckFile.getTypeName().equals(YGOUtil.s(R.string.category_pack))) {
//预读卡组信息
this.deckInfo = mDeckLoader.readDeck(mCardLoader, deckFile.getPathFile(), mLimitList);
//加载卡组第一张卡的图
......@@ -145,10 +145,10 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
}
}
}
} else {
holder.deck_info.setVisibility(View.GONE);
holder.cardImage.setVisibility(View.GONE);
}
//} else {
// holder.deck_info.setVisibility(View.GONE);
// holder.cardImage.setVisibility(View.GONE);
//}
//多选
if (isManySelect) {
if (selectList.contains(item))
......
......@@ -82,6 +82,7 @@ import ocgcore.data.Card;
public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListener, View.OnClickListener {
private static final String TAG = "HomeFragment";
public static final int ID_HOMEFRAGMENT = 0;
private DuelAssistantManagement duelAssistantManagement;
private HomeActivity activity;
......@@ -277,7 +278,7 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
* ServerUtil获取到版本状态后会通过eventmessage通知调用本函数,不需要在主函数显式调用
*/
public void changeExCardNewMark() {
Log.i("webCrawler", "check excard new mark, version:" + ServerUtil.exCardState);
Log.i(TAG, "check excard new mark, version:" + ServerUtil.exCardState);
if (ServerUtil.exCardState == ServerUtil.ExCardState.UPDATED) {
ll_new_notice.setVisibility(View.GONE);
} else if (ServerUtil.exCardState == ServerUtil.ExCardState.NEED_UPDATE) {
......
......@@ -190,7 +190,6 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
@Override
protected Integer doInBackground(Void... params) {
if (Constants.DEBUG)
Log.d(TAG, "check start");
boolean needsUpdate = isNewVersion;
//清空下载缓存
......@@ -296,10 +295,8 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
han.sendEmptyMessage(0);
loadData();
} catch (
Exception e) {
if (Constants.DEBUG)
Log.e(TAG, "check", e);
} catch (Exception e) {
Log.e(TAG, "ERROR COPY", e);
return ERROR_COPY;
}
return ERROR_NONE;
......
......@@ -125,44 +125,28 @@
</LinearLayout>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
android:orientation="horizontal"
android:weightSum="3">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_type"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:nestedScrollingEnabled="true" />
android:layout_weight="1" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/holo_blue_light" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_deck"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:nestedScrollingEnabled="true" />
</LinearLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
\ No newline at end of file
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