Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
8f392eae
Commit
8f392eae
authored
Aug 28, 2021
by
feihuaduo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新gradle版本
高清卡图地址更新为444端口(加载卡图更快) 适配mc新聊天室地址 新增简中专属分类 修复卡组编辑闪退的问题
parent
7d534cb5
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
56 additions
and
50 deletions
+56
-50
build.gradle
build.gradle
+1
-1
gradle/wrapper/gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
+1
-1
mobile/build.gradle
mobile/build.gradle
+3
-3
mobile/src/main/AndroidManifest.xml
mobile/src/main/AndroidManifest.xml
+6
-3
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/CardListAdapter.java
...java/cn/garymb/ygomobile/ui/adapters/CardListAdapter.java
+4
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
.../main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
+12
-7
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/mcchat/McchatActivity.java
.../cn/garymb/ygomobile/ui/mycard/mcchat/McchatActivity.java
+11
-15
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/mcchat/SplashActivity.java
.../cn/garymb/ygomobile/ui/mycard/mcchat/SplashActivity.java
+13
-17
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/mcchat/management/ServiceManagement.java
...mobile/ui/mycard/mcchat/management/ServiceManagement.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/utils/YGOUtil.java
mobile/src/main/java/cn/garymb/ygomobile/utils/YGOUtil.java
+1
-1
mobile/src/main/java/ocgcore/enums/CardOt.java
mobile/src/main/java/ocgcore/enums/CardOt.java
+2
-1
mobile/src/main/res/layout/activity_splash.xml
mobile/src/main/res/layout/activity_splash.xml
+1
-0
No files found.
build.gradle
View file @
8f392eae
...
...
@@ -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'
}
}
...
...
gradle/wrapper/gradle-wrapper.properties
View file @
8f392eae
...
...
@@ -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
mobile/build.gradle
View file @
8f392eae
...
...
@@ -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:439
03
'
api
'com.tencent.tbs.tbssdk:sdk:439
39
'
//http请求库
implementation
'com.squareup.okhttp3:okhttp:3.12.0'
implementation
'com.bm.photoview:library:1.4.1'
...
...
mobile/src/main/AndroidManifest.xml
View file @
8f392eae
...
...
@@ -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}"
/>
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/CardListAdapter.java
View file @
8f392eae
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
))
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
View file @
8f392eae
...
...
@@ -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
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/mcchat/McchatActivity.java
View file @
8f392eae
...
...
@@ -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
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/mcchat/SplashActivity.java
View file @
8f392eae
...
...
@@ -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
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/mycard/mcchat/management/ServiceManagement.java
View file @
8f392eae
...
...
@@ -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
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/utils/YGOUtil.java
View file @
8f392eae
...
...
@@ -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"
;
}
...
...
mobile/src/main/java/ocgcore/enums/CardOt.java
View file @
8f392eae
...
...
@@ -5,5 +5,6 @@ public enum CardOt {
OCG
,
TCG
,
OCG_TCG
,
DIY
DIY
,
简中
}
mobile/src/main/res/layout/activity_splash.xml
View file @
8f392eae
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment