Commit 1637acf5 authored by wangfugui's avatar wangfugui

先行服务器、先行卡下载相关逻辑判断

pre-card server related judgement code
parent 7f478c9e
......@@ -6,6 +6,7 @@ import android.content.Context;
import android.content.res.AssetManager;
import android.media.AudioManager;
import android.media.SoundPool;
import android.util.Log;
import java.io.File;
import java.io.IOException;
......@@ -23,6 +24,7 @@ public abstract class GameApplication extends Application implements IrrlichtBri
public void onCreate() {
super.onCreate();
// Reflection.unseal(this);
Log.i("webCrwaler", "application");
}
public static GameApplication get() {
......
......@@ -162,6 +162,9 @@ public interface Constants {
String URL_YGO233_DATAVER = "https://ygo233.com/pre/dataver";
String URL_YGO233_FILE = "https://ygo233.com/pre/download-ygomobile";
String URL_YGO233_FILE_ALT = "https://ygo233.com/pre/download-ygomobile/alt";
int PORT_YGO233 = 23333;
String URL_YGO233_1 = "s1.ygo233.com";
String URL_YGO233_2 = "s2.ygo233.com";
String SERVER_FILE = "server_list.xml";
String SHARE_FILE = ".share_deck.png";
......
package cn.garymb.ygomobile.bean.events;
public class ExCardEvent {
public enum EventType {
exCardPackageChange,exCardPrefChange;
}
private EventType eventType;
public ExCardEvent(EventType eventType) {
this.eventType = eventType;
}
public EventType getType() {
return eventType;
}
public void setType(EventType eventType) {
this.eventType = eventType;
}
}
package cn.garymb.ygomobile.bean.events;
import cn.garymb.ygomobile.bean.ServerInfo;
public class ServerInfoEvent {
public int position;
public ServerInfo serverInfo;//为了让接受event的HomeFragment能获取到当前server的端口号等信息,加入该属性
public boolean delete;
public boolean join;
public ServerInfoEvent() {
}
public ServerInfoEvent(int position, boolean delete) {
public ServerInfoEvent(int position, boolean delete, ServerInfo serverInfo) {
this.position = position;
this.delete = delete;
this.serverInfo = serverInfo;
}
}
......@@ -3,21 +3,30 @@ package cn.garymb.ygomobile.ex_card;
import android.os.Parcel;
import android.os.Parcelable;
/*
This class contains two information types:ex-card information and updating log, which is marked
by "type 0" and "type 1", respectively.
本类包括两种信息,先行卡信息和更新日志(分别对应type 0和type 1)。
*/
public class ExCard implements Parcelable {
private String name;
private String imageUrl;
private String description;
/* used to mark this object as ex-card(the value is 0) or updating log(the value is 1) */
private Integer type;
public ExCard(String name, String imageUrl, String description) {
public ExCard(String name, String imageUrl, String description, Integer type) {
this.name = name;
this.imageUrl = imageUrl;
this.description = description;
this.type = type;
}
protected ExCard(Parcel in) {
name = in.readString();
imageUrl = in.readString();
description = in.readString();
type = in.readInt();
}
public static final Creator<ExCard> CREATOR = new Creator<ExCard>() {
......@@ -56,6 +65,17 @@ public class ExCard implements Parcelable {
this.description = description;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public boolean isUpdatingLog(){
return (type == 1);
}
@Override
public int describeContents() {
return 0;
......@@ -66,5 +86,6 @@ public class ExCard implements Parcelable {
dest.writeString(this.name);
dest.writeString(this.imageUrl);
dest.writeString(this.description);
dest.writeInt(this.type);
}
}
......@@ -13,7 +13,6 @@ import java.util.List;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.loader.ImageLoader;
import cn.garymb.ygomobile.utils.glide.GlideCompat;
import cn.garymb.ygomobile.utils.glide.StringSignature;
public class ExCardListAdapter extends BaseQuickAdapter<ExCard, BaseViewHolder> {
......@@ -29,13 +28,19 @@ public class ExCardListAdapter extends BaseQuickAdapter<ExCard, BaseViewHolder>
protected void convert(BaseViewHolder helper, ExCard item) {
helper.setText(R.id.ex_card_name, item.getName());
helper.setText(R.id.ex_card_description, item.getDescription());
ImageView imageview = helper.getView(R.id.ex_card_image);
//the function cn.garymb.ygomobile.loader.ImageLoader.bindT(...)
//cn.garymb.ygomobile.loader.ImageLoader.setDefaults(...)
//is a private function,so I copied the content of it to here
RequestBuilder<Drawable> resource = GlideCompat.with(imageview.getContext()).load(item.getImageUrl());
resource.placeholder(R.drawable.unknown);
resource.error(R.drawable.unknown);
resource.into(imageview);
if (item.isUpdatingLog()) {
helper.setGone(R.id.ex_card_image, true);
} else {
helper.setGone(R.id.ex_card_image, false);
ImageView imageview = helper.getView(R.id.ex_card_image);
//the function cn.garymb.ygomobile.loader.ImageLoader.bindT(...)
//cn.garymb.ygomobile.loader.ImageLoader.setDefaults(...)
//is a private function,so I copied the content of it to here
RequestBuilder<Drawable> resource = GlideCompat.with(imageview.getContext()).load(item.getImageUrl());
resource.placeholder(R.drawable.unknown);
resource.error(R.drawable.unknown);
resource.into(imageview);
}
}
}
package cn.garymb.ygomobile.ex_card;
import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.TextView;
import java.util.List;
import cn.garymb.ygomobile.lite.R;
public class ExCardLogAdapter extends BaseExpandableListAdapter {
public ExCardLogAdapter(Context context, List<ExCardLogItem> expandalbeList) {
this.expandalbeList = expandalbeList;
this.context = context;
}
private Context context;
private List<ExCardLogItem> expandalbeList;
@Override
public int getChildrenCount(int groupPosition) {
return this.expandalbeList.get(groupPosition).getCount();
}
@Override
public Object getChild(int groupPosition, int childPosition) {
return expandalbeList.get(groupPosition).getLogs().get(childPosition);
}
@Override
public long getChildId(int groupPosition, int childPosition) {
return childPosition;
}
@Override
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
Object result = getChild(groupPosition, childPosition);
if (convertView == null) {
LayoutInflater layoutInflater = (LayoutInflater) this.context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.item_log, null);
}
TextView expandedListTextView = (TextView) convertView
.findViewById(R.id.expandedListItem);
expandedListTextView.setText(expandalbeList.get(groupPosition).getLogs().get(childPosition));
return convertView;
}
@Override
public int getGroupCount() {
return this.expandalbeList.size();
}
@Override
public Object getGroup(int groupPosition) {
return this.expandalbeList.get(groupPosition);
}
@Override
public long getGroupId(int groupPosition) {
return groupPosition;
}
@Override
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater layoutInflater = (LayoutInflater) this.context.
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.item_log_group, null);
}
TextView listTitleTextView = (TextView) convertView
.findViewById(R.id.listTitle);
if(groupPosition == 0){
listTitleTextView.setTextSize(15);
}else{
listTitleTextView.setTextSize(12);
}
listTitleTextView.setTypeface(null, Typeface.BOLD);
listTitleTextView.setText(expandalbeList.get(groupPosition).getDateTime());
return convertView;
}
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return false;
}
@Override
public boolean hasStableIds() {
return false;
}
}
package cn.garymb.ygomobile.ex_card;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.List;
public class ExCardLogItem implements Parcelable {
private int count;
private String dateTime;
private List<String> logs;
public ExCardLogItem(int count, String dateTime, List<String> logs) {
this.count = count;
this.dateTime = dateTime;
this.logs = logs;
}
protected ExCardLogItem(Parcel in) {
count = in.readInt();
dateTime = in.readString();
logs = in.createStringArrayList();
}
public static final Creator<ExCardLogItem> CREATOR = new Creator<ExCardLogItem>() {
@Override
public ExCardLogItem createFromParcel(Parcel in) {
return new ExCardLogItem(in);
}
@Override
public ExCardLogItem[] newArray(int size) {
return new ExCardLogItem[size];
}
};
public String getDateTime() {
return dateTime;
}
public void setDateTime(String dateTime) {
this.dateTime = dateTime;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public List<String> getLogs() {
return logs;
}
public void setLogs(List<String> logs) {
this.logs = logs;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(count);
dest.writeString(dateTime);
dest.writeStringList(logs);
}
}
......@@ -50,7 +50,8 @@ import ocgcore.DataManager;
import ocgcore.data.Card;
public class WebActivity extends BaseActivity {
public static String dataVer;
/* 全局存储了扩展卡版本号,会被其他activity使用 */
private static String exCardVer;
private WebViewPlus mWebViewPlus;
private String mUrl;
private String mTitle;
......@@ -99,7 +100,7 @@ public class WebActivity extends BaseActivity {
servername = "Mercury23333 OCG/TCG Pre-release";
AddServer(servername, "s1.ygo233.com", 23333, "Knight of Hanoi");
btn_download.setVisibility(View.GONE);
SharedPreferenceUtil.setExpansionDataVer(WebActivity.dataVer);
SharedPreferenceUtil.setExpansionDataVer(WebActivity.exCardVer);
break;
case UnzipUtils.ZIP_UNZIP_EXCEPTION:
Toast.makeText(getContext(), getString(R.string.install_failed_bcos) + msg.obj, Toast.LENGTH_SHORT).show();
......
package cn.garymb.ygomobile.ui.adapters;
import static cn.garymb.ygomobile.utils.BitmapUtil.getPaint;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
import android.graphics.Paint;
import android.util.Log;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.transition.Visibility;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.tubb.smrv.SwipeHorizontalMenuLayout;
import org.greenrobot.eventbus.EventBus;
import cn.garymb.ygomobile.AppsSettings;
import cn.garymb.ygomobile.Constants;
import cn.garymb.ygomobile.bean.ServerInfo;
import cn.garymb.ygomobile.bean.events.ServerInfoEvent;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.plus.DialogPlus;
import cn.garymb.ygomobile.utils.ServerUtil;
public class ServerListAdapter extends BaseRecyclerAdapterPlus<ServerInfo, BaseViewHolder> {
public ServerListAdapter(Context context) {
......@@ -64,25 +65,26 @@ public class ServerListAdapter extends BaseRecyclerAdapterPlus<ServerInfo, BaseV
public void bindMenu() {
addChildClickViewIds(R.id.smContentView, R.id.btn_edit_delete, R.id.btn_delete, R.id.iv_fond);
setOnItemChildClickListener((adapter, view, position) -> {
ServerInfo serverInfo = (ServerInfo) adapter.getData().get(position);
switch (view.getId()) {
case R.id.smContentView:
ServerInfoEvent event = new ServerInfoEvent(position, false);
event.join = true;
EventBus.getDefault().post(event);
ServerInfoEvent serverInfoEvent = new ServerInfoEvent(position, false, serverInfo);
serverInfoEvent.join = true;
EventBus.getDefault().post(serverInfoEvent);//在cn.garymb.ygomobile.ui.home.HomeFragment.onServerInfoEvent监听
SwipeHorizontalMenuLayout menuLayout = (SwipeHorizontalMenuLayout) adapter.getViewByPosition(position, R.id.swipe_layout);
if (menuLayout.isMenuOpen()) {
menuLayout.smoothCloseMenu();
}
break;
case R.id.btn_edit_delete:
EventBus.getDefault().post(new ServerInfoEvent(position, false));
EventBus.getDefault().post(new ServerInfoEvent(position, false, serverInfo));
SwipeHorizontalMenuLayout menuLayout1 = (SwipeHorizontalMenuLayout) adapter.getViewByPosition(position, R.id.swipe_layout);
if (menuLayout1.isMenuOpen()) {
menuLayout1.smoothCloseMenu();
}
break;
case R.id.btn_delete:
EventBus.getDefault().post(new ServerInfoEvent(position, true));
EventBus.getDefault().post(new ServerInfoEvent(position, true, serverInfo));
SwipeHorizontalMenuLayout menuLayout2 = (SwipeHorizontalMenuLayout) adapter.getViewByPosition(position, R.id.swipe_layout);
if (menuLayout2.isMenuOpen()) {
......@@ -122,6 +124,19 @@ public class ServerListAdapter extends BaseRecyclerAdapterPlus<ServerInfo, BaseV
} else {
baseViewHolder.findView(R.id.iv_fond).setVisibility(View.GONE);
}
if (ServerUtil.isPreServer(serverInfo.getPort(), serverInfo.getServerAddr())) {
if (!AppsSettings.get().isReadExpansions() || ServerUtil.exCardState != ServerUtil.ExCardState.UPDATED) {
Paint paint = getPaint(0);
baseViewHolder.getView(R.id.swipe_layout).setLayerType(View.LAYER_TYPE_HARDWARE, paint);
} else {
Paint paint = getPaint(1);
baseViewHolder.getView(R.id.swipe_layout).setLayerType(View.LAYER_TYPE_HARDWARE, paint);
}
} else {//假设先行卡item在某个postion,将其设为灰色后,如果移动先行卡item,填充该位置的其他item仍是灰色,因此需要显式设置
Paint paint = getPaint(1);
baseViewHolder.getView(R.id.swipe_layout).setLayerType(View.LAYER_TYPE_HARDWARE, paint);
}
}
}
......@@ -39,6 +39,7 @@ import cn.garymb.ygomobile.ui.plus.DialogPlus;
import cn.garymb.ygomobile.ui.settings.SettingFragment;
import cn.garymb.ygomobile.utils.OkhttpUtil;
import cn.garymb.ygomobile.utils.ScreenUtil;
import cn.garymb.ygomobile.utils.ServerUtil;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;
......@@ -114,6 +115,7 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
//showNewbieGuide("homePage");
initBottomNavigationBar();
onNewIntent(getIntent());
ServerUtil.initExCardState();//检查扩展卡版本
}
@Override
......
......@@ -44,8 +44,8 @@ public class ServerListManager {
public void syncLoadData() {
VUiKit.defer().when(() -> {
ServerList assetList = readList(getContext().getAssets().open(ASSET_SERVER_LIST));
ServerList fileList = xmlFile.exists() ? readList(new FileInputStream(xmlFile)) : null;
ServerList assetList = readList(getContext().getAssets().open(ASSET_SERVER_LIST));//程序asset文件夹下的serverlist.xml
ServerList fileList = xmlFile.exists() ? readList(new FileInputStream(xmlFile)) : null;//文件系统中的server-list.xml
if (fileList == null) {
return assetList;
}
......
......@@ -63,6 +63,8 @@ import android.widget.Toast;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.signature.MediaStoreSignature;
import org.greenrobot.eventbus.EventBus;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
......@@ -72,6 +74,7 @@ import java.util.List;
import cn.garymb.ygomobile.AppsSettings;
import cn.garymb.ygomobile.Constants;
import cn.garymb.ygomobile.bean.events.ExCardEvent;
import cn.garymb.ygomobile.lite.BuildConfig;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.adapters.SimpleListAdapter;
......@@ -81,6 +84,8 @@ import cn.garymb.ygomobile.ui.plus.VUiKit;
import cn.garymb.ygomobile.utils.FileUtils;
import cn.garymb.ygomobile.utils.IOUtils;
import cn.garymb.ygomobile.utils.OkhttpUtil;
import cn.garymb.ygomobile.utils.ServerUtil;
import cn.garymb.ygomobile.utils.SharedPreferenceUtil;
import cn.garymb.ygomobile.utils.SystemUtils;
import cn.garymb.ygomobile.utils.glide.GlideCompat;
import ocgcore.DataManager;
......@@ -165,7 +170,6 @@ public class SettingFragment extends PreferenceFragmentPlus {
bind(PREF_DEL_EX, getString(R.string.about_delete_ex));
bind(PERF_TEST_REPLACE_KERNEL, "需root权限,请在开发者的指导下食用");
bind(PREF_WINDOW_TOP_BOTTOM, "" + mSettings.getScreenPadding());
bind(PREF_DATA_LANGUAGE, "" + mSettings.getDataLanguage());
Preference preference = findPreference(PREF_READ_EX);
if (preference != null) {
preference.setSummary(mSettings.getExpansionsPath().getAbsolutePath());
......@@ -215,6 +219,11 @@ public class SettingFragment extends PreferenceFragmentPlus {
if (preference.getKey().equals(PREF_READ_EX)) {
//设置使用额外卡库后重新加载卡片数据
DataManager.get().load(true);
EventBus.getDefault().postSticky(new ExCardEvent(ExCardEvent.EventType.exCardPrefChange));
/* TODO 考虑以下特殊情况,用户在未开启先行卡的情况下,下载了先行卡包,之后跳转到设置页面,勾选开启先行卡后,DataManager自动安装,但此时本地的先行卡版本号尚未更新。
先行卡,此时应更新先行卡状态
*/
ServerUtil.initExCardState();
}
//开关决斗助手
if (preference.getKey().equals(PREF_START_SERVICEDUELASSISTANT)) {
......@@ -288,6 +297,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
message.what = TYPE_SETTING_GET_VERSION_FAILED;
message.obj = e;
handler.sendMessage(message);
Log.i(BuildConfig.VERSION_NAME, "error" + e);
}
@Override
......@@ -317,6 +327,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
ListView listView = dialog.bind(R.id.room_list);
listView.setAdapter(simpleListAdapter);
listView.setOnItemLongClickListener((a, v, i, index) -> {
/* 删除先行卡 */
String name = simpleListAdapter.getItemById(index);
int pos = simpleListAdapter.findItem(name);
if (pos >= 0) {
......@@ -325,6 +336,9 @@ public class SettingFragment extends PreferenceFragmentPlus {
FileUtils.delFile(mSettings.getExpansionsPath().getAbsolutePath() + "/" + name);
DataManager.get().load(true);
Toast.makeText(getContext(), R.string.done, Toast.LENGTH_LONG).show();
SharedPreferenceUtil.setExpansionDataVer(null);//删除先行卡后,更新版本状态
ServerUtil.exCardState = ServerUtil.ExCardState.NEED_UPDATE;
EventBus.getDefault().postSticky(new ExCardEvent(ExCardEvent.EventType.exCardPackageChange));//删除后,通知UI做更新
}
return true;
});
......
......@@ -6,6 +6,8 @@ import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
......@@ -224,4 +226,12 @@ public class BitmapUtil {
return bitmap;
}
public static Paint getPaint(int saturation){
Paint mPaint = new Paint();
ColorMatrix cm = new ColorMatrix();
cm.setSaturation(saturation);
mPaint.setColorFilter(new ColorMatrixColorFilter(cm));
return mPaint;
}
}
package cn.garymb.ygomobile.utils;
import static cn.garymb.ygomobile.Constants.URL_YGO233_DATAVER;
import android.text.TextUtils;
import android.util.Log;
import java.io.IOException;
import cn.garymb.ygomobile.Constants;
import cn.garymb.ygomobile.lite.BuildConfig;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;
public class ServerUtil {
public enum ExCardState {
/* 已安装最新版扩展卡,扩展卡不是最新版本,无法查询到服务器版本 */
UPDATED, NEED_UPDATE, ERROR;
}
/* 存储了当前先行卡是否需要更新的状态,UI逻辑直接读取该变量就能获知是否已安装先行卡 */
public static ExCardState exCardState = ExCardState.ERROR;
public static String serverExCardVersion = "";
/**
* 在可能更改先行卡状态的操作后调用,
* 删除先行卡时入参为null,
* 安装先行卡时入参为版本号
*
*/
/**
* 初始化本地先行卡版本的状态,
* 比对服务器的先行卡版本号与本地先行卡版本号,
* 更新全局变量exCardVersion(如删除先行卡、重新安装先行卡等)
*/
public static void initExCardState() {
String oldVer = SharedPreferenceUtil.getExpansionDataVer();
Log.i("webCrawler", "old pre-card version:" + oldVer);
OkhttpUtil.get(URL_YGO233_DATAVER, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
exCardState = ExCardState.ERROR;
serverExCardVersion = "";
Log.i(BuildConfig.VERSION_NAME, "error" + e);
Log.i("webCrawler", "network failed, pre-card version:" + exCardState);
}
@Override
public void onResponse(Call call, Response response) throws IOException {
String newVer = response.body().string();
serverExCardVersion = newVer;
Log.i("webCrawler", "pre-card version:" + newVer);
if (!TextUtils.isEmpty(newVer)) {
if (!newVer.equals(oldVer)) {//如果oldVer为null,也会触发
exCardState = ExCardState.NEED_UPDATE;
} else {
exCardState = ExCardState.UPDATED;
}
} else {
exCardState = ExCardState.ERROR;
}
}
});
}
public static boolean isPreServer(int port, String addr) {
if ((port == Constants.PORT_YGO233 && addr.equals(Constants.URL_YGO233_1)) ||
(port == Constants.PORT_YGO233 && addr.equals(Constants.URL_YGO233_2))) {
return true;
} else {
return false;
}
}
}
package ocgcore;
import android.util.Log;
import cn.garymb.ygomobile.AppsSettings;
import cn.garymb.ygomobile.loader.CardLoader;
......@@ -45,6 +47,8 @@ public class DataManager {
private boolean mInit;
public void load(boolean force) {
Log.i("webCrawler", "DataManager load data");
boolean needLoad = false;
synchronized (this) {
if (!mInit || force) {
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg3">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#aa000000" />
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/expandableListView"
android:layout_height="0dp"
android:layout_width="match_parent"
android:layout_weight="3"
android:indicatorLeft="?android:attr/expandableListPreferredItemIndicatorLeft"
android:divider="@android:color/darker_gray"
android:dividerHeight="0.5dp" />
<com.tubb.smrv.SwipeMenuRecyclerView
android:id="@+id/list_ex_cards"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dp"
android:layout_weight="13"
android:divider="@android:color/transparent"
android:dividerHeight="4dp"
android:padding="5dp"
android:scrollbars="vertical" />
</LinearLayout>
<LinearLayout
android:id="@+id/web_btn_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="horizontal">
<Button
android:id="@+id/web_btn_download_prerelease"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:text="@string/Download" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
......@@ -12,10 +12,8 @@
android:id="@+id/ex_card_image"
android:layout_width="@dimen/card_width_middle"
android:layout_height="@dimen/card_height_middle"
android:layout_centerInParent="true"
android:layout_gravity="center_vertical"
android:paddingTop="5dp"
android:scaleType="fitXY"
android:paddingRight="10dp"
tools:src="@drawable/unknown" />
<LinearLayout
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/expandedListItem"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="?android:attr/expandableListPreferredChildPaddingLeft"
android:paddingTop="2dp"
android:paddingBottom="2dp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/listTitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textColor="@color/item_title"/>
</LinearLayout>
......@@ -39,6 +39,9 @@
<string name="back_tip">뒤로가기 키를 한번 더 누르시면 앱이 종료됩니다</string>
<string name="string_help_text">현재 앱에 필요한 권한이 없습니다. \n설정 - 권한 - 필요한 권한 얻기를 터치하십시오.</string>
<string name="fetch_ex_card">확장 카드 불러오는 중</string>
<string name="ex_card_log_title">update log</string>
<string name="ex_card_check_toast_message">To use it, We recommend you to download the pre-card setting in the pre-card download page unless you have installed pre-card in another way.</string>
<!-- settings -->
<string name="settings_about">정보</string>
<string name="settings_about_sub_about">정보</string>
......@@ -297,7 +300,8 @@
<string name="tip_return_to_duel">현재 게임으로 돌아왔습니다</string>
<string name="my_favorites">즐겨 찾기★</string>
<string name="ypk_installed">확장 카드 팩 파일이 설치되었습니다</string>
<string name="ypk_go_setting">확장 카드 팩을 사용하려면 확장 카드 팩이 활성화되어 있어야합니다</string>
<!--<string name="ypk_go_setting">확장 카드 팩을 사용하려면 확장 카드 팩이 활성화되어 있어야합니다</string>-->
<string name="ypk_go_setting">To use it, We recommend you to check \"Use Expansions\" unless you have installed pre-card in another way</string>
<string name="ypk_delete">해당 이름을 길게 눌러 삭제합니다e</string>
<string name="install_failed_bcos">설치에 실패했습니다. 이유:</string>
<string name="deck_back_up">백업</string>
......
......@@ -39,6 +39,9 @@
<string name="back_tip">请再按一次返回键退出</string>
<string name="string_help_text">当前应用缺少必要权限。\n请点击 设置-权限 打开所需权限。</string>
<string name="fetch_ex_card">读取先行卡</string>
<string name="ex_card_log_title">更新日志</string>
<string name="ex_card_check_toast_message">检测到未下载扩展卡,如果未通过其他途径安装扩展卡,建议在扩展卡页面下载</string>
<!-- settings -->
<string name="settings_about">关于</string>
<string name="settings_about_sub_about">关于</string>
......@@ -297,7 +300,7 @@
<string name="tip_return_to_duel">已回到当前游戏</string>
<string name="my_favorites">我的收藏★</string>
<string name="ypk_installed">拓展卡包文件已安装</string>
<string name="ypk_go_setting">这是拓展卡包文件,要使用须启用扩展卡包</string>
<string name="ypk_go_setting">检测到未启用拓展卡包,如果未通过其他途径安装扩展卡,建议开启</string>
<string name="ypk_delete">长按相应名称以删除</string>
<string name="install_failed_bcos">安装失败,原因:</string>
<string name="deck_back_up">备份</string>
......
......@@ -45,7 +45,10 @@
<string name="back_tip">Press back key again to exit.</string>
<string name="string_help_text">The current application lacks the necessary permissions. \n
please click Settings - permissions - open the required permissions.</string>
<string name="fetch_ex_card">Fetching ex-cards</string>
<string name="fetch_ex_card">Fetching pre-cards</string>
<string name="ex_card_log_title">update log</string>
<string name="ex_card_check_toast_message">To use it, We recommend you to download the pre-card setting in the pre-card download page unless you have installed pre-card in another way.</string>
<!-- settings -->
<string name="settings_about">About</string>
<string name="settings_about_sub_about">About</string>
......@@ -298,7 +301,7 @@
<string name="tip_return_to_duel">Current game has been Returned</string>
<string name="my_favorites">myFav★</string>
<string name="ypk_installed">expansion file installed</string>
<string name="ypk_go_setting">check \"Use Expansions\" to use it</string>
<string name="ypk_go_setting">To use it, We recommend you to check \"Use Expansions\" unless you have installed pre-card in another way</string>
<string name="ypk_delete">Long-press name to delete</string>
<string name="install_failed_bcos">file install failed, because\:</string>
<string name="deck_back_up">BackUp</string>
......@@ -328,7 +331,7 @@
<string name="guide_view_move_card">press a card to move it to other place\nlong-press this card to delete it</string>
<string name="guide_view_banner">Mycard News, you can click to see\only in Chinese now, Sorry</string>
<string name="title_delete_ex">delete expansions</string>
<string name="about_delete_ex">if you need to delte all expansion cards</string>
<string name="about_delete_ex">if you need to delete all expansion cards</string>
<string name="file_installed">file loaded</string>
<string name="ask_delete_ex">Click OK to confirm the deletion</string>
<string name="label_ot_TCG">TCG</string>
......
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