Commit 8f392eae authored by feihuaduo's avatar feihuaduo

更新gradle版本

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