Commit 7afcada0 authored by wangfugui's avatar wangfugui

删除旧版本:本地卡组列表中显示在线卡组

parent e3fab5c8
上传新卡组调用api:
首先获得卡组id:
【get] http://rarnu.xyz:38383/api/mdpro3/deck/deckId
将获得的卡组id作为json body的一部分,上传到服务器:
http://rarnu.xyz:38383/api/mdpro3/sync/single
json body格式如下:
{
"deckContributor": "zhb_con",
"userId": 795610,
"deck": {
"deckId": "0007b1ad19",
"deckName": "zhb_test_deck2",
"deckCoverCard1": 0,
"deckCoverCard2": 0,
"deckCoverCard3": 0,
"deckCase": 0,
"deckProtector": 0,
"deckYdk": "#created by
mdpro3\r\n#main\r\n89943723\r\n89943724\r\n89943724\r\n79856792\r\n58153103\r\n83965310\r\n14124483\r\n13256226\r\n13256226\r\n9411399\r\n9411399\r\n18094166\r\n18094166\r\n40044918\r\n40044918\r\n59392529\r\n63060238\r\n50720316\r\n50720316\r\n27780618\r\n27780618\r\n16605586\r\n16605586\r\n43237273\r\n80344569\r\n22865492\r\n22865492\r\n17955766\r\n14558127\r\n14558127\r\n14558127\r\n23434538\r\n23434538\r\n23434538\r\n40740224\r\n6186304\r\n18144506\r\n213326\r\n213326\r\n8949584\r\n8949584\r\n10186633\r\n32807848\r\n21143940\r\n21143940\r\n80170678\r\n52947044\r\n45906428\r\n45906428\r\n24094653\r\n24094653\r\n14088859\r\n14088859\r\n24224830\r\n24224830\r\n65681983\r\n24299458\r\n75047173\r\n10045474\r\n75047173\r\n#extra\r\n90050480\r\n86346643\r\n31817415\r\n32828466\r\n40080312\r\n56733747\r\n29095552\r\n40854197\r\n46759931\r\n60461804\r\n93347961\r\n64655485\r\n22908820\r\n58481572\r\n58004362\r\n!
side\r\n27204311\r\n27204311\r\n83965311\r\n59438930\r\n59438930\r\n24508238\r\n24508238\r\n94145021\r\n94145021\r\n26964762\r\n90846359\r\n83326048\r\n83326048\r\n83326048\r\n#pickup\r\n#case\r\n1081008#\r\n#protector\r\n1070008#\r\n#field\r\n1090009#\r\n#grave\r\n1100009#\r\n#stand\r\n1110001#\r\n#mate\r\n1000007#\r\n##\r\n###",
"isDelete": false
}
}
注意:deckId字段为[get]方法获得的id,deckName字段对应于卡组名称,服务端会检查该字段,不允许同一卡组名称上传多次(如果第二次上传某个卡组名,会返回false,上传失败)
上传成功后,服务器响应为:
{
"code": 0,
"message": "",
"data": true
}
上传失败后,服务器响应为:
更新已在云上存在的卡组:
仍然用上述body,但是其中deckId、deckName必须与云上的记录严格对应。
示例:
[1]云上存在卡组deckId=111,deckName=双打水产。
上传json中,deckId=111,deckName=双打水产,代表更新云上的该卡组的内容。
[2]云上存在卡组deckId=111,deckName=双打水产,
上传json中,deckId=110,deckName=双打水产,服务端会返回错误,本次上传失败。
即,如果服务器上已存在卡组名称XXX,则再上传“卡组名为XXX,卡组id不同”的卡组,会返回错误
[3]云上存在卡组deckId=111,deckName=双打水产,
上传json中,deckId=111,deckName=双打水产B,代表更新卡组名称,本次上传成功。
总结:
将对应于deckId、deckName的卡组内容json推送到服务器。
如果在服务器上不存在deckId、deckName对应的记录,则创建新卡组
如果在服务器存在deckId相同的记录,则更新卡组,deckName会覆盖服务器上的卡组名
如果在服务器存在deckName相同、deckId不同的记录,则更新失败
\ No newline at end of file
......@@ -64,6 +64,22 @@ public class DeckManageDialog extends DialogFragment implements YGODeckDialogUti
@Override
public void onConfigureTab(@NonNull TabLayout.Tab tab, int position) {
tab.setText("Tab " + (position + 1));
switch (position) {
case 0:
tab.setText("本地卡组");
break;
case 1:
tab.setText("卡组广场");
break;
case 2:
tab.setText("我的在线卡组");
break;
case 3:
tab.setText("登录");
break;
}
}
}).attach();
}
......@@ -99,9 +115,9 @@ public class DeckManageDialog extends DialogFragment implements YGODeckDialogUti
case 0:
return new DeckSelectFragment(mOnDeckMenuListener, onDeckDialogListener);
case 1:
return new DeckSquareFragment();
return new DeckSquareFragment(mOnDeckMenuListener, onDeckDialogListener);
case 2:
return new DeckSquareMyDeckFragment();
return new DeckSquareMyDeckFragment(mOnDeckMenuListener, onDeckDialogListener);
case 3:
return new MCOnlineManageFragment();
default:
......
......@@ -34,10 +34,6 @@ import cn.garymb.ygomobile.AppsSettings;
import cn.garymb.ygomobile.Constants;
import cn.garymb.ygomobile.bean.DeckType;
import cn.garymb.ygomobile.bean.events.DeckFile;
import cn.garymb.ygomobile.deck_square.api_response.MyDeckResponse;
import cn.garymb.ygomobile.deck_square.api_response.MyOnlineDeckDetail;
import cn.garymb.ygomobile.deck_square.api_response.OnlineDeckDetail;
import cn.garymb.ygomobile.deck_square.api_response.SquareDeckResponse;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.lite.databinding.FragmentDeckSelectBinding;
import cn.garymb.ygomobile.ui.adapters.DeckListAdapter;
......@@ -45,16 +41,13 @@ import cn.garymb.ygomobile.ui.adapters.SimpleListAdapter;
import cn.garymb.ygomobile.ui.adapters.TextSelectAdapter;
import cn.garymb.ygomobile.ui.mycard.mcchat.util.ImageUtil;
import cn.garymb.ygomobile.ui.plus.DialogPlus;
import cn.garymb.ygomobile.ui.plus.VUiKit;
import cn.garymb.ygomobile.utils.DeckUtil;
import cn.garymb.ygomobile.utils.FileUtils;
import cn.garymb.ygomobile.utils.IOUtils;
import cn.garymb.ygomobile.utils.LogUtil;
import cn.garymb.ygomobile.utils.SharedPreferenceUtil;
import cn.garymb.ygomobile.utils.YGODeckDialogUtil;
import cn.garymb.ygomobile.utils.YGOUtil;
//卡组选择的Fragment,选择后在卡组编辑页面中显示卡片
//在dialog中卡组选择的Fragment,选中页面中某项后,在卡组编辑页面中显示卡片
public class DeckSelectFragment extends Fragment {
private FragmentDeckSelectBinding binding;
......@@ -70,9 +63,14 @@ public class DeckSelectFragment extends Fragment {
List<DeckType> typeList = null;
List<DeckFile> deckList = null; //存储当前卡组分类下的所有卡组
private YGODeckDialogUtil.OnDeckMenuListener onDeckMenuListener;
private YGODeckDialogUtil.OnDeckMenuListener onDeckMenuListener;//通知外部调用方,(如调用本fragment的activity)
private YGODeckDialogUtil.OnDeckDialogListener mDialogListener;
/**
*
* @param onDeckMenuListener 通知容纳dialog的外部页面,已选中了某项卡组
* @param dialogListener 通知容纳本fragment的dialog,调用dismiss()方法,关闭dialog显示
*/
DeckSelectFragment(YGODeckDialogUtil.OnDeckMenuListener onDeckMenuListener, YGODeckDialogUtil.OnDeckDialogListener dialogListener) {
super();
this.onDeckMenuListener = onDeckMenuListener;
......@@ -102,71 +100,21 @@ public class DeckSelectFragment extends Fragment {
public void onItemSelect(int position, DeckType item) {
clearDeckSelect();
deckList.clear();
if (item.getOnServer() == DeckType.ServerType.SQUARE_DECK) {
VUiKit.defer().when(() -> {
SquareDeckResponse result = DeckSquareApiUtil.getSquareDecks();
if (result == null) {
return null;
} else {
return result.getData().getRecords();
}
}).fail(e -> {
YGOUtil.showTextToast("Fetch square deck fail");
}).done(exCardDataList -> {
if (exCardDataList != null) {
LogUtil.i(TAG, "Get square deck success");
for (OnlineDeckDetail deckRecord : exCardDataList) {
DeckFile deckFile = new DeckFile(deckRecord.getDeckName(), "", DeckType.ServerType.SQUARE_DECK, deckRecord.getDeckId());
deckList.add(deckFile);
}
deckAdp.notifyDataSetChanged();
}
});
} else if (item.getOnServer() == DeckType.ServerType.MY_SQUARE) {
VUiKit.defer().when(() -> {
String serverToken = SharedPreferenceUtil.getServerToken();
Integer serverUserId = SharedPreferenceUtil.getServerUserId();
MyDeckResponse result = DeckSquareApiUtil.getUserDecks(serverUserId, serverToken);
if (result == null) {
return null;
} else {
return result.getData();
}
}).fail(e -> {
YGOUtil.showTextToast("Fetch square deck fail");
}).done(exCardDataList -> {
if (exCardDataList != null) {
LogUtil.i(TAG, "Get square deck success");
for (MyOnlineDeckDetail deckRecord : exCardDataList) {
DeckFile deckFile = new DeckFile(deckRecord.getDeckName(), "", DeckType.ServerType.MY_SQUARE, deckRecord.getDeckId());
deckList.add(deckFile);
}
deckAdp.notifyDataSetChanged();
}
});
} else {
deckList.addAll(DeckUtil.getDeckList(item.getPath()));
if (position == 0) {
if (AppsSettings.get().isReadExpansions()) {
try {
if (!DeckUtil.getExpansionsDeckList().isEmpty()) {
deckList.addAll(0, DeckUtil.getExpansionsDeckList());
}
} catch (IOException e) {
YGOUtil.showTextToast("额外卡库加载失败,原因为" + e);
deckList.addAll(DeckUtil.getDeckList(item.getPath()));
if (position == 0) {
if (AppsSettings.get().isReadExpansions()) {
try {
if (!DeckUtil.getExpansionsDeckList().isEmpty()) {
deckList.addAll(0, DeckUtil.getExpansionsDeckList());
}
} catch (IOException e) {
YGOUtil.showTextToast("额外卡库加载失败,原因为" + e);
}
}
deckAdp.notifyDataSetChanged();
}
deckAdp.notifyDataSetChanged();
}
});
deckAdp.setOnItemSelectListener(new DeckListAdapter.OnItemSelectListener<DeckFile>() {
......@@ -186,13 +134,15 @@ public class DeckSelectFragment extends Fragment {
}
}
});
//对话框中长点击某一卡组名称后,触发该事件
deckAdp.setOnItemLongClickListener(new OnItemLongClickListener() {
@Override
public boolean onItemLongClick(@NonNull BaseQuickAdapter adapter, @NonNull View view, int position) {
DeckFile item = (DeckFile) adapter.getItem(position);
//即使为local,也有可能为卡包预览,因此过滤掉selectposition==0
if (deckAdp.isSelect() || !item.isLocal() || typeAdp.getSelectPosition() == 0)
if (deckAdp.isSelect() || typeAdp.getSelectPosition() == 0)
return true;
deckAdp.setManySelect(true);
......
......@@ -9,14 +9,24 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import cn.garymb.ygomobile.bean.DeckType;
import cn.garymb.ygomobile.bean.events.DeckFile;
import cn.garymb.ygomobile.deck_square.api_response.OnlineDeckDetail;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.lite.databinding.FragmentDeckSquareBinding;
import cn.garymb.ygomobile.utils.YGODeckDialogUtil;
public class DeckSquareFragment extends Fragment {
private FragmentDeckSquareBinding binding;
private DeckSquareListAdapter deckSquareListAdapter;
private YGODeckDialogUtil.OnDeckMenuListener onDeckMenuListener;//通知外部调用方,(如调用本fragment的activity)
private YGODeckDialogUtil.OnDeckDialogListener mDialogListener;
public DeckSquareFragment(YGODeckDialogUtil.OnDeckMenuListener onDeckMenuListener, YGODeckDialogUtil.OnDeckDialogListener mDialogListener) {
this.onDeckMenuListener = onDeckMenuListener;
this.mDialogListener = mDialogListener;
}
@Override
public View onCreateView(
......@@ -33,16 +43,25 @@ public class DeckSquareFragment extends Fragment {
deckSquareListAdapter.loadData();
// Set click listener in your adapter
deckSquareListAdapter.setOnItemClickListener((adapter, view, position) -> {
// Handle item click
OnlineDeckDetail item = (OnlineDeckDetail) adapter.getItem(position);
deckSquareListAdapter.setOnItemLongClickListener((adapter, view, position) -> {
OnlineDeckDetail item = (OnlineDeckDetail) adapter.getItem(position);
// Show the dialog
SquareDeckDetailDialog dialog = new SquareDeckDetailDialog(getContext(), item);
dialog.show();
return true;
});
// Set click listener in your adapter
deckSquareListAdapter.setOnItemClickListener((adapter, view, position) -> {
OnlineDeckDetail item = (OnlineDeckDetail) adapter.getItem(position);
//调用
mDialogListener.onDismiss();
DeckFile deckFile = new DeckFile(item.getDeckId(), DeckType.ServerType.SQUARE_DECK);
onDeckMenuListener.onDeckSelect(deckFile);
});
return binding.getRoot();
......
......@@ -9,8 +9,12 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import cn.garymb.ygomobile.bean.DeckType;
import cn.garymb.ygomobile.bean.events.DeckFile;
import cn.garymb.ygomobile.deck_square.api_response.OnlineDeckDetail;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.lite.databinding.FragmentDeckSquareMyDeckBinding;
import cn.garymb.ygomobile.utils.YGODeckDialogUtil;
//打开页面后,先扫描本地的卡组,读取其是否包含deckId,是的话代表平台上可能有
//之后读取平台上的卡组,与本地卡组列表做比较。
......@@ -20,6 +24,14 @@ public class DeckSquareMyDeckFragment extends Fragment {
private FragmentDeckSquareMyDeckBinding binding;
private MyDeckListAdapter deckListAdapter;
private YGODeckDialogUtil.OnDeckMenuListener onDeckMenuListener;//通知外部调用方,(如调用本fragment的activity)
private YGODeckDialogUtil.OnDeckDialogListener mDialogListener;
public DeckSquareMyDeckFragment(YGODeckDialogUtil.OnDeckMenuListener onDeckMenuListener, YGODeckDialogUtil.OnDeckDialogListener mDialogListener) {
this.onDeckMenuListener = onDeckMenuListener;
this.mDialogListener = mDialogListener;
}
@Override
public View onCreateView(
@NonNull LayoutInflater inflater, ViewGroup container,
......@@ -42,16 +54,24 @@ public class DeckSquareMyDeckFragment extends Fragment {
}
});
deckListAdapter.setOnItemLongClickListener((adapter, view, position) -> {
MyDeckItem item = (MyDeckItem) adapter.getItem(position);
MyDeckDetailDialog dialog = new MyDeckDetailDialog(getContext(), item);
dialog.show();
return true;
});
//点击“我的卡组”中的某个卡组后,弹出dialog,dialog根据卡组的同步情况自动显示对应的下载/上传按钮
deckListAdapter.setOnItemClickListener(
(adapter, view, position) -> {
// Handle item click
MyDeckItem item = (MyDeckItem) adapter.getItem(position);
MyDeckDetailDialog dialog = new MyDeckDetailDialog(getContext(), item);
MyDeckItem item = (MyDeckItem) adapter.getItem(position);
mDialogListener.onDismiss();
DeckFile deckFile = new DeckFile(item.getDeckId(), DeckType.ServerType.MY_SQUARE);
onDeckMenuListener.onDeckSelect(deckFile);
dialog.show();
}
);
......
......@@ -13,9 +13,9 @@ import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
import cn.garymb.ygomobile.AppsSettings;
import cn.garymb.ygomobile.deck_square.api_response.MyOnlineDeckDetail;
import cn.garymb.ygomobile.deck_square.api_response.DownloadDeckResponse;
import cn.garymb.ygomobile.deck_square.api_response.LoginToken;
import cn.garymb.ygomobile.deck_square.api_response.MyOnlineDeckDetail;
import cn.garymb.ygomobile.deck_square.api_response.PushDeckResponse;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.adapters.DeckPreviewListAdapter;
......@@ -47,7 +47,7 @@ public class MyDeckDetailDialog extends Dialog {
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.dialog_square_my_deck_detail);
Button btnDownload = findViewById(R.id.dialog_my_deck_btn_download);
Button deleteMyOnlineDeckBtn = findViewById(R.id.delete_my_online_deck_btn);
Button btnPush = findViewById(R.id.dialog_my_deck_btn_push);
LinearLayout downloadLayout = findViewById(R.id.server_download_layout);
......@@ -77,15 +77,13 @@ public class MyDeckDetailDialog extends Dialog {
//上传卡组
btnPush.setOnClickListener(v -> {
Integer userId = SharedPreferenceUtil.getServerUserId();
String serverToken = SharedPreferenceUtil.getServerToken();//todo serverToken要外部传入还是此处获取?考虑
if (userId == null || serverToken == null) {
YGOUtil.showTextToast("Please login first!");
LoginToken loginToken = DeckSquareApiUtil.getLoginData();
if (loginToken == null) {
return;
}
VUiKit.defer().when(() -> {
PushDeckResponse result = DeckSquareApiUtil.pushDeck(mItem.getDeckPath(), mItem.getDeckName(), userId, serverToken);
PushDeckResponse result = DeckSquareApiUtil.requestIdAndPushDeck(mItem.getDeckPath(), mItem.getDeckName(), loginToken);
return result;
}).fail(e -> {
......@@ -102,11 +100,30 @@ public class MyDeckDetailDialog extends Dialog {
});
//下载用户在平台上的卡组
btnDownload.setOnClickListener(v -> {
deleteMyOnlineDeckBtn.setOnClickListener(v -> {
if (mItem != null) {
mItem.getDeckId();
LoginToken loginToken = DeckSquareApiUtil.getLoginData();
if (loginToken == null) {
return;
}
VUiKit.defer().when(() -> {
PushDeckResponse result = DeckSquareApiUtil.deleteDeck(mItem.getDeckId(), loginToken);
return result;
}).fail(e -> {
LogUtil.i(TAG, "square deck detail fail" + e.getMessage());
}).done(data -> {
if (data.isData()) {
YGOUtil.showTextToast("delete success!");
} else {
if (mMyOnlineDeckDetail != null) {
String path = AppsSettings.get().getDeckDir();
DeckSquareFileUtil.saveFileToPath(path, mMyOnlineDeckDetail.getDeckName() + ".ydk", mMyOnlineDeckDetail.getDeckYdk());
YGOUtil.showTextToast("delete fail " + data.getMessage());
}
});
}
});
......
......@@ -46,7 +46,7 @@ public class SquareDeckDetailDialog extends Dialog {
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.dialog_square_deck_detail);
Button btnDownload = findViewById(R.id.dialog_square_deck_btn_download);
//Button btnDownload = findViewById(R.id.dialog_square_deck_btn_download);
Button btnLike = findViewById(R.id.btnLike);
previewDeckCard();
......@@ -59,19 +59,20 @@ public class SquareDeckDetailDialog extends Dialog {
mListView.setAdapter(mListAdapter);
//下载卡组广场的卡组
btnDownload.setOnClickListener(v -> {
if (mMyOnlineDeckDetail != null) {
String path = AppsSettings.get().getDeckDir();
boolean result = DeckSquareFileUtil.saveFileToPath(path, mMyOnlineDeckDetail.getDeckName() + ".ydk", mMyOnlineDeckDetail.getDeckYdk());
if (result) {
YGOUtil.showTextToast("Download deck success!");
} else {
YGOUtil.showTextToast("Download deck fail!");
}
}
});
// btnDownload.setOnClickListener(v -> {
// if (mMyOnlineDeckDetail != null) {
// //todo 删除云上的卡组
// String path = AppsSettings.get().getDeckDir();
// boolean result = DeckSquareFileUtil.saveFileToPath(path, mMyOnlineDeckDetail.getDeckName() + ".ydk", mMyOnlineDeckDetail.getDeckYdk());
// if (result) {
//
// YGOUtil.showTextToast("Download deck success!");
// } else {
//
// YGOUtil.showTextToast("Download deck fail!");
// }
// }
// });
//给卡组点赞
btnLike.setOnClickListener(v -> {
......
package cn.garymb.ygomobile.deck_square.api_response;
public class DeleteCardJson {
private String deckContributor;
private Integer userId;
private DeckData deck;
public String getDeckContributor() {
return deckContributor;
}
public void setDeckContributor(String deckContributor) {
this.deckContributor = deckContributor;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public DeckData getDeck() {
return deck;
}
public void setDeck(DeckData deck) {
this.deck = deck;
}
public static class DeckData {
private boolean isDelete = false;
public boolean isDelete() {
return isDelete;
}
public void setDelete(boolean delete) {
isDelete = delete;
}
}
}
......@@ -79,8 +79,7 @@ public class DeckUtil {
deckTypeList.add(new DeckType(YGOUtil.s(R.string.category_pack), AppsSettings.get().getPackDeckDir(), DeckType.ServerType.LOCAL));
deckTypeList.add(new DeckType(YGOUtil.s(R.string.category_windbot_deck), AppsSettings.get().getAiDeckDir(), DeckType.ServerType.LOCAL));
deckTypeList.add(new DeckType(YGOUtil.s(R.string.category_Uncategorized), AppsSettings.get().getDeckDir(), DeckType.ServerType.LOCAL));
deckTypeList.add(new DeckType(YGOUtil.s(R.string.category_online_deck), "", DeckType.ServerType.SQUARE_DECK));
deckTypeList.add(new DeckType(YGOUtil.s(R.string.category_my_online_deck), "", DeckType.ServerType.MY_SQUARE));
File[] files = new File(AppsSettings.get().getDeckDir()).listFiles();
if (files != null) {
......
......@@ -5,6 +5,7 @@
android:orientation="vertical"
android:padding="16dp">
<!--
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -19,9 +20,10 @@
android:id="@+id/dialog_square_deck_btn_download"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Download" />
android:text="@string/delete" />
</LinearLayout>
-->
<LinearLayout
android:layout_width="match_parent"
......
......@@ -17,7 +17,7 @@
android:src="@drawable/ic_server_download" />
<Button
android:id="@+id/dialog_my_deck_btn_download"
android:id="@+id/delete_my_online_deck_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Download" />
......
......@@ -22,15 +22,6 @@
android:layout_height="match_parent" />
<TextView
android:id="@+id/open_deck_square"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="bottom|right"
android:layout_marginBottom="100dp"
android:background="@drawable/ic_deck_square"
android:text="卡组广场"
android:textAlignment="center" />
<LinearLayout
android:layout_width="match_parent"
......
......@@ -27,52 +27,27 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:orientation="vertical">
<cn.garymb.ygomobile.ui.widget.AlwaysMarqueeTextView
android:id="@+id/deck_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/white"
tools:text="Deck Name" />
<TextView
android:id="@+id/onlie_deck_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
tools:text="40" />
android:orientation="horizontal">
<LinearLayout
android:id="@+id/deck_info"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/prerelease_star"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginRight="5dp"
android:background="@drawable/ic_expansions"
android:visibility="visible" />
<ImageView
android:id="@+id/banned_mark"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginRight="@dimen/dp_10"
android:background="@drawable/ic_banned"
android:visibility="visible" />
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="4"
android:orientation="vertical">
<cn.garymb.ygomobile.ui.widget.AlwaysMarqueeTextView
android:id="@+id/deck_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/white"
tools:text="Deck Name" />
<TextView
android:id="@+id/count_main"
android:id="@+id/onlie_deck_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/holo_blue_bright"
......@@ -80,45 +55,85 @@
tools:text="40" />
<LinearLayout
android:id="@+id/ll_extra_n_side"
android:id="@+id/deck_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:orientation="horizontal">
<TextView
android:id="@+id/TextExtra"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textColor="@android:color/holo_green_light"
android:textSize="10sp" />
<ImageView
android:id="@+id/prerelease_star"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginRight="5dp"
android:background="@drawable/ic_expansions"
android:visibility="visible" />
<ImageView
android:id="@+id/banned_mark"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginRight="@dimen/dp_10"
android:background="@drawable/ic_banned"
android:visibility="visible" />
<TextView
android:id="@+id/count_ex"
android:id="@+id/count_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
tools:text="15" />
tools:text="40" />
<TextView
android:id="@+id/TextSide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textColor="@android:color/holo_green_light"
android:textSize="10sp" />
<TextView
android:id="@+id/count_side"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/ll_extra_n_side"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
tools:text="15" />
android:orientation="horizontal">
<TextView
android:id="@+id/TextExtra"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textColor="@android:color/holo_green_light"
android:textSize="10sp" />
<TextView
android:id="@+id/count_ex"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
tools:text="15" />
<TextView
android:id="@+id/TextSide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textColor="@android:color/holo_green_light"
android:textSize="10sp" />
<TextView
android:id="@+id/count_side"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/holo_blue_bright"
android:textSize="10sp"
tools:text="15" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/local_deck_upload_btn"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="上传" />
</LinearLayout>
</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