Commit 8f392eae authored by feihuaduo's avatar feihuaduo

更新gradle版本

高清卡图地址更新为444端口(加载卡图更快)
适配mc新聊天室地址
新增简中专属分类
修复卡组编辑闪退的问题
parent 7d534cb5
...@@ -7,7 +7,7 @@ buildscript { ...@@ -7,7 +7,7 @@ buildscript {
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.android.tools.build:gradle:4.2.1'
//classpath 'me.tatarka:gradle-retrolambda:3.2.5' //classpath 'me.tatarka:gradle-retrolambda:3.2.5'
} }
} }
......
...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
...@@ -102,8 +102,8 @@ dependencies { ...@@ -102,8 +102,8 @@ dependencies {
implementation(name: 'dialogutils2-release', ext: 'aar') implementation(name: 'dialogutils2-release', ext: 'aar')
//recyclerview的adapter库 //recyclerview的adapter库
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30' implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.android.material:material:1.3.0'
//图片选择 //图片选择
implementation 'com.yuyh.imgsel:library:2.1.0' implementation 'com.yuyh.imgsel:library:2.1.0'
//跨进程SharedPreferencesPlus工具 //跨进程SharedPreferencesPlus工具
...@@ -111,7 +111,7 @@ dependencies { ...@@ -111,7 +111,7 @@ dependencies {
//Tencent bugly //Tencent bugly
implementation 'com.tencent.bugly:crashreport_upgrade:latest.release' implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
implementation 'com.tencent.bugly:nativecrashreport:latest.release' implementation 'com.tencent.bugly:nativecrashreport:latest.release'
api 'com.tencent.tbs.tbssdk:sdk:43903' api 'com.tencent.tbs.tbssdk:sdk:43939'
//http请求库 //http请求库
implementation 'com.squareup.okhttp3:okhttp:3.12.0' implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.bm.photoview:library:1.4.1' implementation 'com.bm.photoview:library:1.4.1'
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
android:name="com.tencent.bugly.beta.ui.BetaActivity" android:name="com.tencent.bugly.beta.ui.BetaActivity"
android:launchMode="singleTop" android:launchMode="singleTop"
android:configChanges="keyboardHidden|orientation|screenSize|locale" android:configChanges="keyboardHidden|orientation|screenSize|locale"
android:excludeFromRecents="true"/> android:excludeFromRecents="true" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.home.MainActivity" android:name="cn.garymb.ygomobile.ui.home.MainActivity"
...@@ -191,11 +191,14 @@ ...@@ -191,11 +191,14 @@
android:name="cn.garymb.ygomobile.ui.mycard.mcchat.McchatActivity" android:name="cn.garymb.ygomobile.ui.mycard.mcchat.McchatActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
<activity android:name="cn.garymb.ygomobile.ui.mycard.mcchat.SplashActivity" /> <activity
android:name="cn.garymb.ygomobile.ui.mycard.mcchat.SplashActivity"
android:theme="@style/AppTheme.Mycard" />
<activity android:name="cn.garymb.ygomobile.ui.activities.FileLogActivity" /> <activity android:name="cn.garymb.ygomobile.ui.activities.FileLogActivity" />
<activity <activity
android:name="cn.garymb.ygomobile.ui.activities.PermissionsActivity" android:name="cn.garymb.ygomobile.ui.activities.PermissionsActivity"
android:theme="@style/TranslucentTheme"/> android:theme="@style/TranslucentTheme" />
<meta-data <meta-data
android:name="BUGLY_APPID" android:name="BUGLY_APPID"
android:value="${APP_ID}" /> android:value="${APP_ID}" />
......
package cn.garymb.ygomobile.ui.adapters; package cn.garymb.ygomobile.ui.adapters;
import android.content.Context; import android.content.Context;
import android.util.Log;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
...@@ -102,7 +103,10 @@ public class CardListAdapter extends BaseRecyclerAdapterPlus<Card, ViewHolder> i ...@@ -102,7 +103,10 @@ public class CardListAdapter extends BaseRecyclerAdapterPlus<Card, ViewHolder> i
@Override @Override
public void onBindViewHolder(ViewHolder holder, int position) { public void onBindViewHolder(ViewHolder holder, int position) {
Log.e("Cardlist","num"+position);
Card item = getItem(position); Card item = getItem(position);
if (item==null)
return;
imageLoader.bindImage(holder.cardImage, item.Code); imageLoader.bindImage(holder.cardImage, item.Code);
holder.cardName.setText(item.Name); holder.cardName.setText(item.Name);
if (item.isType(CardType.Monster)) { if (item.isType(CardType.Monster)) {
......
...@@ -337,13 +337,18 @@ public class CardSearcher implements View.OnClickListener { ...@@ -337,13 +337,18 @@ public class CardSearcher implements View.OnClickListener {
CardOt[] ots = CardOt.values(); CardOt[] ots = CardOt.values();
List<SimpleSpinnerItem> items = new ArrayList<>(); List<SimpleSpinnerItem> items = new ArrayList<>();
items.add(new SimpleSpinnerItem(0, getString(R.string.label_ot))); items.add(new SimpleSpinnerItem(0, getString(R.string.label_ot)));
for (CardOt item : ots) { // for (CardOt item : ots) {
if (item.ordinal() != 0) { // if (item.ordinal() != 0) {
items.add(new SimpleSpinnerItem(item.ordinal(), // items.add(new SimpleSpinnerItem(item.ordinal(),
mStringManager.getOtString(item.ordinal(), item.toString())) // mStringManager.getOtString(item.ordinal(), item.toString()))
); // );
} // }
} // }
items.add(new SimpleSpinnerItem(1,"OCG"));
items.add(new SimpleSpinnerItem(2,"TCG"));
items.add(new SimpleSpinnerItem(3,"OCG&TCG"));
items.add(new SimpleSpinnerItem(4,"DIY"));
items.add(new SimpleSpinnerItem(8,"简中"));
SimpleSpinnerAdapter adapter = new SimpleSpinnerAdapter(mContext); SimpleSpinnerAdapter adapter = new SimpleSpinnerAdapter(mContext);
adapter.setColor(Color.WHITE); adapter.setColor(Color.WHITE);
adapter.setColor(Color.WHITE); adapter.setColor(Color.WHITE);
......
...@@ -95,23 +95,19 @@ public class McchatActivity extends Activity implements ChatListener { ...@@ -95,23 +95,19 @@ public class McchatActivity extends Activity implements ChatListener {
} }
private void initListener() { private void initListener() {
main_send.setOnClickListener(new OnClickListener() { main_send.setOnClickListener(p1 -> {
String message = main_send_message.getText().toString().trim();
@Override if (message.equals("")) {
public void onClick(View p1) { YGOUtil.show( getString(R.string.noting_to_send));
String message = main_send_message.getText().toString().trim(); } else {
if (message.equals("")) { try {
YGOUtil.show( getString(R.string.noting_to_send)); su.sendMessage(message);
} else { main_send_message.setText("");
try { } catch (Exception e) {
su.sendMessage(message); YGOUtil.show( getString(R.string.sending_failed));
main_send_message.setText("");
} catch (Exception e) {
YGOUtil.show( getString(R.string.sending_failed));
}
} }
// TODO: Implement this method
} }
// TODO: Implement this method
}); });
// TODO: Implement this method // TODO: Implement this method
} }
......
...@@ -100,25 +100,21 @@ public class SplashActivity extends Activity { ...@@ -100,25 +100,21 @@ public class SplashActivity extends Activity {
private void join() { private void join() {
if (!su.isListener()) { if (!su.isListener()) {
new Thread(new Runnable() { new Thread(() -> {
if (!su.isConnected()) {
@Override han.sendEmptyMessage(4);
public void run() { login();
if (!su.isConnected()) { }
han.sendEmptyMessage(4); if (su.isConnected()) {
login(); han.sendEmptyMessage(3);
} try {
if (su.isConnected()) { su.joinChat();
han.sendEmptyMessage(3); han.sendEmptyMessage(1);
try { } catch (Exception e) {
su.joinChat(); han.sendEmptyMessage(2);
han.sendEmptyMessage(1);
} catch (Exception e) {
han.sendEmptyMessage(2);
}
} }
// TODO: Implement this method
} }
// TODO: Implement this method
}).start(); }).start();
} else { } else {
han.sendEmptyMessage(1); han.sendEmptyMessage(1);
......
...@@ -122,7 +122,7 @@ public class ServiceManagement { ...@@ -122,7 +122,7 @@ public class ServiceManagement {
.setUsernameAndPassword(name, password) .setUsernameAndPassword(name, password)
.setXmppDomain("mycard.moe") .setXmppDomain("mycard.moe")
.setKeystoreType(null) .setKeystoreType(null)
.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled) .setSecurityMode(ConnectionConfiguration.SecurityMode.ifpossible)
.setHost("chat.mycard.moe") .setHost("chat.mycard.moe")
.build(); .build();
con = new XMPPTCPConnection(config); con = new XMPPTCPConnection(config);
......
...@@ -43,7 +43,7 @@ public class YGOUtil { ...@@ -43,7 +43,7 @@ public class YGOUtil {
* @return 高清图url * @return 高清图url
*/ */
public static String getCardImageDetailUrl(int code) { public static String getCardImageDetailUrl(int code) {
return "https://cdn01.moecube.com/ygomobile-images/" + code + ".png"; return "https://cdn01.moecube.com:444/ygomobile-images/" + code + ".png";
} }
......
...@@ -5,5 +5,6 @@ public enum CardOt { ...@@ -5,5 +5,6 @@ public enum CardOt {
OCG, OCG,
TCG, TCG,
OCG_TCG, OCG_TCG,
DIY DIY,
简中
} }
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView <TextView
android:layout_marginLeft="10dp"
android:id="@+id/sp_tv" android:id="@+id/sp_tv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
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